/* assets/css/style.css */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --bg-color: #f3f4f6;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    background-color: var(--bg-color);
    direction: rtl;
    padding-bottom: 60px;
}

/* کانتینر اصلی */
.form-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 30px;
    margin: 40px auto;
    max-width: 900px;
    position: relative;
    overflow: hidden;
}

/* ============================
   1. نوار پیشرفت (Stepper)
   ============================ */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.stepper-wrapper::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    z-index: 1;
    border-radius: 10px;
}

.progress-line {
    position: absolute;
    top: 15px;
    right: 0; /* شروع از راست برای RTL */
    height: 4px;
    background: var(--primary);
    z-index: 1;
    transition: width 0.5s ease;
    border-radius: 10px;
    width: 0%;
}

.stepper-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px; /* فضای کلیک */
}

.step-counter {
    width: 36px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #999;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.step-name {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    transition: color 0.3s;
}

/* حالت فعال */
.stepper-item.active .step-counter {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}
.stepper-item.active .step-name { color: var(--primary); }

/* حالت تکمیل شده */
.stepper-item.completed .step-counter {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.stepper-item.completed .step-name { color: var(--primary); }

/* ============================
   2. محتوای مراحل (Step Content)
   ============================ */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   3. دکمه‌های ناوبری پایین
   ============================ */
.form-footer {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
}

/* ============================
   4. استایل‌های قبلی (حفظ شده)
   ============================ */
.form-label { font-weight: 600; font-size: 0.95rem; color: #444; }
.required::after { content: " *"; color: #dc3545; }
.form-control, .form-select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1); }
.input-group-text { background: #f8f9fa; border-radius: 0 8px 8px 0 !important; }
.form-control { border-radius: 8px 0 0 8px !important; }

/* سوییچ بزرگ (طبق درخواست قبلی) */
.custom-switch-size {
    display: flex; align-items: center; gap: 15px; min-height: 50px;
    margin-bottom: 0 !important;
}
.custom-switch-size .form-check-input {
    width: 4em !important; height: 2em !important; margin-left: 15px !important;
    float: none; cursor: pointer; border: 2px solid #adb5bd;
}
.custom-switch-size .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.custom-switch-size .form-check-label { font-size: 1.1rem; font-weight: 700; cursor: pointer; }

/* استپر تعداد نفرات */
.custom-stepper {
    display: flex; align-items: center; background: #fff; border: 1px solid #ced4da;
    border-radius: 10px; padding: 4px; direction: ltr !important;
}
.step-btn {
    width: 40px; height: 38px; border: none; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-minus-new { background: #fff5f5; color: #dc3545; }
.btn-plus-new { background: #f0fff4; color: #198754; }
.input-number-new { width: 50px; border: none; text-align: center; font-weight: bold; font-size: 1.2rem; }

/* ریسپانسیو */
@media (max-width: 768px) {
    .step-name { display: none; } /* مخفی کردن متن مراحل در موبایل */
    .form-container { padding: 15px; margin: 15px; }
}

/* قابلیت کلیک روی مراحل */
.stepper-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stepper-item:hover .step-counter {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

/* حذف فلش‌های پیش‌فرض اینپوت نامبر (Spinners) */

/* برای Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* برای Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* =========================================
   اصلاح نهایی استایل تاریخ تولد (KamaDatepicker)
   ========================================= */
.date-wrapper {
    width: 100%;
    display: block; /* اجبار به بلاک بودن */
}

#birth_date {
    width: 100% !important;
    height: 48px !important; 
    padding-right: 55px !important;
    background-color: #fff !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    box-sizing: border-box !important; 
}

.fake-icon-box {
    position: absolute;
    top: 1px;     
    right: 1px;   
    width: 48px;   
    height: 46px;  
    background-color: #f8f9fa;
    border-left: 1px solid #ced4da;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    pointer-events: none;
    z-index: 10;
}