/* ==========================================================================
   زیبایا | Zibaia - استایل‌های صفحه ثبت‌نام
   ========================================================================== */

/* ==================================================================== */
/* کانتینر اصلی */
/* ==================================================================== */
.auth-container {
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fef7ff 0%, #fff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container-wide {
    min-height: auto;
    padding: 60px 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(214, 51, 132, 0.15);
    padding: 40px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

/* ==================================================================== */
/* هدر */
/* ==================================================================== */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-title {
    color: #d63384;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    font-size: 0.95rem;
}

/* ==================================================================== */
/* انتخاب نوع کاربری */
/* ==================================================================== */
.auth-form-group {
    margin-bottom: 25px;
}

.role-selection-label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

.required {
    color: #dc3545;
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.role-card {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.role-card:hover {
    border-color: #d63384;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(214, 51, 132, 0.2);
}

.role-card.selected {
    border-color: #d63384;
    background: linear-gradient(135deg, #fef7ff 0%, #fff 100%);
    box-shadow: 0 5px 20px rgba(214, 51, 132, 0.3);
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.role-card-title {
    font-weight: 800;
    color: #d63384;
    font-size: 1rem;
    margin-bottom: 5px;
}

.role-card-description {
    font-size: 0.85rem;
    color: #999;
}

/* ==================================================================== */
/* انتخاب جنسیت */
/* ==================================================================== */
.form-section {
    margin-bottom: 25px;
}

.form-label-required {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    font-size: 1rem;
}

.gender-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.gender-option {
    flex: 1;
    position: relative;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.gender-option:hover {
    border-color: #d63384;
}

.gender-option.active {
    border-color: #d63384;
    background: linear-gradient(135deg, #fef7ff 0%, #fff 100%);
    box-shadow: 0 3px 15px rgba(214, 51, 132, 0.2);
}

.gender-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.gender-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gender-icon {
    font-size: 2rem;
}

.gender-label {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ==================================================================== */
/* فیلدهای ورودی */
/* ==================================================================== */
.auth-form-label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.auth-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.auth-form-input:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 4px rgba(214, 51, 132, 0.1);
}

.auth-form-input.ltr {
    direction: ltr;
    text-align: left;
}

.auth-form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #999;
}

/* ==================================================================== */
/* دکمه‌ها */
/* ==================================================================== */
.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #d63384 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(214, 51, 132, 0.3);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(214, 51, 132, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================================================================== */
/* بخش OTP - اصلاح شده */
/* ==================================================================== */
.otp-section {
    display: none;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fef7ff 0%, #fff 100%);
    border-radius: 15px;
    border: 2px solid #d63384;
    box-shadow: 0 5px 20px rgba(214, 51, 132, 0.1);
    animation: fadeIn 0.5s ease-in-out;
    direction: rtl; /* ✅ اضافه شده */
    text-align: right; /* ✅ اضافه شده */
}

.otp-section.active {
    display: block;
}

.otp-section h3 {
    color: #d63384;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: right; /* ✅ اضافه شده */
}

.otp-section p {
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: right; /* ✅ اضافه شده */
}

.otp-section p strong {
    color: #d63384;
    font-weight: 700;
    direction: ltr;
    display: inline-block;
    unicode-bidi: embed; /* ✅ اضافه شده */
}

.otp-input-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
    direction: ltr; /* ✅ اضافه شده */
}

.otp-input {
    flex: 1;
    max-width: 250px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 700;
    direction: ltr;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', monospace;
}

.otp-input:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 4px rgba(214, 51, 132, 0.15);
}

.timer {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 0.95rem;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    direction: rtl; /* ✅ اضافه شده */
}

.timer #countdown {
    color: #d63384;
    font-weight: 800;
    font-size: 1.1rem;
    direction: ltr;
    display: inline-block;
}

.otp-resend-btn {
    display: block;
    margin: 15px auto 0;
    background: transparent;
    color: #d63384;
    border: 2px solid #d63384;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.otp-resend-btn:hover:not(:disabled) {
    background: #d63384;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 51, 132, 0.3);
}

.otp-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
    text-align: center;
    font-weight: 600;
    border: 1px solid #c3e6cb;
    animation: fadeIn 0.5s ease-in-out;
    direction: rtl; /* ✅ اضافه شده */
}

.success-message.active {
    display: block;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-section.active {
    display: block;
}

.otp-section h3 {
    color: #d63384;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 800;
}

.otp-section p {
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.otp-section p strong {
    color: #d63384;
    font-weight: 700;
    direction: ltr;
    display: inline-block;
}

.otp-input-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.otp-input {
    flex: 1;
    max-width: 250px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 700;
    direction: ltr;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', monospace;
}

.otp-input:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 4px rgba(214, 51, 132, 0.15);
}

.timer {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 0.95rem;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.timer #countdown {
    color: #d63384;
    font-weight: 800;
    font-size: 1.1rem;
    direction: ltr;
    display: inline-block;
}

.otp-resend-btn {
    display: block;
    margin: 15px auto 0;
    background: transparent;
    color: #d63384;
    border: 2px solid #d63384;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.otp-resend-btn:hover:not(:disabled) {
    background: #d63384;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 51, 132, 0.3);
}

.otp-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
    text-align: center;
    font-weight: 600;
    border: 1px solid #c3e6cb;
    animation: fadeIn 0.5s ease-in-out;
}

.success-message.active {
    display: block;
}

/* ==================================================================== */
/* نقشه */
/* ==================================================================== */
.map-section {
    margin: 25px 0;
}

.map-container {
    height: 300px;
    border-radius: 15px;
    border: 2px solid #ddd;
    overflow: hidden;
    margin-bottom: 10px;
}

.map-container.loaded {
    border-color: #d63384;
}

.coordinates-display {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    direction: ltr;
    text-align: center;
}

.coordinates-display.active {
    display: block;
}

.map-actions {
    margin-top: 10px;
}

.map-locate-btn {
    width: 100%;
    padding: 10px;
    background: white;
    border: 2px solid #d63384;
    color: #d63384;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.map-locate-btn:hover:not(:disabled) {
    background: #d63384;
    color: white;
}

.map-locate-btn.success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

/* ==================================================================== */
/* فوتر */
/* ==================================================================== */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.auth-footer-text {
    color: #666;
    margin: 0;
}

.auth-footer-link {
    color: #d63384;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.auth-footer-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* ==================================================================== */
/* ریسپانسیو */
/* ==================================================================== */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .role-cards {
        grid-template-columns: 1fr;
    }
    
    .gender-selection {
        flex-direction: column;
    }
    
    .otp-input {
        font-size: 1.3rem;
        letter-spacing: 5px;
        padding: 12px;
        max-width: 100%;
    }
    
    .map-container {
        height: 250px;
    }
}