/* ================================================
   DataSelectManager CSS - Estilos para Select2
   Compatible con Bootstrap 3
   ================================================ */

/* ==================== ESTILOS BASE ==================== */

/* Select Simple - Adaptado a Bootstrap 3 .form-control */
.select2-container .select2-selection--single {
    height: 34px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    line-height: 1.42857143;
    text-align: center;
    background-color: #fff;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 20px;
    color: #555;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
    right: 6px;
}

/* Select Múltiple - Adaptado a Bootstrap 3 */
.select2-container {
    flex-grow: 1;
}

.select2-container .select2-selection--multiple {
    min-height: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #337ab7;
    border: 1px solid #2e6da4;
    color: #fff;
    border-radius: 3px;
    padding: 0 6px;
    margin-top: 5px;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

.select2-container--default .select2-search--inline .select2-search__field {
    padding-left: 10px;
    margin-top: 5px;
}

/* ==================== ESTADOS ==================== */

/* Focus */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

/* Disabled */
.select2-container--default .select2-selection--single.select2-selection--disabled,
.select2-container--default .select2-selection--multiple.select2-selection--disabled {
    background-color: #eeeeee;
    cursor: not-allowed;
    opacity: 0.65;
}

/* ==================== ESTADOS DE VALIDACIÓN ==================== */

/* Success */
.has-success .select2-container .select2-selection--single,
.has-success .select2-container .select2-selection--multiple {
    border-color: #3c763d;
}

.has-success .select2-container--default.select2-container--focus .select2-selection--single,
.has-success .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #2b542c;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #67b168;
}

/* Error */
.has-error .select2-container .select2-selection--single,
.has-error .select2-container .select2-selection--multiple {
    border-color: #a94442;
}

.has-error .select2-container--default.select2-container--focus .select2-selection--single,
.has-error .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #843534;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #ce8483;
}

/* Warning */
.has-warning .select2-container .select2-selection--single,
.has-warning .select2-container .select2-selection--multiple {
    border-color: #8a6d3b;
}

.has-warning .select2-container--default.select2-container--focus .select2-selection--single,
.has-warning .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #66512c;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #c0a16b;
}

/* ==================== TAMAÑOS ==================== */

/* Small (sm) */
.input-sm + .select2-container .select2-selection--single,
.select2-container--small .select2-selection--single {
    height: 30px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.input-sm + .select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--small .select2-selection--single .select2-selection__rendered {
    line-height: 18px;
}

.input-sm + .select2-container .select2-selection--single .select2-selection__arrow,
.select2-container--small .select2-selection--single .select2-selection__arrow {
    height: 28px;
}

.input-sm + .select2-container .select2-selection--multiple,
.select2-container--small .select2-selection--multiple {
    min-height: 30px;
    font-size: 12px;
}

/* Large (lg) */
.input-lg + .select2-container .select2-selection--single,
.select2-container--large .select2-selection--single {
    height: 46px;
    padding: 10px 16px;
    font-size: 18px;
    line-height: 1.33;
    border-radius: 6px;
}

.input-lg + .select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--large .select2-selection--single .select2-selection__rendered {
    line-height: 24px;
}

.input-lg + .select2-container .select2-selection--single .select2-selection__arrow,
.select2-container--large .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

.input-lg + .select2-container .select2-selection--multiple,
.select2-container--large .select2-selection--multiple {
    min-height: 46px;
    font-size: 18px;
}

/* ==================== DROPDOWN ==================== */

/* Contenedor del dropdown */
.select2-container--default .select2-results > .select2-results__options {
    max-height: 300px;
    overflow-y: auto;
}

/* Opciones */
.select2-container--default .select2-results__option {
    padding: 6px 12px;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #ddd;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #337ab7;
    color: white;
}

/* Sin resultados */
.select2-container--default .select2-results__option--disabled {
    color: #999;
}

/* ==================== BÚSQUEDA ==================== */

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

/* ==================== UTILIDADES ==================== */

/* Width 100% */
.select2-container--full-width {
    width: 100% !important;
}

/* Ocultar flecha */
.select2-container--no-arrow .select2-selection__arrow {
    display: none;
}

/* Modo loading */
.select2-container--loading .select2-selection__rendered {
    color: #999;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 767px) {
    .select2-container .select2-selection--single {
        height: 40px;
        padding: 8px 12px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 22px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 38px;
    }
}