/* ================================================================
   EEA Accessibility — Floating button + side panel
   ================================================================ */

.eea-a11y {
    --eea-a11y-navy:   #080872;
    --eea-a11y-gold:   #C7A73E;
    --eea-a11y-white:  #ffffff;
    --eea-a11y-accent: #C7A73E;
    --eea-a11y-ease:   cubic-bezier(.2, .8, .2, 1);
    position: relative;
    z-index: 99990;
}

.eea-a11y *,
.eea-a11y *::before,
.eea-a11y *::after {
    box-sizing: border-box;
}

/* ================================================================
   FLOATING BUTTON
   ================================================================ */
.eea-a11y__btn {
    position: fixed;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--eea-a11y-gold);
    color: var(--eea-a11y-navy);
    border: 2px solid var(--eea-a11y-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99990;
    box-shadow: 0 10px 28px rgba(8, 8, 114, 0.35);
    transition: all .3s var(--eea-a11y-ease);
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
}

.eea-a11y__btn svg {
    width: 22px;
    height: 22px;
    color: inherit;
    fill: currentColor;
}

.eea-a11y__btn:hover,
.eea-a11y__btn:focus-visible {
    background: var(--eea-a11y-navy);
    border-color: var(--eea-a11y-navy);
    color: var(--eea-a11y-white);
    transform: scale(1.08);
}

/* Button positions */
.eea-a11y-pos-bottom-right .eea-a11y__btn { right: 24px; bottom: 24px; }
.eea-a11y-pos-bottom-left  .eea-a11y__btn { left: 24px;  bottom: 24px; }
.eea-a11y-pos-middle-right .eea-a11y__btn { right: 16px; top: 50%; transform: translateY(-50%); }
.eea-a11y-pos-middle-left  .eea-a11y__btn { left: 16px;  top: 50%; transform: translateY(-50%); }

.eea-a11y-pos-middle-right .eea-a11y__btn:hover,
.eea-a11y-pos-middle-left  .eea-a11y__btn:hover {
    transform: translateY(-50%) scale(1.08);
}

/* ================================================================
   PANEL
   ================================================================ */
.eea-a11y__panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(94vw, 360px);
    background: var(--eea-a11y-navy);
    color: var(--eea-a11y-white);
    z-index: 99989;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    transition: transform .4s var(--eea-a11y-ease);
    overflow-y: auto;
    font-family: 'Montserrat', 'Poppins', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    visibility: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Left positioned button → panel slides from left; right positioned → slides from right */
.eea-a11y-pos-bottom-left .eea-a11y__panel,
.eea-a11y-pos-middle-left .eea-a11y__panel {
    left: 0;
    transform: translateX(-100%);
}
.eea-a11y-pos-bottom-right .eea-a11y__panel,
.eea-a11y-pos-middle-right .eea-a11y__panel {
    right: 0;
    transform: translateX(100%);
}

.eea-a11y__panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Panel header */
.eea-a11y__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(199, 167, 62, 0.25);
    position: sticky;
    top: 0;
    background: var(--eea-a11y-navy);
    z-index: 1;
}

.eea-a11y__title {
    margin: 0;
    font-family: 'Baskervville', 'GFS Didot', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--eea-a11y-white);
    line-height: 1.2;
}

.eea-a11y__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: var(--eea-a11y-white);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all .25s var(--eea-a11y-ease);
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eea-a11y__close:hover {
    background: var(--eea-a11y-gold);
    color: var(--eea-a11y-navy);
    border-color: var(--eea-a11y-gold);
    transform: rotate(90deg);
}

/* Panel body */
.eea-a11y__body {
    padding: 22px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.eea-a11y__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eea-a11y__group-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.eea-a11y__btn-row {
    display: flex;
    gap: 8px;
}

.eea-a11y__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Option buttons */
.eea-a11y__opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: var(--eea-a11y-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--eea-a11y-ease);
    flex: 1;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.3;
}

.eea-a11y__opt:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

.eea-a11y__opt--toggle {
    flex-direction: column;
    gap: 6px;
    padding: 14px 8px;
    text-align: center;
}

.eea-a11y__opt-icon {
    font-size: 18px;
    line-height: 1;
}

.eea-a11y__opt-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.eea-a11y__opt[aria-pressed="true"],
.eea-a11y__opt.is-active {
    background: var(--eea-a11y-accent);
    border-color: var(--eea-a11y-accent);
    color: var(--eea-a11y-navy);
}

/* Reset button */
.eea-a11y__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    margin-top: 6px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    color: var(--eea-a11y-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .25s var(--eea-a11y-ease);
    appearance: none;
    -webkit-appearance: none;
}

.eea-a11y__reset:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--eea-a11y-gold);
    color: var(--eea-a11y-gold);
}

/* ================================================================
   APPLIED ACCESSIBILITY STATES (on html element)
   ================================================================ */

/* High contrast — yellow on black */
html.eea-a11y-contrast,
html.eea-a11y-contrast body {
    background: #000 !important;
    color: #ffff00 !important;
}
html.eea-a11y-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}
html.eea-a11y-contrast * {
    background-image: none !important;
}

/* Negative contrast (invert) */
html.eea-a11y-negative {
    filter: invert(1) hue-rotate(180deg);
}
html.eea-a11y-negative img,
html.eea-a11y-negative video,
html.eea-a11y-negative iframe {
    filter: invert(1) hue-rotate(180deg);
}

/* Grayscale */
html.eea-a11y-grayscale {
    filter: grayscale(1);
}

/* Underline links */
html.eea-a11y-underline-links a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

/* Readable sans-serif font */
html.eea-a11y-readable-font,
html.eea-a11y-readable-font body,
html.eea-a11y-readable-font * {
    font-family: 'Atkinson Hyperlegible', 'Verdana', 'Arial', system-ui, sans-serif !important;
}

/* Big cursor */
html.eea-a11y-big-cursor,
html.eea-a11y-big-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><path d="M4 4l32 12-14 4-4 14z" fill="black" stroke="white" stroke-width="2"/></svg>') 4 4, auto !important;
}

/* Increased line height */
html.eea-a11y-line-height body,
html.eea-a11y-line-height p,
html.eea-a11y-line-height li,
html.eea-a11y-line-height td {
    line-height: 2 !important;
}

/* Strong focus outline */
html.eea-a11y-focus-outline a:focus,
html.eea-a11y-focus-outline button:focus,
html.eea-a11y-focus-outline input:focus,
html.eea-a11y-focus-outline textarea:focus,
html.eea-a11y-focus-outline select:focus,
html.eea-a11y-focus-outline [tabindex]:focus {
    outline: 3px solid #ffeb3b !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px rgba(255, 235, 59, 0.35) !important;
}

/* Pause animations */
html.eea-a11y-pause-anim *,
html.eea-a11y-pause-anim *::before,
html.eea-a11y-pause-anim *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .eea-a11y-pos-bottom-right .eea-a11y__btn,
    .eea-a11y-pos-bottom-left  .eea-a11y__btn {
        width: 46px;
        height: 46px;
        bottom: 16px;
    }
    .eea-a11y-pos-bottom-right .eea-a11y__btn { right: 16px; }
    .eea-a11y-pos-bottom-left  .eea-a11y__btn { left: 16px; }
}
