/* Custom CSS for Select2 Dark Mode */

/* Fixes the main select box background, border, and text color */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
    background-color: #343a40;
    color: #f8f9fa;
    border: 1px solid #495057;
}

/* Fixes the text color of the selected item in a single-select box */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-selection__rendered {
    color: #f8f9fa;
}

/* Fixes the dropdown menu background and border */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background-color: #343a40;
    border: 1px solid #495057;
}

/* Fixes the text color for all options in the dropdown list */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-results__option {
    color: #f8f9fa;
}

/* Fixes the hover/highlighted option background and text color */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #495057 !important;
    color: #ffffff !important;
}

/* Fixes the search input field within the dropdown */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    background-color: #495057;
    color: #f8f9fa;
    border: 1px solid #6c757d;
}

/* --- FIX FOR MULTIPLE SELECTION TAGS --- */

/* Fixes the background, border, and text color for each selected tag */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #495057;
    border: 1px solid #6c757d;
    color: #f8f9fa;
}

/* Fixes the color of the remove 'x' icon on each tag */
html[data-coreui-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #f8f9fa;
}

/*html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {*/
/*    color: #dee2e6 !important;*/
/*}*/


.readonly {
    cursor: not-allowed !important;
}

.readonly[aria-disabled="true"] {
    pointer-events: auto;
}

/* MINIMIZE FULLSCREEN BUTTON */
html[data-coreui-theme="dark"] .minimize-fullscreen .btn .icon {
    color: #eeeeee !important;
}

/* ================================================
   Bootstrap Datepicker Dark Mode Override for CoreUI
   Target: html[data-coreui-theme="dark"]
   Covers: Days, Months, Years, Decades
================================================ */

/* Base hover styling for all table cells & spans (days, months, years, decades) */
html[data-coreui-theme="dark"] .datepicker table tr td:hover,
html[data-coreui-theme="dark"] .datepicker table tr th:hover,
html[data-coreui-theme="dark"] .datepicker table tr td.day:hover,
html[data-coreui-theme="dark"] .datepicker table tr td span:hover {
    background-color: #444 !important; /* dark hover */
    color: #fff !important;
    border-radius: 4px;
}

/* Active (selected) date/month/year/decade */
html[data-coreui-theme="dark"] .datepicker table tr td.active,
html[data-coreui-theme="dark"] .datepicker table tr td.active:hover,
html[data-coreui-theme="dark"] .datepicker table tr td span.active,
html[data-coreui-theme="dark"] .datepicker table tr td span.active:hover {
    background-color: #0d6efd !important; /* Bootstrap primary */
    color: #fff !important;
    border-radius: 4px;
}

/* Focused (keyboard navigation or hover highlight) */
html[data-coreui-theme="dark"] .datepicker table tr td.focused,
html[data-coreui-theme="dark"] .datepicker table tr td span.focused {
    background-color: #444 !important;
    color: #fff !important;
    border-radius: 4px;
}

/* Disabled dates */
html[data-coreui-theme="dark"] .datepicker table tr td.disabled,
html[data-coreui-theme="dark"] .datepicker table tr td.disabled:hover,
html[data-coreui-theme="dark"] .datepicker table tr td span.disabled,
html[data-coreui-theme="dark"] .datepicker table tr td span.disabled:hover {
    background-color: transparent !important;
    color: #777 !important;
    cursor: not-allowed !important;
}

/* Navigation arrows hover */
html[data-coreui-theme="dark"] .datepicker .datepicker-switch:hover,
html[data-coreui-theme="dark"] .datepicker .prev:hover,
html[data-coreui-theme="dark"] .datepicker .next:hover {
    background-color: #444 !important;
    color: #fff !important;
    border-radius: 4px;
}

.sidebar li {
    /*font-size: 95%;*/
}