/* Welcome Page Styles */

/* Force datepickers above overlays/backdrops */
.flatpickr-calendar {
    z-index: 999999 !important;
}
.jalalidatepicker, .jalalidatepicker-wrap, .jalali-datepicker, .jalaliDatepicker, .jalali-picker, .jalali-datepicker-wrapper {
    z-index: 999999 !important;
}

/* if any parent creates stacking context, also make inputs visible */
#date-input-jalali, #date-input-gregorian, #date-input-hijri {
    position: relative; z-index: 99999;
}

@font-face {
    font-family: 'MyCustomFont';
    src: local('MyCustomFont'), local('Mitra'), url("../fonts/Mitra.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body, html {
    direction: rtl;
    text-align: right;
}
/* استایل مدرن و حرفه‌ای برای فیلدهای فرم */
.form-group-custom {
    margin-bottom: 1.2rem;
    width: 100%;
    position: relative;
}

/* استایل ویژه برای منوی کشوری ساده */
#country-select {
    width: 100%;
    border: 1.5px solid #E6E6E6;
    border-radius: 1rem;
    padding: 0.5rem 1rem 0.5rem 1rem;
    background: #f8faff;
    color: #1F4897;
    font-weight: 600;
    font-size: 1rem;
    min-height: 40px;
    height: 40px;
    box-shadow: 0 2px 12px #1F48971A;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    margin-bottom: 0.3rem;
    appearance: none;
    cursor: pointer;
    text-align: right;
}
#country-select:focus {
    border-color: #AE8925;
    box-shadow: 0 0 0 2px #AE892533;
    background: #fff;
}
#country-select option[disabled][selected][hidden] {
    color: #b0b0b0;
}
#country-select option {
    background: #f8faff;
    color: #1F4897;
    font-size: 1.08rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #e6e6e6;
    transition: background 0.2s, color 0.2s;
    border-radius: 0.8rem;
}
#country-select option:hover,
#country-select option:focus {
    background: #e6f0ff;
    color: #AE8925;
}
.form-label-custom {
    color: #1F4897;
    font-weight: bold;
    font-size: 1.08rem;
    margin-bottom: 0.35rem;
    display: block;
    letter-spacing: 0.5px;
}
.form-select-custom, .custom-dropdown-input, .form-group-custom input[type="text"], .form-group-custom input[type="email"], .form-group-custom input[type="password"] {
    width: 100%;
    border: 1.5px solid #E6E6E6;
    border-radius: 0.85rem;
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    background: #fff;
    color: #1F4897;
    font-weight: 500;
    font-size: 1.08rem;
    appearance: none;
    box-shadow: 0 2px 12px #1F48971A;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    margin-bottom: 0.2rem;
}
.form-select-custom:focus, .custom-dropdown-input:focus, .form-group-custom input:focus {
    border-color: #AE8925;
    box-shadow: 0 0 0 2px #AE892533;
}
.form-select-custom option[disabled][selected][hidden] {
    color: #b0b0b0;
}
/* استایل هماهنگ و مدرن برای دکمه‌های فرم */
.custom-btn {
    background: #fff;
    color: #1F4897;
    border-radius: 1rem;
    font-weight: bold;
    font-size: 1.08rem;
    width: 110px;
    min-width: 90px;
    padding: 0.7rem 0;
    margin-top: 0;
    box-shadow: 0 2px 8px #1F48971A;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: 2px solid #1F4897;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}
.custom-btn:hover, .custom-btn:focus {
    background: #1F4897;
    color: #fff;
    box-shadow: 0 4px 16px #1F489755;
    outline: none;
}
.custom-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #fff;
    color: #1F4897;
    border: 2px solid #1F4897;
}
.form-group-custom input[type="text"], .form-group-custom input[type="email"], .form-group-custom input[type="password"] {
    padding-right: 2.5rem;
}
.form-group-custom .form-select-arrow {
    pointer-events: none;
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #AE8925;
    font-size: 1.3rem;
}
body, html, .form-group-custom, .form-label-custom, .form-select-custom, .custom-dropdown-input, .custom-btn, input, select, button, label, textarea, option {
    font-family: 'MyCustomFont', Tahoma, Arial, sans-serif !important;
}
.step-btn-group {
    display: flex;
    flex-direction: row;
    gap: 0.7rem;
    margin-top: 1.2rem;
    justify-content: center;
}
.step-btn-group .custom-btn {
    width: 100px;
    min-width: 80px;
    font-size: 0.98rem;
    padding: 0.55rem 0;
    margin-top: 0;
    border-radius: 0.9rem;
}
.step-btn-group .custom-btn.back {
    background: #fff;
    color: #1F4897;
    border: 2px solid #1F4897;
}
.step-btn-group .custom-btn.next {
    margin-right: 0.7rem;
}
.step-btn-group .custom-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* استایل مدرن و حرفه‌ای برای لیست‌های مرحله اول */
#step-1 .form-select-custom {
    border: none !important;
    box-shadow: none !important;
    background: #f8faff;
    border-radius: 1rem;
    color: #1F4897;
    font-size: 1.12rem;
    font-weight: 600;
    padding: 1rem 2.5rem 1rem 1.2rem;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    margin-bottom: 0.3rem;
    appearance: none;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%231F4897" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
    background-repeat: no-repeat;
    background-position: left 1.2rem center;
    background-size: 1.2rem;
}
#step-1 .form-select-custom:focus {
    border: none !important;
    box-shadow: 0 0 0 2px #AE892533;
}
#step-1 .form-select-custom option[disabled][selected][hidden] {
    color: #b0b0b0;
}
/* استایل حرفه‌ای برای dropdown لیست گزینه‌های select */
select.form-select-custom option {
    background: #f8faff;
    color: #1F4897;
    font-size: 1.08rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #e6e6e6;
    transition: background 0.2s, color 0.2s;
}
select.form-select-custom option:hover,
select.form-select-custom option:focus {
    background: #e6f0ff;
    color: #AE8925;
}
/* استایل سفارشی برای Choices.js */
.choices {
    width: 100%;
    margin-bottom: 0.3rem;
}
.choices__inner {
    background: #f3f6fa;
    border-radius: 1rem;
    border: 2px solid #AE8925;
    min-height: 48px;
    color: #1F4897;
    font-size: 1.12rem;
    font-weight: 600;
    box-shadow: 0 2px 12px #1F48971A;
    padding: 0.7rem 1.2rem;
    transition: border 0.2s, box-shadow 0.2s;
}
.choices__inner:focus, .choices__inner.is-focused {
    border-color: #1F4897;
    box-shadow: 0 0 0 2px #AE892533;
}
.choices__list--dropdown, .choices__list[aria-expanded] {
    background: #fff;
    border-radius: 0.8rem;
    border: 1.5px solid #AE8925;
    box-shadow: 0 4px 16px #1F489733;
    color: #1F4897;
    font-size: 1.08rem;
    margin-top: 0.2rem;
}
.choices__item--selectable {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #f3f6fa;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.choices__item--selectable.is-highlighted, .choices__item--selectable:hover {
    background: #e6f0ff;
    color: #AE8925;
}
.choices__placeholder {
    color: #b0b0b0;
    opacity: 1;
}
/* کوچک‌تر کردن فیلدهای مرحله اول (Choices.js) - merged into the later comprehensive block to avoid duplicates */
#step-1 .choices__list--dropdown, #step-1 .choices__list[aria-expanded] { font-size: 1rem !important; }
/* متن وسط و هماهنگی طول فیلدهای مرحله اول با فرم */
#step-1 .choices,
#step-1 .choices__inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
    align-items: center;
}
#step-1 .choices__inner {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
#step-1 .choices__item {
    text-align: center;
}
/* متن فیلدهای مرحله اول سمت راست باشد */
#step-1 .choices__inner,
#step-1 .choices__item {
    text-align: right !important;
    justify-content: flex-end !important;
}
/* بک‌گراند سفید برای فیلدهای مرحله اول */
#step-1 .choices__inner {
    background: #fff !important;
}
#step-1 .choices__list--dropdown, #step-1 .choices__list[aria-expanded] {
    background: #fff !important;
}
/* استایل هماهنگ فیلدهای مرحله دوم با مرحله اول */
#step-2 .custom-dropdown-input,
#step-2 input[type="text"],
#step-2 input[type="email"] {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    width: 100% !important;
}

/* Toast message styles */
.toast-message {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: #fff;
    color: #1F4897;
    border: 2px solid #AE8925;
    border-radius: 1rem;
    box-shadow: 0 4px 16px #1F489755;
    padding: 1rem 2rem;
    font-size: 1.08rem;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.toast-message.show {
    opacity: 1;
    pointer-events: auto;
}
.toast-message.error {
    color: #d32f2f;
}
.toast-message.success {
    border-color: #388e3c;
    color: #388e3c;
}
