﻿/* ================================================= */
/* --- SELECT2 STYLING (THEME-AWARE) --- */
/* ================================================= */

/* --- 1. Light Theme (Default) --- */
:root[data-theme="light"] {
    /* Selected Value Display Box */
    .select2-container--default .select2-selection--single {
        background-color: #ffffff; /* White background */
        border-color: #ced4da; /* Light border */
    }
        /* Selected Text inside the box */
        .select2-container--default .select2-selection--single .select2-selection__rendered {
            color: #000000; /* Black text */
        }
    /* Dropdown Panel */
    .select2-dropdown {
        background-color: #ffffff; /* White background for options */
        border-color: #ced4da;
    }
    /* Options List Text Color */
    .select2-results__option {
        color: #000000; /* Black text for options */
    }
    /* Highlighted (hover/focus) option */
    .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
        background-color: #0d6efd; /* Standard Blue highlight */
        color: #fff; /* White text on highlight */
    }
}


/* --- 2. Dark Theme Overrides --- */
:root[data-theme="dark"] {
    /* Selected Value Display Box */
    .select2-container--default .select2-selection--single {
        background-color: #1e1e1e !important; /* Dark background (Matching bootbox) */
        border-color: #555 !important; /* Lighter border */
    }
        /* Selected Text inside the box */
        .select2-container--default .select2-selection--single .select2-selection__rendered {
            color: #f1f1f1 !important; /* Light text (Matching bootbox) */
        }
    /* Dropdown Panel */
    .select2-dropdown {
        background-color: #1e1e1e !important; /* Dark background for options */
        border-color: #555 !important;
    }
    /* Options List Text Color */
    .select2-results__option {
        color: #f1f1f1 !important; /* Light text for options */
    }
    /* Highlighted (hover/focus) option */
    .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
        background-color: #0d6efd !important; /* Keep distinct highlight */
        color: #fff !important;
    }
    /* Search Input within the dropdown */
    .select2-search__field {
        background-color: #343a40 !important; /* Slightly lighter dark for input field */
        color: #f1f1f1 !important;
        border-color: #555 !important;
    }
}
/* --- General Form Controls Dark Theme Override --- */

:root[data-theme="dark"] {
    /* ... (existing bootbox and select2 styles) ... */
    /* Target standard inputs, textareas, and basic selects */
    .form-control,
    .form-control:focus,
    .form-select {
        /* Use !important if standard framework styles are overriding */
        background-color: #1e1e1e !important; /* Dark background matching bootbox */
        color: #f1f1f1 !important; /* Light text matching bootbox */
        border-color: #555 !important;
    }
        /* Ensure placeholder text is visible */
        .form-control::placeholder {
            color: #999 !important; /* Lighter color for placeholder */
        }
}