/* ========================================
   Select2 Dark Mode Styles
   Color and theme-specific styling for dark mode
   Matches Metronic Demo 14 dark theme
   ======================================== */

/* ========================================
   SELECTION CONTAINERS
   ======================================== */

[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

/* ========================================
   TEXT AND PLACEHOLDER COLORS
   ======================================== */

/* Text color in selection */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: var(--bs-body-color) !important;
}

/* Placeholder text */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder,
[data-bs-theme="dark"] .select2-container--default .select2-search--inline .select2-search__field {
    color: var(--bs-gray-500) !important;
    background-color: transparent !important;
}

/* Search field in multiple select */
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    background-color: transparent !important;
    color: var(--bs-body-color) !important;
}

/* ========================================
   TAG CHIPS (Multiple Select)
   ======================================== */

/* Selected tag chips */
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--bs-gray-800) !important;
    border-color: var(--bs-gray-700) !important;
    color: var(--bs-gray-200) !important;
}

/* Remove button on tags */
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--bs-gray-400) !important;
    border-right-color: var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: var(--bs-gray-600) !important;
    color: var(--bs-gray-100) !important;
}

/* ========================================
   DROPDOWN STYLES
   ======================================== */

/* Dropdown container */
[data-bs-theme="dark"] .select2-dropdown {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
}

/* Dropdown options */
[data-bs-theme="dark"] .select2-results__option {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--selected {
    background-color: var(--bs-gray-800) !important;
}

/* Search box in dropdown */
[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}
