/* ───── ۱) همهٔ متغیّرهای قابل تنظیم ───── */
#iran-otp-container{
  /* رنگ‌های پایه */
  --clr-main:            #E3A135;           /* رنگ اصلی (Primary)            */
  --clr-main-light:      #f0b450;           /* نسخهٔ روشن‌تر برای گرادیان    */
  --clr-bg:              #f8f8f8;           /* پس‌زمینهٔ کارت                */

  /* مرزها و سایه‌ها */
  --clr-border:          #ddd;              /* بردر عمومی                    */
  --clr-border-otp:      #d0d0d0;           /* خط زیر فیلدهای OTP            */
  --clr-btn-disabled:    #ccc;              /* رنگ دکمهٔ غیرفعال             */
  --clr-shadow-25:       rgba(227,161,53,.25);
  --clr-shadow-35:       rgba(227,161,53,.35);
  --clr-shadow-45:       rgba(227,161,53,.45);
  --clr-error:           #e74c3c;           /* قرمز خطا                      */
  --clr-error-shadow:    rgba(231,76,60,.45);

  /* متن */
  --clr-text:            #555;
  --clr-text-muted:      #666;

  /* شعاع گوشه‌ها */
  --radius-container:    18px;
  --radius-input:        10px;
  --radius-button:        8px;
}

/* ───── ۲) کارت/کانتینر اصلی ───── */
#iran-otp-container{
  max-width: 420px;
  margin: 40px auto;
  padding: 32px 26px 40px;

  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-container);

  box-shadow: 0 8px 24px rgba(0,0,0,.116);
  backdrop-filter: blur(2px);
  font-family: inherit;
}

/* ───── ۳) همهٔ input‌ها ───── */
#iran-otp-container input{
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 15px;

  border: 1px solid var(--clr-border);
  border-radius: var(--radius-input);

  transition: border-color .2s, box-shadow .2s;
}
#iran-otp-container input:focus{
  border-color: var(--clr-main);
  box-shadow: 0 0 0 2px var(--clr-shadow-25);
  outline: none;
}

/* ───── ۴) دکمه‌ها ───── */
#iran-otp-container button{
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;

  border: none;
  border-radius: var(--radius-button);
  color: #fff;
  cursor: pointer;

  background: linear-gradient(135deg,
              var(--clr-main) 0%,
              var(--clr-main-light) 100%);
  box-shadow: 0 4px 10px var(--clr-shadow-35);

  transition: transform .15s ease, box-shadow .15s ease;
}
#iran-otp-container button:hover:not(:disabled){
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--clr-shadow-45);
}
#iran-otp-container button:disabled{
  background: var(--clr-btn-disabled);
  box-shadow: none;
  cursor: not-allowed;
}

/* ───── ۵) لینک‌ها و متن ───── */
#iran-otp-container p{
  margin: 14px 0 6px;
  font-size: 14px;
  text-align: center;
  color: var(--clr-text);
}
#iran-otp-container a{
  color: var(--clr-main);
  font-weight: 600;
  text-decoration: none;
}
#iran-otp-container a:hover{ text-decoration: underline; }

/* ───── ۶) ورودی‌های ۴رقمی OTP ───── */
#otp-inputs,
#reg-otp-inputs{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
#otp-inputs input,
#reg-otp-inputs input{
  border: none;
  background: transparent;
  border-bottom: 2px solid var(--clr-border-otp);
  border-radius: 0;

  height: 2.1em;
  width: 2.3em;
  padding: 0;
  line-height: 2.1em;

  font-size: 1.6em;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
#otp-inputs input:focus,
#reg-otp-inputs input:focus{
  border-bottom-color: var(--clr-main);
}
#otp-inputs input::-webkit-outer-spin-button,
#otp-inputs input::-webkit-inner-spin-button,
#reg-otp-inputs input::-webkit-outer-spin-button,
#reg-otp-inputs input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* ───── ۷) دکمه‌های مرحلهٔ دوم ───── */
#login-step2 button,
#register-step2 button{ margin-top: 12px; }
#login-step2 button + button,
#register-step2 button + button{ margin-left: 6px; }

/* ───── ۸) کپچا ───── */
.iran-otp-captcha{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.iran-otp-captcha img{
  height: 40px;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  background: #fff;
}
.iran-otp-captcha a{
  font-size: 20px;
  color: var(--clr-main);
  line-height: 1;
  cursor: pointer;
}

/* ───── ۹) تایمر دریافت مجدد ───── */
#resend-timer,
#reg-resend-timer{
  display: block;
  text-align: center;
  color: var(--clr-text-muted);
  margin-top: 6px;
  font-size: 13px;
}

/* ───── ۱۰) دکمهٔ دریافت مجدد غیرفعال ───── */
#resend-otp:disabled,
#reg-resend-otp:disabled{
  opacity: .55;
  cursor: not-allowed;
}

/* ───── ۱۱) برجسته‌سازی خطا ───── */
.input-error{
  border: 2px solid var(--clr-error) !important;
  box-shadow: 0 0 4px var(--clr-error-shadow) !important;
}

/* ───── ۱۲) ریسپانسیو کوچک ───── */
@media (max-width: 480px){
  #iran-otp-container{
    padding: 24px 18px;
    border-radius: var(--radius-container);
  }
}

/* ───── ۱۳) چپ‌چین کردن فیلدهای عددی/ایمیل ───── */
#iran-otp-container
  input#iran-otp-phone,
  input#register-phone,
  input#register-email,
  input#cap-input-login,
  input#cap-input-reg,
  #otp-inputs input,
  #reg-otp-inputs input{
    direction: ltr;
    unicode-bidi: embed;
    text-align: left;
}

#iran-otp-container .iran-otp-title {
  font-size: 1.6rem;        /* بزرگ‌تر */
  font-weight: 600;         /* کمی نیمه‌پررنگ */
  text-align: center;       /* وسط‌چین */
  margin-top: 10px;
  margin-bottom: 30px;
  color: var(--clr-main);   /* رنگ اصلی از متغیرهای CSS */
}