/* Custom CSS para Select2 - Mantener diseño consistente con Bootstrap form-control */

/* El campo de selección en el formulario - estilo Bootstrap form-control */
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.select2-container--bootstrap4 .select2-selection--single:focus {
    color: #495057 !important;
    background-color: #fff !important;
    border-color: #80bdff !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Texto seleccionado */
.select2-container--bootstrap4 .select2-selection__rendered {
    color: #495057 !important;
    line-height: 1.5 !important;
    padding-left: 0 !important;
    padding-right: 1.75rem !important;
}

/* Placeholder */
.select2-container--bootstrap4 .select2-selection__placeholder {
    color: #6c757d !important;
}

/* Arrow indicator */
.select2-container--bootstrap4 .select2-selection__arrow {
    height: calc(1.5em + 0.75rem) !important;
    top: 1px !important;
    right: 1px !important;
    width: 2rem !important;
}

.select2-container--bootstrap4 .select2-selection__arrow b {
    border-color: #495057 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

.select2-container--bootstrap4.select2-container--open .select2-selection__arrow b {
    border-color: transparent transparent #495057 transparent !important;
    border-width: 0 4px 5px 4px !important;
}

/* Clear button */
.select2-container--bootstrap4 .select2-selection__clear {
    color: #495057 !important;
    margin-right: 0.5rem !important;
}

/* Dropdown de Select2 */
.select2-container--bootstrap4 .select2-dropdown {
    background-color: #fff !important;
    border: 1px solid rgba(0,0,0,.15) !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175) !important;
}

/* Opciones del dropdown */
.select2-container--bootstrap4 .select2-results__option {
    padding: 0.5rem 0.75rem !important;
    color: #212529 !important;
    background-color: #fff !important;
}

.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: #007bff !important;
    color: #fff !important;
}

.select2-container--bootstrap4 .select2-results__option[aria-selected="true"] {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Grupo de opciones */
.select2-container--bootstrap4 .select2-results__group {
    color: #6c757d !important;
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Campo de búsqueda dentro del dropdown */
.select2-search--dropdown {
    padding: 0.5rem !important;
    background-color: #f8f9fa !important;
}

.select2-search--dropdown .select2-search__field {
    padding: 0.375rem 0.75rem !important;
    color: #495057 !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    font-size: 1rem !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #80bdff !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Mensaje de "No se encontraron resultados" */
.select2-container--bootstrap4 .select2-results__option--disabled {
    color: #6c757d !important;
}

/* Asegurar que el container tenga el ancho correcto */
.select2-container--bootstrap4 {
    width: 100% !important;
}
