/**
 * RECURSOS BUSCADOR - ESTILOS PERSONALIZADOS
 * Sobrescribe estilos de la librería msDropDown y define la apariencia del sidebar.
 * Color Principal: #D457F2 (Morado)
 */

/* ========================================================================== */
/*   1. CORE OVERRIDES - msDropDown (.dd) */
/*   Estilos base para transformar el select antiguo en el diseño moderno 'Pill' */
/* ========================================================================== */

/* Contenedor Principal */
.dd {
    border: 2px solid #D457F2 !important;
    border-radius: 23px !important;
    height: 46px !important;
    width: 100% !important;
    margin-bottom: 15px;
    box-shadow: 0px 3px 25px #ACB4E353 !important;
    background-color: #fff !important; /* Asegura fondo blanco */
}

/* Cabecera (Parte visible del select cerrado) */
.dd .ddTitle {
    background: none !important;
    border: none !important;
    border-radius: 20px !important;
    height: 44px !important;
    padding: 0 15px !important;
    display: flex;
    align-items: center;
}

/* Texto dentro de la cabecera */
.dd .ddTitle .ddTitleText {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
    /*font-size: 13px;*/
    /*color: #555;*/
    /*font-weight: 500;*/
}

/* Limpieza de elementos internos de msDropDown (flechas/dividers por defecto) */
.dd .ddTitle .divider {
    background: none !important;
    box-shadow: none !important;
}

/* Ajuste de la flecha al hacer hover cuando está abierto */
.ddTitle.borderRadiusTp:hover .ddArrow {
    background-position: unset !important;
}

/* ========================================================================== */
/*   2. DROPDOWN LIST (.ddChild) */
/*   La lista de opciones que se despliega */
/* ========================================================================== */

.dd .ddChild {
    display: none; /* Asegura que arranque oculto */
    position: absolute !important; /* Vital para que flote sobre el contenido */
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    /*background-color: #fff !important;*/
    /*width: 100% !important;*/
    /*z-index: 9999; Asegurar prioridad visual */
    /*margin-top: 2px !important;*/
    /*border: 1px solid #D457F2 !important;*/
}

/* Elementos de la lista (Options) */
.dd .ddChild li {
    padding: 8px 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

/* OCULTAR PLACEHOLDER: La primera opción nunca se muestra en la lista desplegable */
.dd .ddChild li:first-child {
    display: none !important;
}

/* Estado Deshabilitado (Visual) */
.ddChild li.disabled {
    cursor: default !important;
    opacity: 0.6;
    background-color: #f9f9f9 !important;
    color: #999 !important;
}

/* ========================================================================== */
/*   3. SKIN CHECKBOX (Para Multi-Select) */
/*   Convierte la lista en una serie de checkboxes mediante CSS */
/*   Requiere que el contenedor tenga la clase .skin-checkbox */
/* ========================================================================== */

/* Cuadrado base (Desmarcado) */
.skin-checkbox .ddChild li::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #999;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: middle;
    background-color: #fff;
    transition: all 0.2s ease;
}

/* Cuadrado SELECCIONADO (Marcado con tick) */
.skin-checkbox .ddChild li.selected::before {
    background-color: #D457F2;
    border-color: #D457F2;
    content: '\2714'; /* Unicode Check (✔) */
    color: #fff;
    font-size: 11px;
    line-height: 13px;
    text-align: center;
}

/* Hover en el checkbox */
.skin-checkbox .ddChild li:hover::before {
    border-color: #D457F2;
}

/* Estilo de la fila seleccionada (Texto normal, no resaltado completo) */
.skin-checkbox .ddChild li.selected {
    background-color: #fff !important;
    color: #333 !important;
    font-weight: bold;
}

/* Limpieza de pseudo-elementos antiguos */
.skin-checkbox .ddChild li.selected::after {
    content: none !important;
}

/* Ajuste visual para opción deshabilitada en modo checkbox */
.skin-checkbox .ddChild li.disabled::before {
    border-color: #ccc;
    background-color: #eee;
}

/* ========================================================================== */
/*   4. UI COMPONENTES SIDEBAR */
/*   Botones y enlaces específicos del buscador */
/* ========================================================================== */

/* Botón Principal "Buscar" */
.recurso-menu-lateral #btn-bsqd {
    display: block;
    background-color: #D457F2;
    color: #fff !important;
    text-align: center;
    padding: 12px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease;
}

/*.recurso-menu-lateral #btn-bsqd:hover {*/
/*    background-color: #b54290;*/
/*    text-decoration: none;*/
/*}*/

.recurso-menu-lateral #btn-bsqd i {
    color: #fff !important;
    margin-right: 5px;
}

/* Enlace "Borrar todos los filtros" */
.recurso-menu-lateral #btn-borrar-filtros {
    text-decoration: underline;
    letter-spacing: 0px;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.recurso-menu-lateral #btn-borrar-filtros:hover {
    color: #D457F2;
}