
/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Container */
.location-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Modal Header */
.modal-header {
    position: relative;
    margin-bottom: 20px;
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 700;
    color: #3D3D3D;
    margin: 0 0 8px 0;
}

.modal-subtitle {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #888888;
    margin: 0;
}

/* Select2 option template styles */
.location-option-wrapper { display:flex; flex-direction:column; gap:4px; }
.location-option-text { font-family: var(--font-primary); font-size:15px; font-weight:700; color:#1f2937; }
.location-option-desc { font-family: var(--font-primary); font-size:13px; color:#6b7280; }

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-close:hover {
    opacity: 0.7;
}

/* Modal Content */
.modal-content {
    margin-bottom: 20px;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #E7E7E7;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.custom-dropdown__trigger:hover {
    border-color: #D0D0D0;
}

.custom-dropdown__value {
    font-family: var(--font-primary);
    font-size: 14px;
    color: #888888;
}

.custom-dropdown__value.selected {
    color: #3D3D3D;
}

.custom-dropdown__icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-dropdown.open .custom-dropdown__icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.custom-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #E7E7E7;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
    max-height: 300px;
    overflow: hidden;
}

.custom-dropdown.open .custom-dropdown__menu {
    display: block;
}

/* Dropdown Search */
.custom-dropdown__search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #E7E7E7;
}

.custom-dropdown__search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #3D3D3D;
}

.custom-dropdown__search-input::placeholder {
    color: #888888;
}

/* Dropdown List */
.custom-dropdown__list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
}

.custom-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #3D3D3D;
    transition: background-color 0.2s ease;
}

.custom-dropdown__item:hover {
    background: #F7F7F8;
}

.custom-dropdown__item.selected {
    color: #F56011;
    font-weight: 500;
}

.custom-dropdown__check {
    color: #F56011;
}

.custom-dropdown__no-results {
    padding: 16px;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #888888;
}

/* Modal Actions */
.modal-actions {
    margin-top: 8px;
}

/* Modal confirm button wrapper - matches header__cta-wrapper */
.modal-confirm-wrapper {
    display: inline-flex;
    padding: 0;
    width: 100%;
}

/* Modal confirm button - matches header__cta exactly */
.modal-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    line-height: 48px;
    padding: 0 24px;
    background: linear-gradient(to bottom, #ff8f4b 0%, #ff5c00 100%);
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid rgba(220, 38, 38, 0.1);
}
.modal-confirm-btn::after {
    /* content: ''; */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ff8f4b 0%, #ff5c00 100%);
}

.modal-confirm-btn:hover {
    transform: scale(1.001);
    /* Matches header CTA hover */
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.35);
    /* Matches header CTA shadow */
}

.modal-confirm-btn:active {
    transform: scale(0.98);
    /* Matches header CTA active */
}

/* Responsive */
@media (max-width: 480px) {
    .location-modal {
        padding: 20px;
        border-radius: 16px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-subtitle {
        font-size: 13px;
    }
}
.modal-signature .modal-confirm-btn.btn-disable {
    background: #ececec !important;
    color: #000 !important;
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none;
    border: none;
}

/* ------------------- Custom location modal Signature theme */

.modal-overlay.modal-signature #select2-location_province-results .select2-results__option--highlighted[aria-selected],
.modal-overlay.modal-signature #select2-location_district-results .select2-results__option--highlighted[aria-selected],
.modal-overlay.modal-signature #select2-location_ward-results .select2-results__option--highlighted[aria-selected]{
    background: #FFF6F0;
}
.modal-overlay.modal-signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable .location-option-text,
.modal-overlay.modal-signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable .location-option-desc,
.modal-overlay.modal-signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable:hover .location-option-text,
.modal-overlay.modal-signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable:hover .location-option-desc {
    color: #F66012;
}

.modal-signature .select2-results__option {
    padding: 6px 12px;
}
.modal-signature .select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 6px 10px;
}
.modal-signature .select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ccc;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    padding: 7px 10px;
}
.modal-signature .select2-container {
    margin-top: -2px;
}
.modal-signature .select2-container--default .select2-selection--single .select2-selection__arrow {
    background: url('../images/arrow-down-16.svg') no-repeat center;
    background-size: 16px 16px;
}
.modal-signature .select2-container--default .select2-selection--single .select2-selection__arrow b{
    display: none;
}
/* ------------------- end ------------------- */
/* ------------------- Custom form Signature theme */
.form_signature .select2-container,
.form_signature .select2-container--default,
.form_signature .select2-container--below,
.form_signature .select2-container--open {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}
.form_signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #FFF6F0;
}

.form_signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable .location-option-text,
.form_signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable .location-option-desc,
.form_signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable:hover .location-option-text,
.form_signature .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable:hover .location-option-desc {
    color: #F66012;
}

.modal-signature .select2-search--dropdown .select2-search__field[aria-controls="select2-location_province-results"]:focus,
.modal-signature .select2-search--dropdown .select2-search__field[aria-controls="select2-location_district-results"]:focus,
.modal-signature .select2-search--dropdown .select2-search__field[aria-controls="select2-location_ward-results"]:focus {
    border: 1px solid #F66012;
}
/* ------------------- end ------------------- */

/* Modal Overlay Base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Container */
.location-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Success Modal Styles */
.success-modal .modal-header {
    text-align: center;
}

.success-modal .success-icon {
    margin-bottom: var(--spacing-md, 24px);
    display: flex;
    justify-content: center;
}

.success-modal .modal-title {
    color: #40C706;
    margin-bottom: var(--spacing-sm, 16px);
    font-size: 1.5rem;
    font-weight: 700;
}

.success-modal .modal-subtitle {
    color: var(--color-text-dark, #3D3D3D);
    font-size: 1rem;
    line-height: 1.5;
}

.success-modal .modal-close {
    position: absolute;
    top: var(--spacing-md, 24px);
    right: var(--spacing-md, 24px);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    transition: color 0.3s ease;
}

.success-modal .modal-close:hover {
    color: #333;
}

.success-modal .modal-actions {
    padding-top: var(--spacing-md, 24px);
}

/* Mobile background fix for signature theme */
@media (max-width: 768px) {
    .contact-section {
        /* background: url('{{ asset("front-end-multisite-3/themes/signature/assets/images/bg-register-form.png") }}') center/cover no-repeat !important; */
        background: url('../../../signature/assets/images/bg-register-form.png') center/cover no-repeat !important;
    }
    .contact-section::before,
    .contact-section::after {
        display: none !important;
        content: none !important;
    }
}
