﻿/* ===== ACCESSIBILITY TOOLS - SIDEBAR STYLE ===== */

/* Toggle Button - Fixed bottom-left */
.accessibility-toggle {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    width: 48px !important;
    height: 48px !important;
    background: #1a3a6b !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 6px !important;
    font-size: 22px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.2s !important;
}

    .accessibility-toggle:hover {
        transform: scale(1.08) !important;
        background: #0f2a50 !important;
    }

/* Sidebar Panel */
.accessibility-panel {
    position: fixed !important;
    top: 0 !important;
    left: -275px;
    /* Hidden off-screen */
    width: 265px;
    height: 100vh;
    background: #f5f5f5;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
    z-index: 99998 !important;
    display: flex !important;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow-y: auto;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: visible !important;
    opacity: 1 !important;
}

    .accessibility-panel.active {
        left: 0 !important;
    }

/* Header */
.accessibility-header {
    background: #1a3a6b !important;
    color: white !important;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .accessibility-header h5 {
        margin: 0 !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: white !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-decoration: none !important;
        border: none !important;
    }

.close-btn {
    background: #e63030 !important;
    border: none !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: bold;
    cursor: pointer !important;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

    .close-btn:hover {
        background: #c00 !important;
    }

/* Body */
.accessibility-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    background: #f5f5f5;
}

/* Section */
.tool-section {
    background: #fff;
    margin: 10px;
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #e8e8e8;
}

    .tool-section h6 {
        color: #c0392b !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        text-align: center;
        margin: 0 0 10px 0 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-decoration: none !important;
        border: none !important;
        padding: 0 !important;
    }

/* Grid of buttons */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tool-btn {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 10px 4px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.18s !important;
    min-height: 70px;
}

    .tool-btn:hover {
        background: #edf2ff !important;
        border-color: #1a3a6b !important;
    }

    .tool-btn.active {
        background: #1a3a6b !important;
        border-color: #1a3a6b !important;
    }

        .tool-btn.active i,
        .tool-btn.active span {
            color: #fff !important;
        }

    .tool-btn i {
        font-size: 20px !important;
        color: #333 !important;
        margin-bottom: 6px !important;
        display: block;
    }

    .tool-btn span {
        font-size: 9px !important;
        text-align: center;
        color: #333 !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        text-transform: lowercase;
        display: block;
    }

/* Reset Button */
.reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 20px);
    margin: 0 10px 14px;
    padding: 10px;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700 !important;
    color: #333 !important;
    cursor: pointer !important;
    text-transform: lowercase;
}

    .reset-btn:hover {
        background: #fee !important;
        border-color: #c00 !important;
        color: #c00 !important;
    }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
    .accessibility-panel {
        width: 90vw !important;
        left: -90vw !important;
    }

        .accessibility-panel.active {
            left: 0 !important;
        }

    .accessibility-toggle {
        bottom: 15px !important;
        left: 15px !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }
}

/* ===== ACCESSIBILITY FEATURE CLASSES ===== */
body.acc-uncolored {
    filter: grayscale(100%) !important;
}

body.acc-bright {
    filter: brightness(130%) !important;
}

body.acc-reverse {
    filter: invert(100%) hue-rotate(180deg) !important;
    background: #000 !important;
}

    body.acc-reverse img,
    body.acc-reverse video {
        filter: invert(100%) hue-rotate(180deg) !important;
    }

/* Text size - exclude the accessibility panel itself */
body.acc-text-large *:not(.accessibility-panel):not(.accessibility-panel *):not(.accessibility-toggle):not(.accessibility-toggle *) {
    font-size: 1.08em !important;
}

body.acc-text-small *:not(.accessibility-panel):not(.accessibility-panel *):not(.accessibility-toggle):not(.accessibility-toggle *) {
    font-size: 0.93em !important;
}

body.acc-readable *:not(.accessibility-panel):not(.accessibility-panel *) {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.03em !important;
    line-height: 1.7 !important;
}

body.acc-underline-links a {
    text-decoration: underline !important;
    font-weight: 700 !important;
}

body.acc-underline-headers h1,
body.acc-underline-headers h2,
body.acc-underline-headers h3,
body.acc-underline-headers h4,
body.acc-underline-headers h5,
body.acc-underline-headers h6 {
    text-decoration: underline !important;
}

body.acc-images-titles img {
    outline: 3px solid #e8b400 !important;
    outline-offset: 2px;
}

body.acc-big-white-cursor,
body.acc-big-white-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="white" stroke="black" stroke-width="1.5"><path d="M7 2l12 12.33l-4.5 0.67l3 5l-2.5 1.5l-3-5l-5 4.5z"/></svg>'), auto !important;
}

body.acc-big-black-cursor,
body.acc-big-black-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="black" stroke="white" stroke-width="1.5"><path d="M7 2l12 12.33l-4.5 0.67l3 5l-2.5 1.5l-3-5l-5 4.5z"/></svg>'), auto !important;
}

body.acc-zoom-screen {
    zoom: 1.15;
}
