/* استایل‌های صفحه ثبت نام بر اساس تم موجود */
:root {
    --red: #a35c40;
    --primary: #47b59e;
    /* رنگ اصلی سبز */
    --deep: #336633;
    /* سبز تیره */
    --dark: #343a32;
    /* خاکستری/مشکی تیره */
    --light: #e0dfdd;
    /* رنگ روشن برای متن‌ها */
    --greenlight: #8fa271;
    /* سبز روشن برای پس‌زمینه‌ها */
    /* 📏 اندازه‌های پایه برای ریسپانسیو */
    --radius: 1.2rem;
    /* گوشه‌های گرد */
    --padding: 1.2rem;
    /* فاصله داخلی */
    --gap: 1rem;
    /* فاصله بین آیتم‌ها */
}

@font-face {
    font-family: 'IranSans';
    src: url('../fonts/AbarLow-SemiBold.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'IranSans';
    src: url('../fonts/AbarLow-ExtraBold.woff2') format('woff2');
    font-weight: 500;
}

@font-face {
    font-family: 'IranSans';
    src: url('../fonts/AbarLow-Black.woff2') format('woff2');
    font-weight: 700;
}

/* 🧩 تنظیمات پایه برای همه‌ی المنت‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* محاسبه اندازه با احتساب border و padding */
}

/* 🖱️ استایل اسکرول‌بار مرورگر */
::-webkit-scrollbar {
    width: 8px
}

::-webkit-scrollbar-track {
    background: var(--greenlight)
}

::-webkit-scrollbar-thumb {
    background: var(--deep);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark)
}

/* 📜 تنظیمات کلی صفحه */
html {
    scroll-behavior: smooth
}

/* اسکرول نرم */
body {
    font-family: 'IranSans', sans-serif;
    background: none;
    color: #333;
    overflow-x: hidden;
    font-size: 1rem;
    /* اندازه پایه متن */
    line-height: 1.6;
    /* بکگراند فوتر */
    background-image: linear-gradient(rgba(3, 17, 0, 0.75), rgba(3, 48, 0, 0.65)), url('../images/backgrand-images/register.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

a {
    text-decoration: none;
}


/* استایل های صفحه */
/* استایل‌های صفحه ثبت‌نام */
/* استایل‌های صفحه ثبت‌نام */
/* استایل‌های صفحه ثبت‌نام - راست‌چین */
/* ================================
   🎨 تنظیمات کلی کانتینر و فرم
   ================================ */
.registration-container {
    min-height: 100dvh; /* ارتفاع کل صفحه */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    direction: rtl;
    text-align: right;
}

.registration-wrapper {
    background: rgba(255, 255, 255, 0.15); /* بکگراند شیشه‌ای */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    direction: rtl;
}

/* ================================
   📌 مدیریت مراحل فرم
   ================================ */
.registration-stage { display: none; }
.registration-stage.active { display: block; }

.registration-stage h2 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: right;
}

/* ================================
   📌 بخش نمایش شماره تأیید
   ================================ */
.verification-info {
    background: rgba(71, 181, 158, 0.12);
    border: 1px solid rgba(71, 181, 158, 0.25);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: right;
}
.verification-info p {
    color: #f7f7f7;
    font-size: 1.1rem;
}
.verification-info #displayedPhone {
    font-weight: 600;
    color: var(--primary);
}
/* استایل متن "کد تأیید به شماره ... ارسال شد" */
#step2 > p {
  font-size: .95rem;
  color: var(--light);                    /* رنگ روشن تم */
  line-height: 1.5;
    margin-bottom: 1rem;
}

#step2 > p span#displayedPhone {
  color: var(--greenlight);             /* سبز اصلی تم */
  font-weight: 550;
  font-size: 1rem;
  letter-spacing: 1px;
  direction: ltr;
  display: inline-block;

}


/* ================================
   🔘 دکمه‌های اصلی (ثبت‌نام/تأیید)
   ================================ */
