/* Accessibility menu (js/ui/AccessibilityMenu.js). Plain CSS so it works on
   every page without a Tailwind rebuild. */

.a11y-high-contrast body {
    filter: contrast(1.3);
}

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

.a11y-icon {
    width: 1rem;
    height: 1rem;
}

/* Phones: the header toolbar is a 5-column grid. Pin the accessibility
   button to the right of the title row instead of adding a 6th cell. */
@media (max-width: 639px) {
    #a11y-button {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.375rem;
    }
}

.a11y-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: 0;
    background: #4f46e5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    cursor: pointer;
}

.a11y-fab .a11y-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.a11y-panel {
    position: fixed;
    z-index: 70;
    width: 15rem;
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    padding: 0.875rem;
    background: #fff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
}

.a11y-panel[hidden] {
    display: none;
}

.a11y-panel-title {
    margin: 0 0 0.625rem;
    font-size: 1rem;
    font-weight: 700;
}

.a11y-row-label {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.a11y-size {
    display: flex;
    margin-bottom: 0.75rem;
}

.a11y-size button,
.a11y-reset {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
}

.a11y-size button:first-child {
    border-radius: 0.375rem 0 0 0.375rem;
}

.a11y-size button:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: 0;
}

.a11y-size button:hover:not([disabled]),
.a11y-reset:hover {
    background: #f1f5f9;
}

.a11y-size button[disabled] {
    color: #94a3b8;
    cursor: default;
}

.a11y-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.a11y-switch input {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}

.a11y-reset {
    width: 100%;
    margin-top: 0.25rem;
    border-radius: 0.375rem;
}

.a11y-panel button:focus-visible,
.a11y-panel input:focus-visible,
.a11y-fab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
