/* ========================================
   ESTILOS DE ALTO CONTRASTE PARA RESULTADOS DE BÚSQUEDA
   ========================================
   
   Archivo complementario para high-contrast.css
   Específico para páginas de resultados de búsqueda
*/

/* ========================================
   RESULTADOS DE BÚSQUEDA - KENDO LISTVIEW
   ======================================== */

/**
 * Contenedor principal del ListView de resultados
 */
body.high-contrast-mode #listView {
    background-color: #000000 !important;
    border: 2px solid #4A9EFF !important;
}

/**
 * Cards de resultados individuales (k-card)
 */
body.high-contrast-mode .k-card {
    background-color: #0A0A0A !important;
    border: 3px solid #4A9EFF !important;
    box-shadow: none !important;
    margin: 1.5rem !important;
    transition: none !important;
}

body.high-contrast-mode .k-card:hover {
    box-shadow: none !important;
    transform: none !important;
}

/**
 * Encabezado de las cards (k-card-header)
 * Fondo azul institucional con texto blanco
 */
body.high-contrast-mode .k-card-header {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    border-bottom: 3px solid #4A9EFF !important;
    font-weight: bold !important;
}

body.high-contrast-mode .k-card-header label,
body.high-contrast-mode .k-card-header a,
body.high-contrast-mode .k-card-header span {
    color: #FFFFFF !important;
}

/**
 * Enlaces en el encabezado (Ver descriptores, etc.)
 */
body.high-contrast-mode .k-card-header a,
body.high-contrast-mode .cardButtonEnlace {
    color: #FFD700 !important;
    text-decoration: underline !important;
    background-color: transparent !important;
    border: none !important;
}

body.high-contrast-mode .k-card-header a:hover,
body.high-contrast-mode .cardButtonEnlace:hover {
    color: #FFFFFF !important;
    background-color: #0080FF !important;
    outline: 2px solid #FFD700 !important;
}

/**
 * Cuerpo de las cards (k-card-body)
 */
body.high-contrast-mode .k-card-body {
    background-color: #0A0A0A !important;
    color: #FFFFFF !important;
}

body.high-contrast-mode .k-card-body .details {
    color: #FFFFFF !important;
}

body.high-contrast-mode .k-card-title {
    color: #FFFFFF !important;
}

/**
 * Checkboxes en las cards de resultados
 */
