/* ===== ACCESSIBILITY WIDGET ===== */

.a11y-toggle-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1f36;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 2400;
    transition: all 0.3s ease;
}

.a11y-toggle-btn:hover {
    background: #00b6de;
    transform: scale(1.06);
}

.a11y-panel {
    position: fixed;
    left: 20px;
    bottom: 88px;
    width: 300px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 2400;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    font-family: 'Montserrat', sans-serif;
}

.a11y-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.a11y-panel-header {
    background: #1a1f36;
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.a11y-panel-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    color: white;
}

.a11y-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.a11y-panel-close:hover {
    opacity: 1;
}

.a11y-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 1px solid #eef1f5;
    cursor: pointer;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.2s ease;
}

.a11y-row:hover {
    background: #f5f7fa;
}

.a11y-row.active {
    background: rgba(0, 182, 222, 0.08);
}

.a11y-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #1a1f36;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #1a1f36;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.a11y-row.active .a11y-row-icon {
    background: #00b6de;
    border-color: #00b6de;
    color: white;
}

.a11y-row span.a11y-row-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
}

.a11y-fontsize-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1f5;
}

.a11y-fontsize-btn {
    background: none;
    border: none;
    color: #00b6de;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s ease, color 0.2s ease;
}

.a11y-fontsize-btn:nth-child(1) { font-size: 15px; }
.a11y-fontsize-btn:nth-child(2) { font-size: 20px; }
.a11y-fontsize-btn:nth-child(3) { font-size: 26px; }

.a11y-fontsize-btn.active {
    color: #1a1f36;
    transform: scale(1.1);
}

.a11y-reset-row {
    color: #ef4444;
}

.a11y-reset-row .a11y-row-icon {
    border-color: #ef4444;
    color: #ef4444;
}

.a11y-reset-row span.a11y-row-label {
    color: #ef4444;
}

.a11y-panel-footer {
    padding: 10px 20px 16px;
    text-align: center;
}

.a11y-panel-footer span {
    font-size: 11px;
    color: #a0a8b0;
}

@media (max-width: 480px) {
    .a11y-panel {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 80px;
    }

    .a11y-toggle-btn {
        left: 12px;
        bottom: 12px;
    }
}

/* ===== GLOBAL ACCESSIBILITY OVERRIDES ===== */

html.a11y-grayscale {
    filter: grayscale(100%);
}

html.a11y-stop-motion *,
html.a11y-stop-motion *::before,
html.a11y-stop-motion *::after {
    animation-play-state: paused !important;
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

html.a11y-underline-links a {
    text-decoration: underline !important;
}

html.a11y-readable-font,
html.a11y-readable-font body,
html.a11y-readable-font p,
html.a11y-readable-font span,
html.a11y-readable-font li,
html.a11y-readable-font a,
html.a11y-readable-font div {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.02em !important;
    line-height: 1.7 !important;
}

html.a11y-contrast-dark body {
    background: #000000 !important;
}

html.a11y-contrast-dark body :not(img):not(svg):not(i):not(video):not(iframe):not(#a11yWidgetRoot):not(#a11yWidgetRoot *) {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

html.a11y-contrast-dark a:not(#a11yWidgetRoot *) {
    color: #6fd8ff !important;
}

html.a11y-contrast-white body {
    background: #ffffff !important;
}

html.a11y-contrast-white body :not(img):not(svg):not(i):not(video):not(iframe):not(#a11yWidgetRoot):not(#a11yWidgetRoot *) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.a11y-contrast-white a:not(#a11yWidgetRoot *) {
    color: #0047ab !important;
}

html.a11y-font-medium body {
    zoom: 1.12;
}

html.a11y-font-large body {
    zoom: 1.25;
}
