/* Accessibility Widget Styles */
.acc-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* Standard place for accessibility widgets */
    z-index: 999999;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.acc-widget-btn {
    background-color: #0076a3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.acc-widget-btn:hover {
    transform: scale(1.05);
}

.acc-menu-panel {
    position: absolute;
    bottom: 75px;
    left: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.acc-menu-panel.acc-open {
    display: flex;
}

.acc-menu-header {
    background-color: #0076a3;
    color: white;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.acc-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    max-height: 400px;
    overflow-y: auto;
}

.acc-option-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 5px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.acc-option-btn:hover {
    border-color: #0076a3;
    background: #f0f8ff;
}

.acc-option-btn.acc-active {
    border-color: #0076a3;
    background: #e6f7ff;
    color: #0076a3;
    box-shadow: inset 0 0 0 1px #0076a3;
}

.acc-option-btn i {
    font-size: 24px;
    color: #0076a3;
}

.acc-menu-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #ddd;
    background: white;
}

.acc-reset-btn {
    background: #efefef;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    font-weight: bold;
    transition: background 0.2s;
}

.acc-reset-btn:hover {
    background: #e2e2e2;
}


/* --- ACCESSIBILITY UTILITY CLASSES --- */

/* High Contrast: Invert filters and increase contrast */
body.acc-high-contrast {
    background-color: #000 !important;
}

/* Apply filter to all direct children of body EXCEPT the widget */
body.acc-high-contrast>*:not(.acc-widget-container):not(script):not(style):not(link):not(iframe) {
    filter: invert(100%) hue-rotate(180deg) brightness(1.2) contrast(1.5) !important;
}

/* Revert images so they don't look alien */
body.acc-high-contrast img,
body.acc-high-contrast video,
body.acc-high-contrast .bg-image,
body.acc-high-contrast iframe {
    filter: invert(100%) hue-rotate(180deg) !important;
}


/* Highlight Links */
body.acc-highlight-links a,
body.acc-highlight-links button {
    background-color: #ffff00 !important;
    color: #000000 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 3px !important;
    outline: 2px solid #ff9900 !important;
    outline-offset: 2px !important;
}

/* Bigger Text */
body.acc-bigger-text {
    font-size: 120% !important;
}

body.acc-bigger-text p,
body.acc-bigger-text span,
body.acc-bigger-text a,
body.acc-bigger-text li,
body.acc-bigger-text h1,
body.acc-bigger-text h2,
body.acc-bigger-text h3,
body.acc-bigger-text h4,
body.acc-bigger-text h5,
body.acc-bigger-text h6 {
    font-size: 115% !important;
}

/* Text Spacing */
body.acc-text-spacing * {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* Pause Animations */
body.acc-pause-animations * {
    animation: none !important;
    animation-play-state: paused !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* Hide Images */
body.acc-hide-images img,
body.acc-hide-images [style*="background-image"],
body.acc-hide-images .slide-item {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Dyslexia Friendly */
body.acc-dyslexia * {
    font-family: 'Comic Sans MS', 'OpenDyslexic', Arial, sans-serif !important;
}

/* Line Height */
body.acc-line-height * {
    line-height: 2 !important;
}