/* Accessibility Widget Classes */
:root {
    --acc-font-multiplier: 1;
}

body.acc-grayscale {
    filter: grayscale(100%);
}

body.acc-invert {
    filter: invert(100%);
}

body.acc-high-contrast {
    background-color: black !important;
    color: yellow !important;
}

body.acc-high-contrast * {
    background-color: black !important;
    color: yellow !important;
    border-color: yellow !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.acc-high-contrast a {
    color: cyan !important;
    text-decoration: underline !important;
}

body.acc-light-bg {
    background-color: white !important;
    color: black !important;
}

body.acc-light-bg * {
    background-color: white !important;
    color: black !important;
    border-color: black !important;
}

body.acc-underline-links a {
    text-decoration: underline !important;
}

body.acc-readable-font, 
body.acc-readable-font * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Base Widget Styling */
#accessibility-widget {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    font-family: 'Inter', sans-serif !important;
}

#accessibility-toggle {
    background-color: #3f51b5;
    color: white;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 5px 15px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s;
}

#accessibility-toggle:hover {
    background-color: #303f9f;
    transform: scale(1.05);
}

#accessibility-panel {
    background: white;
    width: 300px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    padding: 24px;
    border-radius: 12px 0 0 12px;
    display: none;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #eee;
    border-right: none;
}

#accessibility-panel.open {
    display: block;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#accessibility-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.acc-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.acc-option:hover {
    color: #3f51b5;
}

.acc-option i {
    width: 20px;
}

.acc-option.active {
    color: #3f51b5;
    font-weight: 700;
}

.acc-option:last-child {
    border-bottom: none;
    margin-top: 10px;
    color: #d32f2f;
}

.acc-option:last-child:hover {
    color: #b71c1c;
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

#accessibility-panel.open {
    animation: slideIn 0.3s ease-out forwards;
}

@media (max-width: 640px) {
    #accessibility-panel {
        width: 240px;
    }
}
