/* Accessibility Widget Styles */
/* @import url('https://cdn.clarkhacks.com/OpenDyslexic/v3/OpenDyslexic.css'); */

@font-face {
    font-family: 'OpenDyslexic';
    src: url('font/dyslexic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --a11y-primary: #8b5cf6;
    /* Violet-500 */
    --a11y-bg: #0F0F0F;
    --a11y-text: #ffffff;
    --a11y-glass: rgba(15, 15, 15, 0.9);
    --a11y-border: rgba(255, 255, 255, 0.1);
}

/* 1. Font Overrides */
body.a11y-dyslexic {
    font-family: 'OpenDyslexic', sans-serif !important;
}

body.a11y-dyslexic * {
    font-family: 'OpenDyslexic', sans-serif !important;
}

/* 2. Link Underlines */
body.a11y-underline a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px !important;
}

/* 3. Text Sizing (handled via JS setting style on html/body, but helper class here) */
/* .a11y-zoom-1... defined dynamically or via style attribute */

/* Widget Container */
#a11y-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: 'Inter', sans-serif;
}

/* Floating Trigger Button */
#a11y-trigger {
    width: 50px;
    height: 50px;
    background: var(--a11y-primary);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#a11y-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Menu Panel */
#a11y-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 280px;
    background: var(--a11y-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--a11y-border);
    border-radius: 16px;
    padding: 20px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#a11y-menu.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Menu Header */
.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--a11y-border);
    margin-bottom: 5px;
}

.a11y-title {
    font-weight: 700;
    color: white;
    font-size: 16px;
}

.a11y-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
}

/* Controls */
.a11y-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d1d5db;
    font-size: 14px;
}

.a11y-btn-group {
    display: flex;
    gap: 8px;
}

.a11y-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.a11y-btn.active {
    background: var(--a11y-primary);
    border-color: var(--a11y-primary);
}

/* Toggle Switch */
.a11y-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.a11y-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.a11y-toggle.active {
    background: var(--a11y-primary);
}

.a11y-toggle.active::after {
    left: 22px;
}

/* Reader Active State */
body.a11y-reader-mode {
    cursor: help !important;
}

body.a11y-reader-mode * {
    cursor: help !important;
}

/* Reading Highlight */
.a11y-reading {
    outline: 2px solid var(--a11y-primary);
    background: rgba(139, 92, 246, 0.2);
}

/* Reset Button */
.a11y-reset {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--a11y-border);
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.a11y-reset:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}