/* ================================================================
   PANEL DOSTĘPNOŚCI – styles
   ================================================================ */

/* ----- PASEK GÓRNY ----- */
.a11y-bar {
    background: #1e293b;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 20px;
    flex-wrap: wrap;
    font-family: "Segoe UI", Arial, sans-serif;
    position: relative;
    z-index: 9990;
}

.a11y-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11y-group-label {
    color: #94a3b8;
    font-size: 0.75rem;
    white-space: nowrap;
}

.a11y-btns {
    display: flex;
    gap: 4px;
}

/* ----- PRZYCISKI ----- */
.a11y-btn {
    background: transparent;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.a11y-btn:hover {
    background: #334155;
    border-color: #64748b;
}
.a11y-btn:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}
.a11y-btn[aria-pressed="true"] {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* Wizualne rozmiary czcionki na przyciskach A */
#a11y-font-dec   { font-size: 0.75rem; }
#a11y-font-reset { font-size: 0.875rem; }
#a11y-font-inc   { font-size: 1rem; font-weight: 700; }

.a11y-reset-btn {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.75rem;
}
.a11y-reset-btn:hover {
    color: #e2e8f0;
    border-color: #64748b;
}

@media (max-width: 640px) {
    .a11y-bar    { gap: 10px; padding: 8px 12px; }
    .a11y-group-label { display: none; }
    .a11y-reset-btn   { margin-left: 0; }
}

/* ================================================================
   TRYBY KONTRASTU
   ================================================================ */

/* ----- WYSOKI KONTRAST ----- */
html.contrast-high body,
html.contrast-high main,
html.contrast-high section,
html.contrast-high article,
html.contrast-high header,
html.contrast-high footer,
html.contrast-high nav,
html.contrast-high div,
html.contrast-high aside {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.contrast-high a,
html.contrast-high a * {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

html.contrast-high p,
html.contrast-high li,
html.contrast-high span,
html.contrast-high strong,
html.contrast-high h1,
html.contrast-high h2,
html.contrast-high h3,
html.contrast-high h4,
html.contrast-high label {
    color: #fff !important;
    background-color: transparent !important;
}

html.contrast-high button,
html.contrast-high [type="submit"],
html.contrast-high [role="button"] {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.contrast-high input,
html.contrast-high textarea,
html.contrast-high select {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.contrast-high img {
    filter: brightness(0.85) contrast(1.2);
}

/* Pasek dostępności w trybie wysokiego kontrastu */
html.contrast-high .a11y-bar {
    background: #000 !important;
    border-bottom: 2px solid #fff !important;
}
html.contrast-high .a11y-btn {
    border-color: #fff !important;
    color: #fff !important;
}
html.contrast-high .a11y-btn[aria-pressed="true"] {
    background: #ffff00 !important;
    color: #000 !important;
    border-color: #ffff00 !important;
}
html.contrast-high .a11y-group-label {
    color: #ccc !important;
}

/* Nakładki hero nie przysłaniają treści */
html.contrast-high .hero::before,
html.contrast-high .hero::after {
    background: rgba(0,0,0,0.85) !important;
}

/* ----- KONTRAST NEGATYWOWY ----- */
html.contrast-negative {
    filter: invert(1) hue-rotate(180deg);
}
html.contrast-negative img,
html.contrast-negative video {
    /* ponowne odwrócenie – zdjęcia wyglądają normalnie */
    filter: invert(1) hue-rotate(180deg);
}
