.accessibility-toolbar {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.accessibility-toolbar[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.accessibility-toolbar[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.accessibility-toolbar[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.accessibility-toolbar[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

.accessibility-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    background: #005a87;
    transform: scale(1.05);
}

.accessibility-toggle:focus {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

.accessibility-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 0;
    min-width: 280px;
    max-width: 320px;
}

.accessibility-toolbar[data-position="bottom-left"] .accessibility-panel,
.accessibility-toolbar[data-position="top-left"] .accessibility-panel {
    right: auto;
    left: 0;
}

.accessibility-toolbar[data-position="top-right"] .accessibility-panel,
.accessibility-toolbar[data-position="top-left"] .accessibility-panel {
    bottom: auto;
    top: 60px;
}

.accessibility-header {
    background: #0073aa;
    color: white;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accessibility-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.accessibility-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.accessibility-close:hover {
    background: rgba(255,255,255,0.2);
}

.accessibility-close:focus {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

.accessibility-controls {
    padding: 15px;
}

.accessibility-control {
    margin-bottom: 15px;
}

.accessibility-control:last-child {
    margin-bottom: 0;
}

.accessibility-control > label:first-child {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.button-group {
    display: flex;
    gap: 8px;
}

.control-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: #333;
}

.control-btn:hover {
    background: #f0f0f0;
    border-color: #0073aa;
}

.control-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.control-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.reset-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.reset-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

.accessibility-control label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.accessibility-control label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

body.text-size-1 {
    font-size: 110% !important;
}

body.text-size-2 {
    font-size: 120% !important;
}

body.text-size-3 {
    font-size: 130% !important;
}

body.contrast-high {
    background: white !important;
    color: black !important;
}

body.contrast-high * {
    background: white !important;
    color: black !important;
    border-color: black !important;
}

body.contrast-high a {
    color: #0000EE !important;
    text-decoration: underline !important;
}

body.contrast-high a:visited {
    color: #551A8B !important;
}

body.contrast-dark {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

body.contrast-dark * {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.contrast-dark a {
    color: #4da6ff !important;
}

body.contrast-dark .accessibility-toolbar,
body.contrast-high .accessibility-toolbar {
    background: transparent !important;
}

body.contrast-dark .accessibility-panel,
body.contrast-high .accessibility-panel {
    background: inherit !important;
    border: 2px solid currentColor !important;
}

body.underline-links a {
    text-decoration: underline !important;
}

body.highlight-focus *:focus,
body.highlight-focus a:focus,
body.highlight-focus button:focus,
body.highlight-focus input:focus,
body.highlight-focus textarea:focus,
body.highlight-focus select:focus,
body.highlight-focus [tabindex]:focus,
body.highlight-focus .fusion-button:focus,
body.highlight-focus .button:focus {
    outline: 3px solid #ffc107 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3) !important;
}

body.bigger-cursor,
body.bigger-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M2 2 L2 28 L12 20 L16 28 L20 26 L16 18 L26 18 Z" fill="black"/><path d="M3 3 L3 26 L11 19 L15 26 L18 25 L14 18 L24 18 Z" fill="white"/></svg>'), auto !important;
}

body.bigger-cursor a,
body.bigger-cursor button,
body.bigger-cursor input[type="submit"],
body.bigger-cursor input[type="button"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M10 2 L10 10 L2 10 L2 14 L10 14 L10 22 L14 22 L14 14 L22 14 L22 10 L14 10 L14 2 Z" fill="black"/><path d="M11 3 L11 11 L3 11 L3 13 L11 13 L11 21 L13 21 L13 13 L21 13 L21 11 L13 11 L13 3 Z" fill="white"/></svg>'), pointer !important;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/opendyslexic@2.0.0/ttf/OpenDyslexic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/opendyslexic@2.0.0/ttf/OpenDyslexic-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

body.dyslexic-font,
body.dyslexic-font *,
body.dyslexic-font h1,
body.dyslexic-font h2,
body.dyslexic-font h3,
body.dyslexic-font h4,
body.dyslexic-font h5,
body.dyslexic-font h6,
body.dyslexic-font p,
body.dyslexic-font a,
body.dyslexic-font span,
body.dyslexic-font div,
body.dyslexic-font li,
body.dyslexic-font button,
body.dyslexic-font input,
body.dyslexic-font textarea {
    font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
}

.accessibility-control input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px;
}

.accessibility-control input[type="color"]:hover {
    border-color: #0073aa;
}

.accessibility-control input[type="color"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .accessibility-panel {
        min-width: 260px;
        max-width: 90vw;
    }
    
    .accessibility-toolbar {
        bottom: 10px;
        right: 10px;
    }
    
    .accessibility-toolbar[data-position="bottom-left"] {
        bottom: 10px;
        left: 10px;
    }
    
    .accessibility-toolbar[data-position="top-right"] {
        top: 10px;
        right: 10px;
    }
    
    .accessibility-toolbar[data-position="top-left"] {
        top: 10px;
        left: 10px;
    }
}