/*!
 * Select2 Tabler Override
 * Uniforma Select2 con gli stili nativi .form-select di Tabler
 * Caricato DOPO select2-bootstrap-5-theme.min.css per sovrascrivere
 */

/* ========================================
   CONTAINER PRINCIPALE
   ======================================== */
.select2-container--bootstrap-5 .select2-selection--single {
    padding: 0.4375rem 2.25rem 0.4375rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4285714286 !important;
    font-weight: 400 !important;
    height: auto !important;
    min-height: calc(1.5em + 0.875rem + 2px) !important;
}

/* Testo selezionato */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.4285714286 !important;
    padding: 0 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

/* ========================================
   DROPDOWN OPZIONI
   ======================================== */

/* Singola opzione - dimensioni uniformi */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__option {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4285714286 !important;
    font-weight: 400 !important;
}

/* HOVER - sfondo blu chiaro Tabler */
.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option--highlighted {
    color: inherit !important;
    background-color: rgba(32, 107, 196, 0.06) !important;
}

/* SELECTED - opzione selezionata (testo blu + grassetto + sfondo chiaro) */
.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"],
.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"],
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option--selected {
    color: #206bc4 !important;
    background-color: rgba(32, 107, 196, 0.06) !important;
    font-weight: 600 !important;
}

/* SELECTED + HOVER - opzione selezionata in hover (sfondo più scuro) */
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected="true"],
.select2-container--bootstrap-5 .select2-results__option.select2-results__option--highlighted[aria-selected="true"],
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option--highlighted[aria-selected="true"] {
    color: #206bc4 !important;
    background-color: rgba(32, 107, 196, 0.12) !important;
    font-weight: 600 !important;
}

/* ========================================
   CAMPO DI RICERCA NEL DROPDOWN
   ======================================== */
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    font-size: 0.875rem !important;
    line-height: 1.4285714286 !important;
}

/* ========================================
   FORM SELECT VARIANTS
   ======================================== */

/* Small variant */
.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single,
.select2-container--bootstrap-5 .select2--small.select2-selection--single {
    padding: 0.25rem 2.25rem 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

/* Large variant */
.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--single,
.select2-container--bootstrap-5 .select2--large.select2-selection--single {
    padding: 0.5rem 2.25rem 0.5rem 1rem !important;
    font-size: 1.25rem !important;
}
