/* =========================================
   استایل‌های پایه و نگهدارنده
========================================= */
.nito-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    width: 100%;
}

.nito-auth-box {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* سایه نرم و فلت */
    border: none; 
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-sizing: border-box;
    font-family: inherit;
}

/* =========================================
   تایپوگرافی
========================================= */
.nito-title {
    color: #374151;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: bold;
}

.nito-desc {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 30px;
}

#nito-user-phone-display {
    font-weight: bold;
    color: #1f2937;
    letter-spacing: 1px;
}

/* =========================================
   ورودی‌ها (Inputs)
========================================= */
.nito-input-group {
    margin-bottom: 20px;
}

#nito-phone-input, #nito-fullname-input {
    width: 100%;
    padding: 14px 15px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #374151;
    font-family: inherit;
}

#nito-phone-input:focus, #nito-fullname-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

#nito-phone-input::placeholder, #nito-fullname-input::placeholder {
    color: #9ca3af;
}

/* =========================================
   دکمه‌ها (Buttons)
========================================= */
.nito-btn {
    width: 100%;
    background: #007bff;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
}

.nito-btn:hover {
    background: #0056b3;
}

.nito-btn.nito-loading .nito-btn-text {
    visibility: hidden;
}

.nito-spinner {
    display: none;
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: nito-spin 1s linear infinite;
}

.nito-btn.nito-loading .nito-spinner {
    display: block;
}

@keyframes nito-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nito-msg {
    font-size: 13px;
    color: #dc2626;
    margin-top: 15px;
    display: none;
}

/* =========================================
   مرحله دوم: کدهای یکبار مصرف (OTP)
========================================= */
.nito-otp-group {
    display: flex;
    justify-content: space-between; /* ایجاد فاصله یکسان بین باکس‌ها */
    margin-bottom: 25px;
    direction: ltr; 
}

.nito-otp-input {
    width: 48px;  /* عرض ثابت برای جلوگیری از چسبیدن باکس‌ها */
    height: 55px;
    text-align: center;
    font-size: 24px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    color: #374151;
    font-family: inherit;
    box-sizing: border-box;
    background-color: #ffffff;
}

.nito-otp-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px); /* افکت جذاب و ظریف هنگام تایپ */
}

.nito-edit-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 20px;
    padding: 0;
    transition: all 0.3s ease;
}

.nito-edit-btn:hover {
    text-decoration: underline;
}

.nito-timer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

#nito-resend-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    padding: 0;
}

#nito-resend-btn.disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

#nito-timer {
    font-family: monospace;
    font-size: 15px;
}

/* =========================================
   مرحله سوم: آنبوردینگ (Onboarding)
========================================= */
.nito-select-wrapper {
    position: relative;
    width: 100%;
}


#nito-domain-input {
    width: 100%;
    padding: 12px 15px; /* کمی پدینگ را کمتر کردم تا جا برای متن باز شود */
    font-family: inherit;
    font-size: 14px;
    color: #374151;
    background-color: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

#nito-domain-input:focus {
    border-color: #007bff;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* =========================================
   انیمیشن‌های فرم (Fade In)
========================================= */
.nito-step-otp, .nito-step-onboarding {
    animation: nitoFadeIn 0.4s ease forwards;
}

@keyframes nitoFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}