.btn-primary,
.registration-form button[type="submit"] {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(71, 181, 158, 0.3);
}
.btn-primary:hover,
.registration-form button[type="submit"]:hover {
 background: #3a9a85;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(71, 181, 158, 0.3);
}
.btn-primary:disabled,
.registration-form button[type="submit"]:disabled {
    background: rgba(71, 181, 158, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ================================
   🔄 دکمه ارسال مجدد کد
   ================================ */
#resendCodeBtn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
#resendCodeBtn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}
#resendCodeBtn:disabled {
    color: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* ================================
   📩 پیام‌های موفقیت و خطا
   ================================ */
.message {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: right;
    font-weight: 500;
}
.message.success {
    background: rgba(71, 181, 158, 0.3);
    border: 1px solid rgba(71, 181, 158, 0.4);
    color: white;
}
.message.error {
    background: rgba(163, 92, 64, 0.3);
    border: 1px solid rgba(163, 92, 64, 0.4);
    color: white;
}
/* ================================
   پیام‌های موفقیت و خطا (یکسان و بدون کادر)
   ================================ */
.error-message,
.success-message {
  font-size: 0.88rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0;
  border-radius: 0.6rem;
  text-align: right;
  opacity: 0;
  transition: opacity 0.35s ease;
  direction: rtl;
}

.error-message {
  color: #ff6b6b;           /* قرمز خطا */
}

.success-message {
  color: var(--primary);    /* سبز اصلی تم → #47b59e */
  font-weight: 500;
}

.error-message.show,
.success-message.show {
  opacity: 1;
  
}
.global-success {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 25px rgba(71, 181, 158, 0.3);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.global-success.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  top: 30px;
}
/* Toastهای جهانی (موفقیت و خطا) */
.global-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  min-width: 220px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.global-toast.success {
  background: rgba(71, 181, 158, 0.95);
  color: white;
}

.global-toast.error {
  background: rgba(255, 107, 107, 0.95);
  color: white;
}

.global-toast.show {
  opacity: 1;
  top: 40px;
}
/* اگر قبلاً success-message کادر داشت، این خطوط قدیمی رو حذف یا کامنت کن */
/*
.success-message { background: ...; padding: 1rem; ... }
*/
/* ================================
   ⏱️ تایمر نمایش زمان باقی‌مانده
   ================================ */
.timer {
    display: inline-block;
   margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
}
.timer.expired {
    color: rgba(163, 92, 64, 0.8);
}

/* ================================
   ✏️ استایل ورودی‌ها (فقط خط زیر + لیبل شناور)
   ================================ */
.input-group {
    position: relative;
    margin-bottom: 2rem;
    direction: rtl;
    text-align: right;
   
}

/* ورودی‌ها: متن سفید، بک‌گراند شفاف */
.input-group input {
  width: 100%;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.35);
  background: transparent !important; /* بک‌گراند شفاف */
  color: #fff !important;                  /* متن سفید */
  padding: 0.75rem 0.25rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, color 0.25s ease;
  text-align: right;
  font-family: inherit;
}
/* مخفی کردن placeholder برای لیبل شناور */
.input-group input::placeholder { color: transparent; }



/* فوکوس: تغییر رنگ خط زیر */
.input-group input:focus {
    background: transparent;
    border-bottom-color: var(--primary);
}

/* لیبل: موقعیت اولیه */
.input-group label {
    position: absolute;
    top: .8rem;
    right: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    pointer-events: none;
    transition: transform 0.2s ease, color 0.2s ease, font-size 0.2s ease;
}


/* لیبل شناور: بالا رفتن روی فوکوس یا پر شدن */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group input:valid + label {
    transform: translateY(-1.4rem);
    font-size: 0.8rem;
    color: var(--primary);
    
}
/* رفع مشکل Autofill کروم */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset !important; /* حذف بک‌گراند سفید */
  -webkit-text-fill-color: #fff !important; /* متن سفید */
  transition: background-color 5000s ease-in-out 0s; /* جلوگیری از فلاش رنگ */
}

/* ================================
   📱 ریسپانسیو برای موبایل
   ================================ */
@media (max-width: 480px) {
    .registration-wrapper {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    .registration-stage h2 { font-size: 1.6rem; }
    .input-group input { padding: 0.6rem 0.25rem; }
    .input-group label { top: 0.6rem; right: 0.25rem; }
    .input-group input:focus + label,
    .input-group input:valid + label {
        transform: translateY(-1rem);
        font-size: 0.75rem;
    }
}
