/* ═══════════════════════════════════════════════════════════════════════
   pp10-a11y.css  –  Pasek dostępności WCAG 2.2 AAA
   Wszystkie kolory, rozmiary i tryby zarządzane przez klasy na <html>
═══════════════════════════════════════════════════════════════════════ */

/* ── Pasek (toolbar) ─────────────────────────────────────────────────── */
#a11y-bar {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #6a4895;
  border-radius: 12px 0 0 12px;
  box-shadow: -3px 0 18px rgba(0,0,0,.28);
  overflow: hidden;
  transition: width .22s ease;
  width: 52px;
}

#a11y-bar.expanded {
  width: 230px;
}

/* ── Przycisk otwierający (toggle) ───────────────────────────────────── */
#a11y-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: #8b4618;
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  width: 100%;
  text-align: left;
  border-bottom: 2px solid rgba(255,255,255,.15);
  transition: background .15s;
  min-height: 52px;
}
#a11y-toggle:hover { background: #b85a1e; }
#a11y-toggle:focus-visible {
  outline: 3px solid #ecc931;
  outline-offset: -3px;
}
#a11y-toggle .a11y-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: #fff;
}
#a11y-toggle .a11y-label {
  font-size: .82rem;
  letter-spacing: .03em;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
}
#a11y-bar.expanded #a11y-toggle .a11y-label { opacity: 1; }

/* ── Panel z opcjami ─────────────────────────────────────────────────── */
#a11y-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height .28s ease;
}
#a11y-bar.expanded #a11y-panel {
  max-height: 700px;
}

/* ── Sekcja wewnątrz panelu ──────────────────────────────────────────── */
.a11y-section {
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.a11y-section:last-child { border-bottom: none; }

.a11y-section-title {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 7px;
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  display: block;
}

/* ── Przyciski wewnątrz panelu ───────────────────────────────────────── */
.a11y-btn-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.a11y-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 7px;
  color: #fff;
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, transform .1s;
  text-align: center;
  line-height: 1.2;
}
.a11y-btn:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.45);
}
.a11y-btn:active { transform: scale(.96); }
.a11y-btn:focus-visible {
  outline: 3px solid #ecc931;
  outline-offset: 2px;
}
.a11y-btn.active {
  background: #d16a24;
  border-color: #d16a24;
  color: #fff;
}
.a11y-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Suwak rozmiaru czcionki ─────────────────────────────────────────── */
.a11y-slider-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
}
.a11y-slider-wrap span {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  min-width: 30px;
  text-align: center;
}
#a11y-font-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.25);
  outline: none;
  cursor: pointer;
}
#a11y-font-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #d16a24;
  cursor: pointer;
  border: 2px solid #fff;
}
#a11y-font-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #d16a24;
  cursor: pointer;
  border: 2px solid #fff;
}
#a11y-font-slider:focus-visible {
  outline: 3px solid #ecc931;
  outline-offset: 4px;
}

/* ── Przycisk resetowania ────────────────────────────────────────────── */
#a11y-reset {
  width: 100%;
  margin: 0;
  padding: 9px;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 7px;
  color: rgba(255,255,255,.8);
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#a11y-reset:hover { background: rgba(255,255,255,.15); color: #fff; }
#a11y-reset:focus-visible { outline: 3px solid #ecc931; outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   TRYBY – klasy aplikowane na <html>
═══════════════════════════════════════════════════════════════════════ */

