/* =========================================================================
   PASEK UŁATWIEŃ DOSTĘPU — rozmiar tekstu + wysoki kontrast
   ========================================================================= */

/* --- Skalowanie tekstu (na <html>, skaluje jednostki rem) --- */
html.devents-fs-1 { font-size: 112.5%; }
html.devents-fs-2 { font-size: 125%; }

/* --- Wysoki kontrast: nadpisanie tokenów (tryb jasny) --- */
html.devents-high-contrast {
    --text-primary: #000000;
    --text-secondary: #111111;
    --text-light: #222222;
    --border-primary: #000000;
    --border-secondary: #1a1a1a;
}
/* Wysoki kontrast: tryb ciemny (większa specyficzność niż body.dark-mode) */
html.devents-high-contrast body.dark-mode {
    --text-primary: #ffffff;
    --text-secondary: #f2f2f2;
    --text-light: #dcdcdc;
    --border-primary: #ffffff;
    --border-secondary: #dadada;
}
html.devents-high-contrast a:not(.btn):not(.nav-link):not(.lang-tab-btn) {
    text-decoration: underline;
}
html.devents-high-contrast :focus-visible {
    outline: 3px solid var(--primary, #00857c) !important;
    outline-offset: 2px;
}

/* --- Widget paska --- */
.devents-a11y {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 99990;
    font-family: var(--font-family-base, system-ui, -apple-system, sans-serif);
}

.devents-a11y__toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: var(--primary, #00857c);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.devents-a11y__toggle:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}
.devents-a11y__toggle svg { width: 28px; height: 28px; display: block; }

.devents-a11y__panel {
    position: absolute;
    left: 0;
    bottom: 62px;
    width: 240px;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #111111);
    border: 1px solid var(--border-primary, #cccccc);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    padding: 14px;
}
.devents-a11y__panel[hidden] { display: none; }

.devents-a11y__title {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary, #111111);
}
.devents-a11y__group { margin-bottom: 12px; }
.devents-a11y__label {
    font-size: 0.75rem;
    color: var(--text-secondary, #555555);
    margin: 0 0 6px;
}
.devents-a11y__row { display: flex; gap: 6px; }

.devents-a11y__btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-primary, #cccccc);
    border-radius: 8px;
    background: var(--bg-primary, #f7f7f7);
    color: var(--text-primary, #111111);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.2;
}
.devents-a11y__btn--block { width: 100%; margin-top: 4px; }
.devents-a11y__btn[aria-pressed="true"] {
    background: var(--primary, #00857c);
    border-color: var(--primary, #00857c);
    color: #ffffff;
}
.devents-a11y__btn:focus-visible {
    outline: 3px solid var(--primary, #00857c);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .devents-a11y { left: 10px; bottom: 10px; }
    .devents-a11y__panel { width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
    .devents-a11y * { transition: none !important; }
}
