/* PwD Accessibility Assistant block styles */

.block_pwda11y .card,
.block_pwda11y.card {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.block_pwda11y .card-body {
    padding: 0;
}

.block-pwda11y-root {
    position: fixed;
    top: 11.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwda11y-toggle-button {
    border-radius: 999px;
    padding: 0.75rem 0.9rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #005c97;
    background: linear-gradient(135deg, #005c97 0%, #363795 100%);
    color: #ffffff;
}

.pwda11y-toggle-button:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

.pwda11y-toggle-icon {
    display: inline-block;
    line-height: 1;
}

.pwda11y-panel {
    margin-top: 0.75rem;
    width: 340px;
    max-width: calc(100vw - 2rem);
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 1rem 1.1rem 1.1rem;
    max-height: calc(100vh - 5rem);
    overflow: auto;
}

.pwda11y-panel-header {
    margin-bottom: 0.75rem;
}

.pwda11y-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.pwda11y-panel-description {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: #555;
}

.pwda11y-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.25rem;
}

.pwda11y-control-group {
    border-top: 1px solid #eee;
    padding-top: 0.6rem;
}

.pwda11y-control-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.pwda11y-control-title {
    font-size: 0.95rem;
    margin: 0 0 0.4rem;
}

.pwda11y-subgroup {
    margin-bottom: 0.35rem;
}

.pwda11y-subgroup-header span {
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
}

.pwda11y-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.pwda11y-control-actions-column {
    flex-direction: column;
    align-items: stretch;
}

.pwda11y-button {
    border-radius: 999px;
    border: 1px solid #ccc;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    background-color: #f8f8f8;
    white-space: normal;
    text-align: left;
}

.pwda11y-button-primary {
    background-color: #005c97;
    border-color: #005c97;
    color: #ffffff;
}

.pwda11y-button[aria-pressed="true"] {
    background-color: #363795;
    border-color: #363795;
    color: #ffffff;
}

.pwda11y-button:focus-visible {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

.pwda11y-help-text {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #666;
}

.pwda11y-language-row {
    align-items: center;
}

.pwda11y-select {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 999px;
    border: 1px solid #ccc;
}

/* Hover highlight for click-to-read mode */
.pwda11y-hover-highlight {
    outline: 3px solid #005c97 !important;
    outline-offset: 2px;
    background-color: rgba(0, 92, 151, 0.05);
}

/* Font size presets (light-touch scaling) */
body.pwda11y-font-small {
    font-size: 0.9em;
}

body.pwda11y-font-default {
    font-size: 1em;
}

body.pwda11y-font-large {
    font-size: 1.1em;
}

body.pwda11y-font-xlarge {
    font-size: 1.2em;
}

/* Theme presets */
body.pwda11y-theme-dark {
    background-color: #101418;
    color: #e5e7eb;
}

body.pwda11y-theme-dark a {
    color: #93c5fd;
}

body.pwda11y-theme-highcontrast {
    background-color: #000000;
    color: #ffffff;
}

body.pwda11y-theme-highcontrast a {
    color: #ffff00;
}

/* Keep cards readable across themes */
body.pwda11y-theme-dark .card,
body.pwda11y-theme-dark .card-body,
body.pwda11y-theme-highcontrast .card,
body.pwda11y-theme-highcontrast .card-body {
    background-color: inherit;
    color: inherit;
}

/* Focus / reading mode: narrow main content and dim background */
body.pwda11y-focus-mode #page,
body.pwda11y-focus-mode #page-content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body.pwda11y-focus-mode #page.drawers .drawer,
body.pwda11y-focus-mode #nav-drawer,
body.pwda11y-focus-mode #block-region-side-pre {
    opacity: 0.3;
}
/* Accordion layout */
.pwda11y-accordion {
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

.pwda11y-accordion:first-child {
    border-top: 0;
}

.pwda11y-accordion-header {
    width: 100%;
    background: none;
    border: 0;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.pwda11y-accordion-header::after {
    content: "▾";
    float: right;
}

.pwda11y-accordion-header[aria-expanded="true"]::after {
    content: "▴";
}

.pwda11y-accordion-panel {
    padding: 0.4rem 0 0.8rem;
}
.pwda11y-panel-header {
    position: relative;
}

.pwda11y-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.pwda11y-search {
    margin: 10px 0 15px;
}

.pwda11y-search-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
/* ===== Accessibility Personas (FINAL – WORKING) ===== */

/* ADHD Friendly */
.pwda11y-persona-adhd,
.pwda11y-persona-adhd * ,
body.pwda11y-persona-adhd,
body.pwda11y-persona-adhd * {
    animation: none !important;
    transition: none !important;
}
.pwda11y-persona-adhd,
body.pwda11y-persona-adhd {
    scroll-behavior: auto !important;
    line-height: 1.8 !important;
    letter-spacing: 0.04em !important;
}

/* Dyslexia Friendly */
.pwda11y-persona-dyslexia,
body.pwda11y-persona-dyslexia {
    font-family: Arial, Verdana, sans-serif !important;
    letter-spacing: 0.06em !important;
    word-spacing: 0.16em !important;
    line-height: 1.8 !important;
}

/* Low Vision */
.pwda11y-persona-lowvision,
body.pwda11y-persona-lowvision {
    font-size: 125% !important;
    filter: contrast(1.3) !important;
}
.pwda11y-persona-lowvision a,
.pwda11y-persona-lowvision button,
body.pwda11y-persona-lowvision a,
body.pwda11y-persona-lowvision button {
    outline: 2px solid #000 !important;
}

/* Color Blindness */
.pwda11y-persona-colorblind,
body.pwda11y-persona-colorblind {
    filter: grayscale(1) contrast(1.2) !important;
}

/* Astigmatism */
.pwda11y-persona-astigmatism,
body.pwda11y-persona-astigmatism {
    filter: blur(0.3px) contrast(1.05) !important;
}

/* Elderly */
.pwda11y-persona-elderly,
body.pwda11y-persona-elderly {
    font-size: 115% !important;
    line-height: 1.9 !important;
}
.pwda11y-persona-elderly button,
body.pwda11y-persona-elderly button {
    padding: 0.75em 1em !important;
}

/* Motor Disabilities */
.pwda11y-persona-motor button,
.pwda11y-persona-motor a,
body.pwda11y-persona-motor button,
body.pwda11y-persona-motor a {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* Keyboard Navigation */
.pwda11y-persona-keyboard *:focus,
body.pwda11y-persona-keyboard *:focus {
    outline: 3px solid #005fcc !important;
    outline-offset: 3px !important;
}

/* Epilepsy / Seizure Safe */
.pwda11y-persona-epilepsy *,
.pwda11y-persona-seizure *,
body.pwda11y-persona-epilepsy *,
body.pwda11y-persona-seizure * {
    animation: none !important;
    transition: none !important;
}

/* Blindness */
.pwda11y-persona-blindness,
body.pwda11y-persona-blindness {
    cursor: default !important;
}
/* Persona toggle switch */
.pwda11y-toggle {
    width: 42px;
    height: 22px;
    border-radius: 22px;
    border: none;
    background: #ccc;
    position: relative;
    cursor: pointer;
    float: right;
}

/* knob */
.pwda11y-toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

/* ON state */
.pwda11y-toggle[aria-pressed="true"] {
    background: #005c97;
}

.pwda11y-toggle[aria-pressed="true"]::after {
    transform: translateX(20px);
}
