/* Botón flotante de accesibilidad SWNV */

.swnv-accessibility-widget {
    --swnv-a11y-bg: #002b5b;
    --swnv-a11y-fg: #ffffff;
}

.swnv-accessibility-toggle {
    position: fixed;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--swnv-a11y-bg, #007cba);
    color: var(--swnv-a11y-fg, #fff);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: grab;
    touch-action: none;
    user-select: none;
    z-index: 999999;
    padding: 0;
}

.swnv-accessibility-toggle .swnv-accessibility-symbol {
    display: block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.swnv-accessibility-toggle:focus-visible,
body.swnv-keyboard-navigation .swnv-accessibility-toggle:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.swnv-accessibility-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
    max-width: min(280px, calc(100vw - 24px));
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 999998;
}

.swnv-accessibility-menu[hidden] {
    display: none !important;
}

.swnv-a11y-toggle,
.swnv-a11y-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}

.swnv-a11y-toggle .dashicons,
.swnv-a11y-reset .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--swnv-a11y-bg, #002b5b);
}

.swnv-a11y-toggle:hover,
.swnv-a11y-reset:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.swnv-a11y-toggle.active {
    background: var(--swnv-a11y-bg, #002b5b);
    border-color: var(--swnv-a11y-bg, #002b5b);
    color: var(--swnv-a11y-fg, #fff);
}

.swnv-a11y-toggle.active .dashicons {
    color: var(--swnv-a11y-fg, #fff);
}

.swnv-a11y-toggle:focus-visible,
.swnv-a11y-reset:focus-visible,
body.swnv-keyboard-navigation .swnv-a11y-toggle:focus,
body.swnv-keyboard-navigation .swnv-a11y-reset:focus {
    outline: 2px solid var(--swnv-a11y-bg, #002b5b);
    outline-offset: 2px;
}

.swnv-a11y-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.swnv-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 1000000;
    background: #000;
    color: #fff;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
}

.swnv-skip-link:focus {
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    overflow: visible;
}

/* Modos aplicados al body */
body.swnv-high-contrast {
    filter: contrast(1.35);
}

body.swnv-dark-mode {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

body.swnv-dark-mode a {
    color: #93c5fd !important;
}

body.swnv-large-text {
    font-size: 112.5% !important;
}

body.swnv-large-text * {
    line-height: 1.6 !important;
}

body.swnv-dyslexia-font,
body.swnv-dyslexia-font * {
    font-family: OpenDyslexic, Verdana, Arial, sans-serif !important;
}

body.swnv-pause-animations *,
body.swnv-pause-animations *::before,
body.swnv-pause-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

body.swnv-reduced-motion *,
body.swnv-reduced-motion *::before,
body.swnv-reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

body.swnv-keyboard-navigation :focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
