/* Accessibility Tool Styles */
:root {
    --acc-primary: #2563eb;
    --acc-bg: #ffffff;
    --acc-text: #1e293b;
    --acc-border: #e2e8f0;
    --acc-panel-width: 320px;
    --acc-z-index: 10000;
}

/* Trigger Button */
.acc-trigger {
    position: fixed;
    top: 75%;
    left: 0;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--acc-primary);
    border-radius: 0 12px 12px 0;
    /* Semi-rounded attached to side */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 4px 4px 12px rgba(37, 99, 235, 0.3);
    z-index: var(--acc-z-index);
    transition: all 0.3s ease;
    border: 2px solid white;
    border-left: none;
}

.acc-trigger:hover {
    width: 70px;
    padding-right: 10px;
}

.acc-trigger svg {
    color: white;
    width: 32px;
    height: 32px;
}

@media (max-width: 768px) {
    .acc-trigger {
        width: 50px;
        height: 50px;
        top: 75%;
        left: 0;
        bottom: auto !important;
    }

    .acc-trigger:hover {
        width: 60px;
    }
}

/* Panel */
.acc-panel {
    position: fixed;
    top: 0;
    left: -100%;
    /* Hidden by default */
    width: var(--acc-panel-width);
    height: 100vh;
    background: var(--acc-bg);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: var(--acc-z-index);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.acc-panel.active {
    left: 0;
}

.acc-header {
    padding: 1.5rem;
    background: var(--acc-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.acc-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
}

.acc-body {
    padding: 1.5rem;
    flex: 1;
}

/* Grid Layout for Buttons */
.acc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.acc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.acc-btn:hover {
    border-color: var(--acc-primary);
    background: #f8fafc;
}

.acc-btn.active {
    background: #eff6ff;
    border-color: var(--acc-primary);
    color: var(--acc-primary);
}

.acc-btn i,
.acc-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.acc-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Sliders / Controls */
.acc-control-group {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
}

.acc-control-label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    color: var(--acc-text);
}

.acc-range-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.acc-range-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--acc-border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: var(--acc-primary);
}

.acc-range-display {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--acc-border);
}

/* Reset Button */
.acc-reset {
    width: 100%;
    padding: 1rem;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    color: var(--acc-text);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: background 0.2s;
}

.acc-reset:hover {
    background: #e2e8f0;
}

/* --- Accessibility Modes (Applied to Body/HTML) --- */

/* Grayscale */
.acc-mode-grayscale {
    filter: grayscale(100%);
}

/* High Contrast */
.acc-mode-contrast {
    background-color: black !important;
    color: yellow !important;
}

.acc-mode-contrast * {
    background-color: black !important;
    color: yellow !important;
    border-color: yellow !important;
}

.acc-mode-contrast img {
    filter: grayscale(100%) contrast(120%);
}

/* Invert */
.acc-mode-invert {
    filter: invert(100%);
}

.acc-mode-invert img {
    filter: invert(100%);
    /* Re-invert images so they look normal */
}

/* Highlight Links */
.acc-mode-links a {
    text-decoration: underline !important;
    background-color: yellow !important;
    color: black !important;
    font-weight: bold !important;
}

/* Readable Font */
.acc-mode-font * {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Hide Images */
.acc-mode-hide-images img,
.acc-mode-hide-images video,
.acc-mode-hide-images .hero-image {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Big Cursor */
.acc-mode-cursor-big * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewport="0 0 48 48" style="fill:black;stroke:white;stroke-width:2px;"><path d="M0 0 L20 40 L26 26 L40 20 Z"/></svg>') 0 0, auto !important;
}

.acc-mode-cursor-white * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewport="0 0 48 48" style="fill:white;stroke:black;stroke-width:2px;"><path d="M0 0 L20 40 L26 26 L40 20 Z"/></svg>') 0 0, auto !important;
}