/* ZDSMA accessibility styles. Loaded globally; only takes effect when
   scorpioA11y enables it via the .a11y-high-contrast class on <html>. */

/* Floating, draggable accessibility panel anchored to the top-right corner. */
.accessibility-panel {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1050;
    background: #fff;
    border: 1px solid #d6dadf;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 12rem;
    max-width: 16rem;
}

.accessibility-panel-header {
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.35rem;
    user-select: none;
    touch-action: none;
}

.accessibility-panel-header:active {
    cursor: grabbing;
}

.accessibility-panel.collapsed {
    min-width: 0;
    max-width: none;
    padding: 0.25rem 0.4rem;
}

.accessibility-panel.collapsed .accessibility-panel-header {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.accessibility-panel.collapsed .title {
    display: none;
}

.accessibility-collapse-btn {
    cursor: pointer;
}

/* Visible focus everywhere — required by WCAG 2.4.7 / ZDSMA. */
.accessibility-panel .btn:focus-visible,
.a11y-high-contrast :focus-visible {
    outline: 3px solid #ffbf00;
    outline-offset: 2px;
}

html.a11y-high-contrast .accessibility-panel {
    background: #000 !important;
    border-color: #fff !important;
}

html.a11y-high-contrast .accessibility-panel-header {
    color: #fff !important;
    border-bottom-color: #fff !important;
}

/* High-contrast palette: WCAG AAA black/white + amber focus. */
html.a11y-high-contrast,
html.a11y-high-contrast body {
    background: #000 !important;
    color: #fff !important;
}

html.a11y-high-contrast a,
html.a11y-high-contrast .text-primary,
html.a11y-high-contrast .text-muted,
html.a11y-high-contrast .text-secondary {
    color: #ffe066 !important;
}

html.a11y-high-contrast .card,
html.a11y-high-contrast .alert,
html.a11y-high-contrast .form-control,
html.a11y-high-contrast .form-select,
html.a11y-high-contrast .table {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

html.a11y-high-contrast .btn,
html.a11y-high-contrast .btn-outline-secondary,
html.a11y-high-contrast .btn-outline-primary {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.a11y-high-contrast .btn-primary,
html.a11y-high-contrast .btn-success {
    background: #ffe066 !important;
    color: #000 !important;
    border-color: #ffe066 !important;
}

html.a11y-high-contrast .progress {
    background: #222 !important;
}

html.a11y-high-contrast .progress-bar {
    background: #ffe066 !important;
    color: #000 !important;
}

html.a11y-high-contrast .badge {
    background: #fff !important;
    color: #000 !important;
}
