/* Select2 — Visitors filter dropdowns (RTL, unified search in field) */

.location-filter-select2-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}

.location-filter-select2-wrap select.country-city-select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.location-filter-select2-wrap .select2-container {
    width: 100% !important;
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
}

.location-filter-select2-wrap .select2-container--default .select2-selection--single {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    min-height: 2.75rem;
    height: auto;
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
}

[dir="rtl"] .location-filter-select2-wrap .select2-container--default .select2-selection--single {
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
}

.location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #334155;
    line-height: 1.35;
    padding: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #64748b;
}

.location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.75rem;
    width: 1rem;
}

[dir="rtl"] .location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto;
    left: 0.75rem;
}

.location-filter-select2-wrap .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: none;
    box-shadow: 0 0 0 1px #93c5fd;
}

.home-filters-panel--directory:not(.home-filters-explore) .location-filter-select2-wrap .select2-container--default .select2-selection--single {
    border-color: #E2E8F0 !important;
    background-color: #F8FAFC !important;
    border-radius: 8px !important;
    min-height: 2.375rem !important;
    height: 2.375rem !important;
}

.home-filters-panel--directory:not(.home-filters-explore) .location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single {
    border-radius: 8px 8px 0 0 !important;
}

.home-filters-explore .location-filter-select2-wrap .select2-container--default .select2-selection--single {
    border-color: rgba(239, 137, 67, 0.18) !important;
    background-color: #ffffff !important;
    border-radius: 999px !important;
    min-height: 2.375rem !important;
    height: 2.375rem !important;
}

.home-filters-explore .location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single {
    border-radius: 1.25rem 1.25rem 0 0 !important;
}