body.high-contrast-mode .k-card-header input[type="checkbox"] {
    background-color: #FFFFFF !important;
    border: 3px solid #4A9EFF !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

body.high-contrast-mode .k-card-header input[type="checkbox"]:checked {
    background-color: #FFD700 !important;
    border: 3px solid #4A9EFF !important;
}

/**
 * Botones dentro de las cards
 */
body.high-contrast-mode .cardButton1,
body.high-contrast-mode .cardButton2,
body.high-contrast-mode .k-card .buttons button {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    border: 3px solid #4A9EFF !important;
    font-weight: bold !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem !important;
}

body.high-contrast-mode .cardButton1 {
    background-color: #000000 !important;
    color: #4A9EFF !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .cardButton1:hover,
body.high-contrast-mode .cardButton2:hover,
body.high-contrast-mode .k-card .buttons button:hover {
    background-color: #FFD700 !important;
    color: #000000 !important;
    border: 3px solid #FFFFFF !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7) !important;
}

/* ========================================
   PAGINADOR DE KENDO (k-pager)
   ======================================== */

body.high-contrast-mode .k-pager,
body.high-contrast-mode .k-pager-wrap {
    background-color: #0A0A0A !important;
    color: #FFFFFF !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .k-pager-numbers .k-link,
body.high-contrast-mode .k-pager-nav,
body.high-contrast-mode .k-pager .k-link {
    background-color: #000000 !important;
    color: #4A9EFF !important;
    border: 2px solid #4A9EFF !important;
    margin: 0 0.25rem !important;
}

body.high-contrast-mode .k-pager-numbers .k-link:hover,
body.high-contrast-mode .k-pager-nav:hover,
body.high-contrast-mode .k-pager .k-link:hover {
    background-color: #0066CC !important;
    color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
}

body.high-contrast-mode .k-pager-numbers .k-state-selected,
body.high-contrast-mode .k-pager .k-state-selected {
    background-color: #0066CC !important;
    color: #FFD700 !important;
    border: 3px solid #FFD700 !important;
    font-weight: bold !important;
}

body.high-contrast-mode .k-pager-info {
    color: #FFFFFF !important;
}

/**
 * Selectores de tamaño de página
 */
body.high-contrast-mode .k-pager-sizes select,
body.high-contrast-mode .k-pager-sizes .k-dropdown {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
}

/* ========================================
   CARDS PERSONALIZADAS DE RESULTADOS
   ======================================== */

body.high-contrast-mode .resultado-card,
body.high-contrast-mode .busqueda-card-row {
    background-color: #0A0A0A !important;
    border: 3px solid #4A9EFF !important;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5) !important;
}

body.high-contrast-mode .busqueda-card-row.header {
    background-color: #0066CC !important;
    border-bottom: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .busqueda-card-row.header label,
body.high-contrast-mode .busqueda-card-row.header a,
body.high-contrast-mode .busqueda-card-row.header span {
    color: #FFFFFF !important;
}

body.high-contrast-mode .busqueda-card-row.header a {
    color: #FFD700 !important;
}

body.high-contrast-mode .busqueda-card-row.header a:hover {
    color: #FFFFFF !important;
    background-color: #0080FF !important;
}

/* ========================================
   SCROLL TOGGLE PARA ARTÍCULOS
   ======================================== */

body.high-contrast-mode .scroll-toggle {
    background-color: #0A0A0A !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .scroll-toggle-button {
    background-color: #0066CC !important;
    border: 2px solid #4A9EFF !important;
}

body.high-contrast-mode .scroll-toggle-button:hover {
    background-color: #FFD700 !important;
}

body.high-contrast-mode .scroll-toggle-button span {
    color: #FFFFFF !important;
}

body.high-contrast-mode .scroll-toggle-list {
    background-color: #000000 !important;
    border-left: 2px solid #4A9EFF !important;
    border-right: 2px solid #4A9EFF !important;
}

body.high-contrast-mode .scroll-toggle-list li {
    color: #FFFFFF !important;
}

/* ========================================
   ENLACES EN RESULTADOS
   ======================================== */

body.high-contrast-mode .k-link {
    color: #4A9EFF !important;
    text-decoration: underline !important;
}

body.high-contrast-mode .k-link:hover {
    color: #FFD700 !important;
    background-color: #001133 !important;
}

/* ========================================
   BÚSQUEDA ENTRE RESULTADOS
   ======================================== */

body.high-contrast-mode #textBuscar {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode #textBuscar:focus {
    background-color: #FFFACD !important;
    border: 3px solid #FFD700 !important;
    outline: 3px solid #4A9EFF !important;
}

body.high-contrast-mode #btnBuscar,
body.high-contrast-mode #btnLimpiar {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode #btnBuscar:hover,
body.high-contrast-mode #btnLimpiar:hover {
    background-color: #FFD700 !important;
    color: #000000 !important;
    border: 3px solid #FFFFFF !important;
}

/* ========================================
   LABELS Y TEXTOS DE FORMULARIOS EN RESULTADOS
   ======================================== */

/**
 * Labels de los controles de ordenamiento y búsqueda
 * Solo mejora color, mantiene formato original
 */
body.high-contrast-mode .form-group label,
body.high-contrast-mode label[for],
body.high-contrast-mode .control-label {
    color: #FFFFFF !important;
}

/**
 * Labels específicos para controles de resultados
 * Amarillo oro para mejor visibilidad
 */
body.high-contrast-mode label[for="OrdenarPor"],
body.high-contrast-mode label[for="Dir"],
body.high-contrast-mode label[for="CantidadResultados"],
body.high-contrast-mode label[for="textBuscar"] {
    color: #FFD700 !important;
}

/**
 * Tooltips e iconos de información junto a labels
 */
body.high-contrast-mode .boton-icono,
body.high-contrast-mode .info-icon {
    background-color: #0066CC !important;
    border: 2px solid #4A9EFF !important;
    border-radius: 50% !important;
    padding: 0.25rem !important;
}

body.high-contrast-mode .boton-icono:hover,
body.high-contrast-mode .boton-icono:focus {
    background-color: #FFD700 !important;
    border: 2px solid #FFFFFF !important;
    outline: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .info-icon {
    filter: brightness(2) contrast(1.5) !important;
}

/* ========================================
   DROPDOWNS DE ORDENAMIENTO
   ======================================== */

/**
 * Selectores de Kendo con alto contraste
 * Mantiene formato original, solo mejora contraste de colores
 */
body.high-contrast-mode .k-dropdown,
body.high-contrast-mode .k-combobox,
body.high-contrast-mode .k-dropdown-wrap,
body.high-contrast-mode .k-picker-wrap {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
    font-size: 1rem !important;
}

body.high-contrast-mode .k-dropdown:hover,
body.high-contrast-mode .k-combobox:hover,
body.high-contrast-mode .k-dropdown:focus,
body.high-contrast-mode .k-combobox:focus {
    border: 3px solid #FFD700 !important;
    outline: 3px solid #4A9EFF !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

/**
 * Texto seleccionado dentro del dropdown
 * REGLA REFORZADA: Garantiza texto negro sobre fondo blanco.
 */
body.high-contrast-mode .k-dropdown .k-input,
body.high-contrast-mode .k-combobox .k-input,
body.high-contrast-mode .k-dropdown-wrap .k-input,
body.high-contrast-mode .k-input-inner,
body.high-contrast-mode .k-input-value-text,
body.high-contrast-mode span.k-input-value-text {
    color: #000000 !important;
    background-color: #FFFFFF !important;
    text-shadow: none !important;
}

/**
 * REGLA ADICIONAL: Asegura que el span interno también tenga texto negro.
 */
body.high-contrast-mode .k-dropdown .k-input span,
body.high-contrast-mode .k-combobox .k-input span,
body.high-contrast-mode .k-dropdown-wrap span,
body.high-contrast-mode .k-input-inner span {
    color: #000000 !important;
}

/**
 * Botón de flecha del dropdown
 */
body.high-contrast-mode .k-dropdown .k-select,
body.high-contrast-mode .k-combobox .k-select,
body.high-contrast-mode .k-picker-wrap .k-select {
    background-color: #0066CC !important;
    border-left: 2px solid #4A9EFF !important;
}

body.high-contrast-mode .k-dropdown .k-select .k-icon,
body.high-contrast-mode .k-combobox .k-select .k-icon,
body.high-contrast-mode .k-picker-wrap .k-icon,
body.high-contrast-mode .k-select .k-svg-icon {
    color: #FFFFFF !important;
    filter: brightness(1.5) !important;
}

body.high-contrast-mode .k-dropdown .k-select:hover,
body.high-contrast-mode .k-combobox .k-select:hover {
    background-color: #FFD700 !important;
}

body.high-contrast-mode .k-dropdown .k-select:hover .k-icon,
body.high-contrast-mode .k-combobox .k-select:hover .k-icon,
body.high-contrast-mode .k-select:hover .k-svg-icon {
    color: #000000 !important;
    filter: none !important;
}

/**
 * Selectores HTML estándar
 * Mantiene formato original
 */
body.high-contrast-mode select.form-select,
body.high-contrast-mode select#OrdenarPor,
body.high-contrast-mode select#Dir,
body.high-contrast-mode select#CantidadResultados {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode select.form-select:focus,
body.high-contrast-mode select#OrdenarPor:focus,
body.high-contrast-mode select#Dir:focus,
body.high-contrast-mode select#CantidadResultados:focus {
    background-color: #FFFACD !important;
    color: #000000 !important;
    border: 3px solid #FFD700 !important;
    outline: 3px solid #4A9EFF !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

/**
 * Opciones dentro de los selectores
 * Mantiene formato original
 */
body.high-contrast-mode select.form-select option,
body.high-contrast-mode select option {
    background-color: #FFFFFF !important;
    color: #000000 !important;
}

body.high-contrast-mode select.form-select option:hover,
body.high-contrast-mode select option:hover,
body.high-contrast-mode select.form-select option:checked,
body.high-contrast-mode select option:checked {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
}

/* ========================================
   LISTA DESPLEGABLE DE DROPDOWNS
   ======================================== */

/**
 * Contenedor popup
 */
body.high-contrast-mode .k-list-container,
body.high-contrast-mode .k-popup,
body.high-contrast-mode .k-animation-container {
    background-color: #000000 !important;
    border: 3px solid #4A9EFF !important;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5) !important;
}

body.high-contrast-mode .k-list,
body.high-contrast-mode .k-list-ul {
    background-color: #000000 !important;
}

/**
 * Items de lista
 * Mantiene formato original, solo cambia colores
 */
body.high-contrast-mode .k-list-item,
body.high-contrast-mode .k-item {
    color: #FFFFFF !important;
    background-color: #000000 !important;
    border-bottom: 1px solid #4A9EFF !important;
    padding: 0.5rem 1rem !important;
}

/**
 * Hover con contraste mejorado
 */
body.high-contrast-mode .k-list-item:hover,
body.high-contrast-mode .k-item:hover,
body.high-contrast-mode .k-list-item.k-state-hover,
body.high-contrast-mode .k-item.k-state-hover {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    outline: 2px solid #FFD700 !important;
    outline-offset: -2px !important;
}

/**
 * Item seleccionado
 */
body.high-contrast-mode .k-list-item.k-state-selected,
body.high-contrast-mode .k-item.k-state-selected {
    background-color: #0066CC !important;
    color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
}

/**
 * Item con foco
 */
body.high-contrast-mode .k-list-item.k-state-focused,
body.high-contrast-mode .k-item.k-state-focused {
    outline: 3px solid #FFD700 !important;
    outline-offset: -3px !important;
}

/**
 * Placeholder en dropdowns
 */
body.high-contrast-mode .k-dropdown .k-input::placeholder,
body.high-contrast-mode .k-combobox .k-input::placeholder {
    color: #666666 !important;
}

/**
 * Estado disabled de dropdowns
 */
body.high-contrast-mode .k-dropdown.k-state-disabled,
body.high-contrast-mode .k-combobox.k-state-disabled,
body.high-contrast-mode select.form-select:disabled {
    background-color: #CCCCCC !important;
    color: #666666 !important;
    border: 2px solid #999999 !important;
    opacity: 1 !important;
}

/* ========================================
   INPUT DE BÚSQUEDA ENTRE RESULTADOS
   ======================================== */

/**
 * Input de texto para búsqueda
 */
body.high-contrast-mode .input-group input[type="text"],
body.high-contrast-mode input#textBuscar {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
    font-weight: bold !important;
    font-size: 1rem !important;
}

body.high-contrast-mode .input-group input[type="text"]:focus,
body.high-contrast-mode input#textBuscar:focus {
    background-color: #FFFACD !important;
    color: #000000 !important;
    border: 3px solid #FFD700 !important;
    outline: 3px solid #4A9EFF !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
}

/**
 * Placeholder del input
 */
body.high-contrast-mode input#textBuscar::placeholder {
    color: #666666 !important;
    font-weight: normal !important;
}

/**
 * Botón de búsqueda dentro del input-group
 */
body.high-contrast-mode .input-group-text,
body.high-contrast-mode .btn.btn-warning {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    border: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .input-group-text:hover,
body.high-contrast-mode .btn.btn-warning:hover {
    background-color: #FFD700 !important;
    color: #000000 !important;
    border: 3px solid #FFFFFF !important;
}

body.high-contrast-mode .input-group-text i,
body.high-contrast-mode .btn.btn-warning i {
    color: inherit !important;
}

/* ========================================
   CONTROLES ESPECÍFICOS DE KENDO
   ======================================== */

/**
 * Input numérico de Kendo
 */
body.high-contrast-mode .k-numerictextbox,
body.high-contrast-mode .k-textbox {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 3px solid #4A9EFF !important;
}

/**
 * Estados de validación
 */
body.high-contrast-mode .k-invalid,
body.high-contrast-mode .k-state-invalid {
    border-color: #FF4444 !important;
    background-color: #FFCCCC !important;
}

/**
 * Mensajes de validación
 */
body.high-contrast-mode .k-tooltip-validation {
    background-color: #440000 !important;
    color: #FF4444 !important;
    border: 3px solid #FF4444 !important;
}

/* ========================================
   FIN DEL ARCHIVO
   ======================================== */

/* High-contrast styling for .highlight elements in search results */
body.high-contrast-mode .highlight {
    background-color: #FFD700 !important; /* amarillo oro */
    color: #000000 !important; /* texto negro */
    padding: 0.12rem 0.2rem !important;
    border-radius: 0.2rem !important;
    border: 2px solid #4A9EFF !important;
}

body.high-contrast-mode .highlight:hover,
body.high-contrast-mode .highlight:focus {
    background-color: #FFEA70 !important;
    outline: 3px solid #4A9EFF !important;
}

body.high-contrast-mode .highlight a {
    color: #000000 !important;
    text-decoration: underline !important;
}

/* High-contrast styling for <mark> element in search results */
body.high-contrast-mode mark {
    background-color: #FFD700 !important; /* amarillo oro brillante */
    color: #000000 !important; /* texto negro para máximo contraste */
    border: 2px solid #4A9EFF !important; /* borde azul institucional */
    padding: 0.15rem 0.3rem !important;
    border-radius: 0.2rem !important;
    font-weight: bold !important; /* resalta el texto marcado */
}

body.high-contrast-mode mark:hover,
body.high-contrast-mode mark:focus {
    background-color: #FFEA70 !important; /* amarillo más claro en hover */
    outline: 3px solid #4A9EFF !important;
    outline-offset: 2px !important;
}

/* Ensure links inside mark remain readable */
body.high-contrast-mode mark a {
    color: #000000 !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}
