/* Accessibility Toolbar Styles */
.accessibility-toolbar {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    transition: transform 0.3s ease;
}

.accessibility-toolbar.active {
    transform: translateY(-50%) translateX(0);
}

.toolbar-toggle {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 1rem;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.toolbar-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.toolbar-panel {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 280px;
    max-width: 320px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
    display: none;
}

.accessibility-toolbar.active .toolbar-panel {
    display: block;
}

.toolbar-title {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.toolbar-section {
    margin-bottom: 1.5rem;
}

.toolbar-section:last-child {
    margin-bottom: 0;
}

.toolbar-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.toolbar-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toolbar-btn {
    flex: 1;
    min-width: 70px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 44px;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.toolbar-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.toolbar-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.toolbar-reset {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    min-height: 44px;
}

.toolbar-reset:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--error-color);
}

.toolbar-reset:focus {
    outline: 2px solid var(--error-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
body.high-contrast {
    --bg-dark: #000000;
    --bg-darker: #000000;
    --text-light: #ffffff;
    --text-muted: #ffffff;
    --border-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
}

body.high-contrast * {
    border-color: var(--border-color) !important;
}

body.high-contrast .course-card,
body.high-contrast .tutor-card,
body.high-contrast .coaching-card {
    border: 2px solid var(--border-color);
}

/* ADHD Mode */
body.adhd-mode {
    --adhd-focus-ring: #ffd166;
    --adhd-bg: rgba(255, 209, 102, 0.08);
    --adhd-text: #f5f7ff;
}

body.adhd-mode * {
    animation: none !important;
    transition: none !important;
}

body.adhd-mode {
    background-color: var(--bg-dark);
    color: var(--adhd-text);
    font-family: "Atkinson Hyperlegible", "Inter", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.02em;
    line-height: 1.7;
}

body.adhd-mode main,
body.adhd-mode section,
body.adhd-mode .card,
body.adhd-mode .course-card,
body.adhd-mode .tutor-card,
body.adhd-mode .coaching-card {
    background: var(--adhd-bg);
    border-radius: 12px;
}

body.adhd-mode p,
body.adhd-mode li {
    max-width: 70ch;
}

body.adhd-mode a:focus,
body.adhd-mode button:focus,
body.adhd-mode input:focus,
body.adhd-mode select:focus,
body.adhd-mode textarea:focus {
    outline: 3px solid var(--adhd-focus-ring) !important;
    outline-offset: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .accessibility-toolbar {
        top: auto;
        bottom: 80px;
        transform: none;
    }
    
    .accessibility-toolbar.active {
        transform: none;
    }
    
    .toolbar-panel {
        right: 0;
        bottom: 60px;
        top: auto;
        transform: none;
        max-width: calc(100vw - 2rem);
    }
    
    .toolbar-toggle {
        border-radius: 8px 8px 0 0;
    }
}

