/* ===============================
Scoped Overrides (Admin layout)
=============================== */
.select-admin-country+.select2-container--default .select2-selection--single,
.select-admin-region+.select2-container--default .select2-selection--single {
    border: 1px solid #6b7280 !important;
    height: 39.59px !important;
    border-radius: 0 !important;
    padding-top: 0.25rem !important;
    padding-right: 0.75rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.75rem !important;
}

/* Selected value text */
.select-admin-country+.select2-container--default .select2-selection--single .select2-selection__rendered,
.select-admin-region+.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #495057 !important;
    font-size: 1rem !important;
    padding: 0 !important;
}

/* ===============================
   Global Select2 Overrides
   =============================== */

/* Main Select2 container - white background, black border */
.select2-container--default .select2-selection--single {
    background-color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0.25rem !important;
    height: auto !important;
    /* allow padding to control height */
    display: flex;
    align-items: center;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-sizing: border-box;
}

/* Selected value text - black color */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000 !important;
    line-height: 1.25rem !important;
    /* adjusted for padding */
    font-size: 1rem !important;
}

/* Placeholder text - gray color */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6b7280 !important;
}

/* Dropdown container - white background with black border */
.select2-container--default .select2-dropdown {
    background-color: #fff !important;
    border: 1px solid #000 !important;
}

/* Dropdown options - black text on white background */
.select2-container--default .select2-results__option {
    color: #000 !important;
    background-color: #fff !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
}

/* Highlighted/hovered option - light gray background with black text */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #e5e7eb !important;
    /* light gray highlight */
    color: #000 !important;
    /* black text */
    font-size: 1rem !important;
}

/* Selected option in dropdown */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f3f4f6 !important;
    color: #000 !important;
}

/* Search input in dropdown - white background, black border, black text */
.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 0.25rem !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
}

/* Clear button (X) - black color */
.select2-selection__clear {
    color: #000 !important;
    margin-right: 0 !important;
    font-weight: bold !important;
}

/* Dropdown arrow container */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.75rem !important;
    top: 0 !important;
    width: 1.25rem !important;
}

/* Dropdown arrow - black color */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-width: 6px 6px 0 6px !important;
    border-color: #000 transparent transparent transparent !important;
}

/* Focus state - black border with subtle shadow */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #000 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1) !important;
}

/* No results message */
.select2-results__message {
    color: #6b7280 !important;
}

/* ===============================
Scoped Overrides (Home page talent search)
=============================== */

/* Scoped styles for only home page talent search */
.select2-home-search+.select2-container--default .select2-selection--single {
    background-color: #000 !important;
    /* Example: black bg */
    border: 1px solid #f4d505 !important;
    /* Example: blue border */
    color: #fff !important;
    /* Example: white text */
    border-radius: 0 !important;
    padding: 0 1vw !important;
    /* Changed to horizontal padding only */
    height: 52px !important;
    min-height: 52px !important;
}

/* Selected value text */
.select2-home-search+.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #aaaaaa !important;
}

/* Placeholder */
.select2-home-search+.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6B7280 !important;
    /* Tailwind gray-400 */
}

/* Dropdown container */
.select2-dropdown.select-home-port,
.select2-dropdown.select-region,
.select2-dropdown.select-country {
    background-color: #111 !important;
    border: 1px solid #f4d505 !important;
}

/* Dropdown options */
.select2-dropdown.select-home-port .select2-results__option,
.select2-dropdown.select-region .select2-results__option,
.select2-dropdown.select-country .select2-results__option {
    color: #9ca3af !important;
    background-color: #111 !important;
    padding: 0.75rem !important;
}

/* Highlighted option */
.select2-dropdown.select-home-port .select2-results__option--highlighted[aria-selected],
.select2-dropdown.select-region .select2-results__option--highlighted[aria-selected],
.select2-dropdown.select-country .select2-results__option--highlighted[aria-selected] {
    background-color: #2563eb !important;
    /* blue-600 */
    color: #9ca3af !important;
}

/* Input field inside the dropdown */
.select2-dropdown.select-home-port .select2-search__field,
.select2-dropdown.select-region .select2-search__field,
.select2-dropdown.select-country .select2-search__field {
    background-color: #111 !important;
    color: #9ca3af !important;
    border: 1px solid #f4d505 !important;
    padding: 0.5rem !important;
}

.select2-dropdown.select-home-port .select2-search__field:focus,
.select2-dropdown.select-region .select2-search__field:focus,
.select2-dropdown.select-country .select2-search__field:focus {
    outline: none !important;
    border-color: #f4d505 !important;
    box-shadow: none !important;
}

/* Clear button (X) - black color */
.select-home-port~.select2-container .select2-selection__clear {
    color: #f4d505 !important;
    margin-right: 0 !important;
    font-weight: bold !important;
    padding-right: 8px;
    height: auto !important;
}

#select2-homePort-container,
#select2-region-container,
#select2-country-container {
    padding-left: 0
}