/* ======================================================================
   ACCESIBILIDAD (a11y.css) - VERSIÓN FINAL PROTEGIDA
   ====================================================================== */

/* --- 1. REGLAS GLOBALES (Afectan a la web) --- */

/* ALTO CONTRASTE */
body.a11y-contrast header,
body.a11y-contrast main,
body.a11y-contrast footer,
body.a11y-contrast .mobile-menu-wrapper { 
    background-color: #000000 !important; 
    color: #FFFF00 !important; 
}
body.a11y-contrast header *,
body.a11y-contrast main *,
body.a11y-contrast footer *,
body.a11y-contrast .mobile-menu-wrapper * { 
    background-color: #000000 !important; 
    color: #FFFF00 !important; 
    border-color: #FFFF00 !important; 
    box-shadow: none !important; 
    text-shadow: none !important; 
    background-image: none !important; 
}
body.a11y-contrast a { color: #00FFFF !important; text-decoration: underline !important; font-weight: bold; }

/* Excepción: Imágenes e Iconos en Alto Contraste */
body.a11y-contrast img, 
body.a11y-contrast i, 
body.a11y-contrast svg { 
    filter: grayscale(100%) contrast(200%); 
    opacity: 1 !important; 
}

/* Excepción: Logos en Alto Contraste (Blancos puros) */
body.a11y-contrast .logo img, 
body.a11y-contrast .footer-logo {
    filter: brightness(0) invert(1) !important;
    background-color: transparent !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

/* DESATURACIÓN (Gris) */
body.a11y-desaturate header,
body.a11y-desaturate main,
body.a11y-desaturate footer {
    filter: grayscale(100%);
}

/* ESPACIADO */
body.a11y-spacing p, 
body.a11y-spacing h1, 
body.a11y-spacing h2, 
body.a11y-spacing h3, 
body.a11y-spacing a, 
body.a11y-spacing li { 
    line-height: 2 !important; 
    letter-spacing: 0.15em !important; 
    word-spacing: 0.2em !important; 
    margin-bottom: 1.5em !important; 
}

/* ENLACES RESALTADOS */
body.a11y-links main a, 
body.a11y-links footer a { 
    text-decoration: underline !important; 
    text-decoration-thickness: 3px !important; 
    font-weight: 800 !important; 
    background-color: #FFFF00 !important; 
    color: #000000 !important; 
    padding: 2px 5px; 
    border-radius: 2px; 
}


/* --- 2. DISEÑO Y PROTECCIÓN DEL PANEL DE ACCESIBILIDAD --- */
/* (Todo lo que está aquí lleva !important para ganar a las reglas de arriba) */

#accessPanel { 
    position: absolute !important; 
    bottom: 70px !important; 
    right: 0 !important; 
    
    /* Diseño Visual */
    background-color: #ffffff !important; 
    width: 260px !important; 
    padding: 15px !important; 
    border-radius: 12px !important; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important; 
    
    /* Layout (Rejilla de 2 columnas) */
    display: grid !important; 
    grid-template-columns: 1fr 1fr !important; 
    gap: 10px !important; 
    
    /* Estado */
    opacity: 0; 
    visibility: hidden; 
    transform: translateX(20px); 
    transition: 0.3s; 
    z-index: 10000 !important;
    
    /* Inmunidad a filtros */
    filter: none !important;
    
    /* Reset textos */
    font-size: 14px !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
}

#accessPanel.active { 
    opacity: 1 !important; 
    visibility: visible !important; 
    transform: translateX(0) !important; 
}

/* Botones dentro del Panel */
#accessPanel .acc-btn { 
    background-color: #f1f5f9 !important; 
    border: 1px solid #e2e8f0 !important; 
    border-radius: 8px !important; 
    padding: 10px 5px !important; 
    
    color: #102A43 !important; 
    font-size: 12px !important; 
    font-weight: 700 !important; 
    text-align: center !important; 
    text-decoration: none !important;
    
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    justify-content: center !important; 
    gap: 5px !important;
    
    cursor: pointer !important; 
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    filter: none !important;
    margin: 0 !important; 
}

/* Iconos de los botones */
#accessPanel .acc-btn i { 
    font-size: 16px !important; 
    background-color: transparent !important; 
    color: inherit !important; 
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 1 !important; /* Visible siempre */
}

/* Hover botones normales */
#accessPanel .acc-btn:hover { 
    background-color: #FF8C00 !important; 
    color: #ffffff !important; 
    border-color: #FF8C00 !important; 
}

/* Botón Reinicializar (Azul y ancho completo) */
#accessPanel .acc-btn-full { 
    grid-column: span 2 !important; 
    background-color: #009FE3 !important; 
    color: #ffffff !important; 
    border: none !important;
    flex-direction: row !important; 
    gap: 8px !important;
    padding: 12px !important;
    font-size: 13px !important;
}

#accessPanel .acc-btn-full:hover { 
    background-color: #FF8C00 !important; 
}