/* ==========================================================================
   ASISTENTE VISUAL Y ACCESIBILIDAD - CHARO (ALINEACIÓN DERECHA)
   ========================================================================== */

/* 1. CONTENEDOR Y POSICIONAMIENTO FLOTANTE */
#asistentevisual-container {
    position: relative;
    z-index: 9999 !important;
}

#accessibilityWidget {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    left: auto !important;
    z-index: 9999 !important;
}

/* 2. BOTÓN FLOTANTE ACTIVADOR */
#accessibilityToggleBtn {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    background-color: #FF6B00 !important;
    /* Naranja Movimiento Ciudadano */
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease !important;
}

#accessibilityToggleBtn:hover {
    transform: scale(1.1) rotate(5deg) !important;
    background-color: #e05e00 !important;
    box-shadow: 0 10px 28px rgba(255, 107, 0, 0.6), 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

#accessibilityToggleBtn:active {
    transform: scale(0.95) !important;
}

/* 3. MENÚ DESPLEGABLE DE OPCIONES */
.accessibility-menu {
    position: absolute !important;
    bottom: 65px !important;
    right: 0 !important;
    left: auto !important;
    width: 270px !important;
    background-color: #121824 !important;
    /* Fondo oscuro tipo bg-dark-card */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 4px solid #FF6B00 !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    z-index: 10000 !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
}

.accessibility-menu .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

.accessibility-menu .btn-outline-light:hover {
    background-color: #FF6B00 !important;
    border-color: #FF6B00 !important;
    color: #ffffff !important;
    transform: translateX(-3px) !important;
}

.accessibility-menu .btn-outline-light:hover i {
    color: #ffffff !important;
}

/* 4. MODOS DE ACCESIBILIDAD GLOBALES */

/* Transición fluida al ajustar tamaño de fuente */
body {
    transition: font-size 0.2s ease, filter 0.3s ease !important;
}

/* MODO ALTO CONTRASTE */
body.high-contrast {
    background-color: #000000 !important;
    color: #FFFF00 !important;
    /* Texto amarillo fosforescente */
}

body.high-contrast *:not(#accessibilityWidget):not(#accessibilityWidget *) {
    background-color: #000000 !important;
    color: #FFFF00 !important;
    border-color: #FFFF00 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.high-contrast a {
    color: #00FFFF !important;
    /* Enlaces en cian alto contraste */
    text-decoration: underline !important;
}

body.high-contrast img,
body.high-contrast video,
body.high-contrast iframe {
    filter: contrast(150%) !important;
}

/* MODO ESCALA DE GRISES */
body.grayscale-mode {
    filter: grayscale(100%) !important;
}

/* AJUSTES RESPONSIVOS */
@media (max-width: 576px) {
    #accessibilityWidget {
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
    }

    #accessibilityToggleBtn {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
    }

    .accessibility-menu {
        width: 240px !important;
        bottom: 60px !important;
        right: 0 !important;
        left: auto !important;
    }
}