.home-filters-panel:not(.home-filters-panel--directory) .location-filter-select2-wrap .select2-container--default .select2-selection--single {
    border-color: #E2E8F0;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.location-filter-has-value .select2-selection--single {
    border-color: #EF8943 !important;
    background: #ffffff !important;
    box-shadow: none;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--focus .select2-selection--single,
.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--home-filter-accent, #EF8943) !important;
    outline: none;
    box-shadow: 0 0 0 3px var(--home-filter-accent-soft, rgba(239, 137, 67, 0.16));
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--focus:not(.location-filter-has-value) .select2-selection--single,
.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--open:not(.location-filter-has-value) .select2-selection--single {
    background: var(--home-filter-field-bg-idle, #f1f5f9) !important;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.location-filter-has-value.select2-container--focus .select2-selection--single,
.home-filters-panel .location-filter-select2-wrap .select2-container--default.location-filter-has-value.select2-container--open .select2-selection--single {
    background: var(--home-filter-field-bg-selected, #ffffff) !important;
}

.home-filters-panel:not(.home-filters-explore) .location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single {
    box-shadow: 0 0 0 3px var(--home-filter-accent-soft, rgba(239, 137, 67, 0.16));
    border-bottom-color: var(--home-filter-accent, #EF8943) !important;
    border-radius: 1rem 1rem 0 0;
}

.location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #93c5fd;
    background: #fff;
    color: #334155;
    outline: none;
    box-shadow: none;
    border-bottom-color: #e2e8f0;
    border-radius: 1rem 1rem 0 0;
}

.location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    opacity: 1;
    cursor: not-allowed;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: var(--home-filter-field-bg-idle, #f1f5f9) !important;
    border-color: var(--home-filter-border, #e8ebf0) !important;
    opacity: 1;
    cursor: not-allowed;
}

.location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection__rendered,
.location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection__placeholder {
    color: #64748b;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection__rendered,
.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection__placeholder {
    color: #64748b !important;
}

.location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--home-filter-accent, #EF8943) transparent transparent transparent;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--home-filter-accent, #EF8943) transparent;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__arrow b {
    border-color: var(--home-filter-accent, #EF8943) transparent transparent transparent;
}

.home-filters-panel .location-filter-select2-wrap .select2-container--default.select2-container--disabled.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--home-filter-accent, #EF8943) transparent;
}

/* Dropdown is appended to body OR wrap — hide duplicate search globally for filter selects */
/* Fallback when dropdown is still attached to body */
body:has(.location-filter-select2-wrap) .select2-dropdown .select2-search--dropdown {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}

body:has(.location-filter-select2-wrap) .select2-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    z-index: 10080;
    background: #fff;
}

.location-filter-select2-wrap .select2-dropdown .select2-search--dropdown,
.select2-dropdown.location-filter-select2-dropdown .select2-search--dropdown {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}

.location-filter-select2-wrap .select2-container--open .select2-selection--single .select2-selection__rendered {
    display: none !important;
}

.location-filter-select2-wrap .select2-container .select2-selection--single .select2-search--inline {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    padding: 0 2.25rem 0 0.875rem;
}

.location-filter-select2-wrap .select2-container--open .select2-selection--single .select2-search--inline {
    display: flex;
}

[dir="rtl"] .location-filter-select2-wrap .select2-container .select2-selection--single .select2-search--inline {
    padding: 0 0.875rem 0 2.25rem;
}

.location-filter-select2-wrap .select2-container .select2-selection--single .select2-search--inline .select2-search__field {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    margin: 0;
    padding: 0;
    height: auto;
    line-height: 1.35;
}

.location-filter-select2-wrap .select2-container .select2-selection--single .select2-search--inline .select2-search__field::placeholder {
    color: #64748b;
}

.location-filter-select2-wrap .select2-dropdown,
.select2-dropdown.location-filter-select2-dropdown {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.875rem 0.875rem;
    box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    z-index: 10080;
    margin-top: -1px;
    background: #fff;
    position: absolute;
    left: 0;
    right: 0;
    width: 100% !important;
}

.location-filter-select2-wrap .select2-results__options,
.select2-dropdown.location-filter-select2-dropdown .select2-results__options {
    background: #fff;
}

.location-filter-select2-wrap .select2-results__option,
.select2-dropdown.location-filter-select2-dropdown .select2-results__option {
    background-color: #fff;
}

.location-filter-select2-wrap .select2-results > .select2-results__options,
.location-filter-select2-wrap .select2-container--default .select2-results > .select2-results__options {
    max-height: 16rem;
    padding: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: #EF8943 #f1f5f9;
}

.location-filter-select2-wrap .select2-results > .select2-results__options::-webkit-scrollbar,
.location-filter-select2-wrap .select2-container--default .select2-results > .select2-results__options::-webkit-scrollbar {
    width: 6px;
}

.location-filter-select2-wrap .select2-results > .select2-results__options::-webkit-scrollbar-track,
.location-filter-select2-wrap .select2-container--default .select2-results > .select2-results__options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.location-filter-select2-wrap .select2-results > .select2-results__options::-webkit-scrollbar-thumb,
.location-filter-select2-wrap .select2-container--default .select2-results > .select2-results__options::-webkit-scrollbar-thumb {
    background: #EF8943;
    border-radius: 999px;
}

.location-filter-select2-wrap .select2-results > .select2-results__options::-webkit-scrollbar-thumb:hover,
.location-filter-select2-wrap .select2-container--default .select2-results > .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #e07a35;
}

.location-filter-select2-wrap .select2-results__option,
.location-filter-select2-wrap .select2-container--default .select2-results__option {
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.location-filter-select2-wrap .select2-results__option--highlighted,
.location-filter-select2-wrap .select2-results__option--highlighted[aria-selected],
.location-filter-select2-wrap .select2-results__option--highlighted.select2-results__option--selectable,
.location-filter-select2-wrap .select2-container--default .select2-results__option--highlighted,
.location-filter-select2-wrap .select2-container--default .select2-results__option--highlighted[aria-selected],
.home-filters-panel .select2-container--default .select2-results__option--highlighted[aria-selected],
.home-filters-panel .location-filter-select2-wrap .select2-results__option--highlighted,
.home-filters-panel .location-filter-select2-wrap .select2-results__option--highlighted[aria-selected],
body:has(.location-filter-select2-wrap) .select2-results__option--highlighted,
body:has(.location-filter-select2-wrap) .select2-results__option--highlighted[aria-selected] {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
}

.location-filter-select2-wrap .select2-results__option--selected,
.location-filter-select2-wrap .select2-container--default .select2-results__option--selected,
body:has(.location-filter-select2-wrap) .select2-results__option--selected {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
    font-weight: 700;
}

/* Appointments page — match other filter fields */
.location-filter-select2-wrap--appointments .select2-container {
    font-size: 0.9375rem;
    font-weight: 600;
}

.location-filter-select2-wrap--appointments .select2-container--default .select2-selection--single {
    background-color: #ffffff !important;
    border: 1px solid #e8ebf0 !important;
    border-radius: 0.75rem;
    min-height: 48px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    box-shadow: none;
}

[dir="rtl"] .location-filter-select2-wrap--appointments .select2-container--default .select2-selection--single {
    padding: 0.625rem 1rem 0.625rem 2.5rem;
}

.location-filter-select2-wrap--appointments .select2-container--default .select2-selection--single .select2-selection__rendered,
.location-filter-select2-wrap--appointments .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #334155;
    text-align: center;
}

.location-filter-select2-wrap--appointments .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #64748b;
}

.location-filter-select2-wrap--appointments .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #ffffff !important;
    border: 1px solid #e8ebf0 !important;
    opacity: 1;
    cursor: not-allowed;
}

.location-filter-select2-wrap--appointments .select2-container--default.select2-container--disabled .select2-selection__rendered,
.location-filter-select2-wrap--appointments .select2-container--default.select2-container--disabled .select2-selection__placeholder {
    color: #64748b;
}

.location-filter-select2-wrap--appointments .select2-container--default.location-filter-has-value .select2-selection--single {
    border-color: #EF8943 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(239, 137, 67, 0.16);
}

.location-filter-select2-wrap--appointments .select2-container--default.select2-container--focus .select2-selection--single,
.location-filter-select2-wrap--appointments .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #EF8943 !important;
    background: #ffffff !important;
    color: #334155;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 137, 67, 0.16);
}

.location-filter-select2-wrap--appointments .select2-container--default.select2-container--open .select2-selection--single {
    border-bottom-color: #EF8943 !important;
    border-radius: 0.75rem 0.75rem 0 0;
}

.location-filter-select2-wrap--appointments .select2-container .select2-selection--single .select2-search--inline .select2-search__field {
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
}

.home-filters-row--location .location-filter-select2-wrap:focus-within,
.home-filters-row--location .location-filter-select2-wrap:has(.select2-container--open) {
    z-index: 50;
}

.select2-dropdown.location-filter-select2-dropdown .select2-results__option--highlighted,
.select2-dropdown.location-filter-select2-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
}
