/**
 * Estilos personalizados para Select2 en filtros de tabla
 * Mantiene el aspecto compacto y discreto similar a los inputs form-control-sm
 */

/* Contenedor principal del Select2 en filtros */
.table-filter-select2 + .select2-container {
    font-size: 0.875rem !important;
    display: block !important;
}

/* Campo de selección (cuando está cerrado) */
.table-filter-select2 + .select2-container .select2-selection--single {
    height: calc(1.5em + 0.5rem + 2px) !important;
    min-height: calc(1.5em + 0.5rem + 2px) !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 0.2rem !important;
    border: 1px solid #ced4da !important;
    background-color: #fff !important;
}

/* Texto renderizado */
.table-filter-select2 + .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    padding-right: 20px !important;
    line-height: 1.5 !important;
    font-weight: normal !important;
    color: #495057 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Flecha del selector */
.table-filter-select2 + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0 !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.table-filter-select2 + .select2-container .select2-selection--single .select2-selection__arrow b {
    margin-top: 0 !important;
}

/* Placeholder */
.table-filter-select2 + .select2-container .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
    font-weight: normal !important;
}

/* Estado focus */
.table-filter-select2 + .select2-container--focus .select2-selection--single {
    border-color: #80bdff !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Dropdown (lista de opciones) - Solo para filtros de tabla */
.select2-dropdown.table-filter-dropdown {
    font-size: 0.875rem !important;
    border-color: #ced4da !important;
}

.select2-dropdown.table-filter-dropdown .select2-results__option {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

/* Campo de búsqueda dentro del dropdown */
.select2-dropdown.table-filter-dropdown .select2-search--dropdown .select2-search__field {
    font-size: 0.875rem !important;
    padding: 0.25rem 0.5rem !important;
}