/* ── Wysoki kontrast (czarno-biały) ─────────────────────────────────── */
html.a11y-high-contrast {
  --c-green:        #000000 !important;
  --c-green-mid:    #000000 !important;
  --c-green-light:  #ffffff !important;
  --c-amber:        #000000 !important;
  --c-amber-dark:   #000000 !important;
  --c-amber-light:  #ffffff !important;
  --c-white:        #ffffff !important;
  --c-bg:           #ffffff !important;
  --c-surface:      #ffffff !important;
  --c-text:         #000000 !important;
  --c-muted:        #000000 !important;
  --c-border:       #000000 !important;
  --c-focus:        #0000ff !important;
  filter: none !important;
}
html.a11y-high-contrast body { background: #fff !important; color: #000 !important; }
html.a11y-high-contrast a { color: #0000cc !important; text-decoration: underline !important; }
html.a11y-high-contrast a:visited { color: #551A8B !important; }
html.a11y-high-contrast a:focus-visible,
html.a11y-high-contrast button:focus-visible,
html.a11y-high-contrast input:focus-visible,
html.a11y-high-contrast textarea:focus-visible,
html.a11y-high-contrast select:focus-visible {
  outline: 4px solid #0000ff !important;
  outline-offset: 3px !important;
}
html.a11y-high-contrast .site-header,
html.a11y-high-contrast .site-nav-wrap,
html.a11y-high-contrast .page-band,
html.a11y-high-contrast footer,
html.a11y-high-contrast .sidebar-card-head,
html.a11y-high-contrast #a11y-bar {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-high-contrast .site-header { border-bottom: 3px solid #000 !important; }
html.a11y-high-contrast .nav-list > li > a,
html.a11y-high-contrast .nav-list > li > button { color: #fff !important; }
html.a11y-high-contrast .nav-dropdown { background: #fff !important; border: 2px solid #000 !important; }
html.a11y-high-contrast .nav-dropdown li a { color: #000 !important; }
html.a11y-high-contrast .content-box,
html.a11y-high-contrast .sidebar-card,
html.a11y-high-contrast .news-card,
html.a11y-high-contrast .recruit-card { border: 2px solid #000 !important; }
html.a11y-high-contrast .btn-main,
html.a11y-high-contrast .btn-amber { background: #000 !important; color: #fff !important; border: 2px solid #000 !important; }
html.a11y-high-contrast .info-box { background: #fff !important; border: 2px solid #000 !important; color: #000 !important; }
html.a11y-high-contrast .logo-emblem { background: #000 !important; border: 2px solid #fff !important; }
html.a11y-high-contrast img { border: 1px solid #000; }

/* ── Negatyw (ciemne tło, jasny tekst) ──────────────────────────────── */
html.a11y-inverted {
  --c-green:        #C4ADFF !important;
  --c-green-mid:    #B39DFF !important;
  --c-green-light:  #150D2E !important;
  --c-amber:        #FFB347 !important;
  --c-amber-dark:   #FFD080 !important;
  --c-amber-light:  #1A1000 !important;
  --c-white:        #121212 !important;
  --c-bg:           #100D2A !important;
  --c-surface:      #1E1340 !important;
  --c-text:         #EDE8FF !important;
  --c-muted:        #C4ADFF !important;
  --c-border:       #2D1E5A !important;
  --c-focus:        #FFB347 !important;
}
html.a11y-inverted body { background: #100D2A !important; color: #EDE8FF !important; }
html.a11y-inverted a { color: #7DD9FF !important; }
html.a11y-inverted .site-header { background: #1E1340 !important; border-bottom-color: #2D1E5A !important; }
html.a11y-inverted .nav-list > li > a,
html.a11y-inverted .nav-list > li > button { color: rgba(232,245,236,.93) !important; }
html.a11y-inverted .nav-dropdown { background: #1E1340 !important; border-color: #2D1E5A !important; }
html.a11y-inverted .nav-dropdown li a { color: #EDE8FF !important; }
html.a11y-inverted .nav-dropdown li a:hover { background: #150D2E !important; }
html.a11y-inverted .content-box,
html.a11y-inverted .sidebar-card,
html.a11y-inverted .news-card,
html.a11y-inverted .recruit-card { background: #1E1340 !important; border-color: #2D1E5A !important; }
html.a11y-inverted footer { background: #0E0A22 !important; }
html.a11y-inverted .news-card-thumb,
html.a11y-inverted .news-item-thumb { background: #150D2E !important; }
html.a11y-inverted .recruit-card-img { background: #150D2E !important; }
html.a11y-inverted .info-box { background: #150D2E !important; color: #C4ADFF !important; }
html.a11y-inverted .warn-box { background: #1A1000 !important; color: #FFD080 !important; }

/* ── Żółte tło (dla słabowidzących) ─────────────────────────────────── */
html.a11y-yellow {
  --c-bg:           #FFFFF0 !important;
  --c-white:        #FFFFF5 !important;
  --c-surface:      #FFFFF5 !important;
  --c-text:         #000000 !important;
  --c-muted:        #1A1A00 !important;
  --c-border:       #888800 !important;
}
html.a11y-yellow body { background: #FFFFF0 !important; color: #000 !important; }
html.a11y-yellow .content-box,
html.a11y-yellow .sidebar-card,
html.a11y-yellow .news-card,
html.a11y-yellow .recruit-card { background: #FFFFF5 !important; border-color: #888800 !important; }
html.a11y-yellow a { color: #00008B !important; }

/* ── Podkreślenie linków ─────────────────────────────────────────────── */
html.a11y-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 2px !important;
}

/* ── Zwiększony odstęp wierszy ───────────────────────────────────────── */
html.a11y-line-height body,
html.a11y-line-height p,
html.a11y-line-height li,
html.a11y-line-height td {
  line-height: 2.2 !important;
}
html.a11y-line-height h1,
html.a11y-line-height h2,
html.a11y-line-height h3 {
  line-height: 1.6 !important;
}

/* ── Czytelna czcionka (dysleksja) ──────────────────────────────────── */
html.a11y-dyslexia body,
html.a11y-dyslexia p,
html.a11y-dyslexia li,
html.a11y-dyslexia td,
html.a11y-dyslexia a,
html.a11y-dyslexia button,
html.a11y-dyslexia input,
html.a11y-dyslexia label {
  font-family: 'Atkinson Hyperlegible', 'Verdana', 'Trebuchet MS', sans-serif !important;
  letter-spacing: .04em !important;
  word-spacing: .12em !important;
}
html.a11y-dyslexia h1,
html.a11y-dyslexia h2,
html.a11y-dyslexia h3 {
  font-family: 'Atkinson Hyperlegible', 'Verdana', sans-serif !important;
}

/* ── Zatrzymaj animacje ──────────────────────────────────────────────── */
html.a11y-no-anim *,
html.a11y-no-anim *::before,
html.a11y-no-anim *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* ── Kursor duży ─────────────────────────────────────────────────────── */
html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M5 2 L5 32 L12 25 L18 38 L22 36 L16 23 L26 23 Z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 5 2, auto !important;
}

/* ── Fokus zawsze widoczny ───────────────────────────────────────────── */
html.a11y-focus-visible *:focus {
  outline: 4px solid #E76F00 !important;
  outline-offset: 3px !important;
  border-radius: 3px !important;
}

/* ── Rozmiar czcionki (skalowanie przez font-size na <html>) ─────────── */
/* Kontrolowane przez JS: html style="font-size: Xpx" */

/* ── Mobilny pasek na dole (przy małych ekranach) ───────────────────── */
@media (max-width: 600px) {
  #a11y-bar {
    top: auto;
    bottom: 70px; /* above cookie banner */
    right: 0;
    transform: none;
    border-radius: 12px 0 0 12px;
    width: 44px;
  }
  #a11y-bar.expanded { width: 220px; }
}

/* ── Ukryj toolbar przy druku ────────────────────────────────────────── */
@media print { #a11y-bar { display: none !important; } }
