﻿/* ============================================
   register.css - استایل صفحه ثبت‌نام
   ============================================ */

.register-container {
    max-width: 1100px;
    direction: rtl; /* grid باید همیشه RTL باشد — مستقل از html element */
}

/* اگه ASP.NET یه form خالی داخل container اضافه کرد، از grid flow خارجش کن */
.register-container > form {
    display: none;
}

/* Step indicators در brand-side */
.step-indicators {
    display: flex;
    align-items: center;
    margin-top: 50px;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.step-item.active { opacity: 1; }
.step-item.done   { opacity: 0.8; }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: white;
    color: #3b82f6;
    border-color: white;
}

.step-item.done .step-circle {
    background: rgba(255,255,255,0.5);
    border-color: white;
}

.step-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
    text-align: center;
    white-space: nowrap;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.4);
    margin-bottom: 24px;
    min-width: 20px;
}

/* Form rows */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* OTP input */
.otp-input {
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 10px;
    font-weight: 700;
    padding: 14px;
}

/* Timer row */
.otp-timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

#timerText {
    color: #3b82f6;
    font-weight: 600;
}

.resend-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.resend-btn:hover:not(:disabled) { background: #f0f0ff; }
.resend-btn:disabled { color: #ccc; cursor: not-allowed; }

/* Referral code */
.referral-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.referral-input-wrap .form-control {
    padding-left: 40px;
}

.referral-status {
    position: absolute;
    left: 12px;
    font-size: 1rem;
    pointer-events: none;
}

.referral-status.ok      { color: #10b981; }
.referral-status.error   { color: #ef4444; }
.referral-status.loading { color: #3b82f6; }

#referralHint {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 0.8rem;
}

/* Hints */
.field-hint {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.8rem;
}

/* Back button */
.btn-back {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #3b82f6;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-back:hover {
    border-color: #3b82f6;
    background: #f7f8ff;
}

/* Register footer */
.register-footer {
    text-align: center;
    margin-top: 24px;
    color: #888;
    font-size: 0.9rem;
}

.register-footer a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
}

.register-footer a:hover { text-decoration: underline; }

/* Success animation */
@keyframes successPop {
    0%   { transform: scale(0.5); opacity: 0; }
    80%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}

.success-icon {
    animation: successPop 0.4s ease forwards;
    font-size: 4rem;
    color: #10b981;
    display: block;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .step-indicators { margin-top: 30px; }

    /* در موبایل brand-side مخفی‌ه و login-side تمام عرض را می‌گیرد */
    .register-container .login-side {
        padding: 36px 24px;
    }

    /* فونت تیتر را کوچک‌تر کن تا تک‌خطی بماند */
    .register-container .login-title {
        font-size: 1.25rem;
        margin-bottom: 6px;
        line-height: 1.4;
    }

    /* زیرتیتر */
    .register-container .login-subtitle {
        font-size: 0.82rem;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    /* label ها */
    .register-container .form-label {
        font-size: 0.88rem;
    }

    /* فاصله بین form-group ها */
    .register-container .form-group {
        margin-bottom: 18px;
    }
}

@media (max-width: 400px) {
    .register-container .login-side {
        padding: 28px 18px;
    }

    .register-container .login-title {
        font-size: 1.1rem;
    }
}
