﻿/* ============================================
   MENÚ DE ACCESIBILIDAD - ESTILOS Y CLASES
   ============================================ */

/* Fuente amigable para dislexia */
/*@import url('https://fonts.googleapis.com/css2?family=OpenDyslexic&display=swap');*/

/* Botón flotante (esquina superior derecha) */
.btn-accesibilidad {
    position: fixed;
    top: 75px;
    right: 30px;
    z-index: 10000;
    background-color: #1f35a1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

    .btn-accesibilidad:hover {
        background-color: #004c99;
    }

/* Panel del menú */
.menu-accesibilidad {
    position: fixed;
    top: 135px;
    right: 20px;
    z-index: 9999;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 20px;
    width: 290px;
    display: none;
    font-family: system-ui, -apple-system, sans-serif;
    border: 1px solid #e2e8f0;
}

    .menu-accesibilidad button {
        padding: 8px;
        background: #f1f5f9;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
        font-size: 0.9rem;
    }

        .menu-accesibilidad button:hover {
            background: #e2e8f0;
        }

    .menu-accesibilidad .btn-guardar {
        background: #edf2f7;
    }

    .menu-accesibilidad .btn-reset {
        background: #fee2e2;
    }

        .menu-accesibilidad .btn-reset:hover {
            background: #fecaca;
        }

/* Máscara de lectura (línea que sigue al mouse) */
.mascara-lectura {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 26px;
    background: rgba(255, 235, 80, 0.45);
    border-top: 2px solid #ffcc00;
    border-bottom: 2px solid #ffcc00;
    pointer-events: none;
    z-index: 9998;
    display: none;
}

/* ============================================
   CLASES DE ACCESIBILIDAD (SE APLICAN AL BODY)
   ============================================ */

/* Tamaño de texto */
body.accesibilidad-texto-large {
    font-size: 1.2rem;
}

body.accesibilidad-texto-xlarge {
    font-size: 1.5rem;
}

/* Alto contraste */
body.accesibilidad-alto-contraste {
    background: black !important;
    color: #ffff99 !important;
}

    body.accesibilidad-alto-contraste * {
        background: black !important;
        color: #ffff99 !important;
        border-color: #ffff99 !important;
    }

    body.accesibilidad-alto-contraste a {
        color: #66ccff !important;
    }

/* Cursor grande */
body.accesibilidad-cursor-grande * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="14" fill="black" stroke="white" stroke-width="2"/><circle cx="16" cy="16" r="8" fill="white"/></svg>') 16 16, auto;
}



body.accesibilidad-dislexia,
body.accesibilidad-dislexia * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Chalkboard SE', sans-serif !important;
}

/* Interlineado */
body.accesibilidad-interlineado {
    line-height: 1.8 !important;
}

/* Espaciado entre letras (A↔Z) */
body.accesibilidad-espaciado-letras {
    letter-spacing: 0.05em !important;
}
