/* ─────────────────────────────────────────────────────────────
   Safe — ułatwienia dostępności (panel WCAG) + pływające przyciski
   Wstrzykiwane przez js/safe-a11y.js. Paleta zgodna z portalem Safe.
   ───────────────────────────────────────────────────────────── */

:root{
  --a11y-navy:#0a1525;
  --a11y-ink:#1c2430;
  --a11y-muted:#66707d;
  --a11y-line:#e5e9ef;
  --a11y-paper:#f4f6f9;
  --a11y-blue:#4a81d3;
  --a11y-blue-dark:#2f6fd0;
}

/* ── Skip link ─────────────────────────────────────────────── */
.safe-skip-link{
  position:fixed; top:-100px; left:16px; z-index:100060;
  background:var(--a11y-navy); color:#fff; padding:12px 20px;
  border-radius:0 0 10px 10px; font-size:15px; font-weight:600;
  text-decoration:none; transition:top .18s ease;
}
.safe-skip-link:focus{ top:0; color:#fff; outline:3px solid var(--a11y-blue); outline-offset:2px; }

/* ── Pływające przyciski (lewy dolny róg) ──────────────────── */
.safe-fab-stack{
  position:fixed; left:18px; bottom:18px; z-index:100040;
  display:flex; flex-direction:column; gap:10px;
}
.safe-fab{
  width:52px; height:52px; min-width:52px; min-height:52px;
  display:flex; align-items:center; justify-content:center;
  background:#fff; color:var(--a11y-blue-dark);
  border:1px solid var(--a11y-line); border-radius:14px;
  box-shadow:0 10px 26px rgba(10,21,37,.16);
  font-size:20px; line-height:1; cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.safe-fab:hover{ background:var(--a11y-blue-dark); color:#fff; transform:translateY(-2px); box-shadow:0 14px 30px rgba(10,21,37,.24); }
.safe-fab:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:3px; }
.safe-fab[aria-expanded="true"]{ background:var(--a11y-blue-dark); color:#fff; }

@media (max-width:575px){
  .safe-fab-stack{ left:12px; bottom:12px; }
  .safe-fab{ width:46px; height:46px; min-width:46px; min-height:46px; font-size:18px; }
}

/* ── Panel ─────────────────────────────────────────────────── */
.safe-a11y-panel{
  position:fixed; left:18px; bottom:84px; z-index:100050;
  width:360px; max-width:calc(100vw - 36px);
  max-height:min(720px, calc(100vh - 110px));
  display:flex; flex-direction:column;
  background:#fff; border:1px solid var(--a11y-line); border-radius:18px;
  box-shadow:0 26px 60px rgba(10,21,37,.24);
  opacity:0; transform:translateY(10px) scale(.98); pointer-events:none;
  transition:opacity .2s ease, transform .22s cubic-bezier(.2,.7,.3,1);
  font-family:inherit; color:var(--a11y-ink);
}
.safe-a11y-panel.is-open{ opacity:1; transform:none; pointer-events:auto; }
.safe-a11y-panel[hidden]{ display:none; }

.safe-a11y-head{
  display:flex; align-items:center; gap:12px;
  padding:18px 18px 16px; border-bottom:1px solid var(--a11y-line);
}
.safe-a11y-head-ic{
  width:34px; height:34px; min-width:34px; display:flex; align-items:center; justify-content:center;
  border-radius:10px; background:rgba(74,129,211,.12); color:var(--a11y-blue-dark); font-size:17px;
}
.safe-a11y-title{ flex:1; font-size:16px; font-weight:700; color:var(--a11y-navy); line-height:1.3; }
.safe-a11y-close{
  width:34px; height:34px; min-width:34px; display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--a11y-line); border-radius:10px;
  color:var(--a11y-muted); font-size:15px; cursor:pointer; transition:background .18s ease, color .18s ease;
}
.safe-a11y-close:hover{ background:var(--a11y-paper); color:var(--a11y-ink); }
.safe-a11y-close:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }

.safe-a11y-body{ padding:18px; overflow-y:auto; display:flex; flex-direction:column; gap:20px; }
.safe-a11y-group-label{
  font-size:11.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--a11y-muted); margin-bottom:10px;
}

/* rozmiar tekstu — segmenty */
.safe-a11y-sizes{
  display:grid; grid-template-columns:repeat(4,1fr); gap:4px;
  background:var(--a11y-paper); border-radius:12px; padding:4px;
}
.safe-a11y-size{
  border:0; background:transparent; border-radius:9px; padding:10px 4px;
  font-size:14px; font-weight:700; color:var(--a11y-muted); cursor:pointer;
  transition:background .18s ease, color .18s ease;
}
.safe-a11y-size:hover{ color:var(--a11y-ink); }
.safe-a11y-size[aria-pressed="true"]{ background:var(--a11y-blue-dark); color:#fff; box-shadow:0 4px 12px rgba(47,111,208,.3); }
.safe-a11y-size:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }

/* opcje kontrastu — lista */
.safe-a11y-options{ display:flex; flex-direction:column; gap:8px; }
.safe-a11y-option{
  display:flex; align-items:center; gap:12px; width:100%;
  padding:13px 15px; background:#fff; border:1px solid var(--a11y-line); border-radius:12px;
  font-size:14.5px; font-weight:600; color:var(--a11y-ink); text-align:left; cursor:pointer;
  transition:border-color .18s ease, background .18s ease;
}
.safe-a11y-option{ line-height:1.25; }
.safe-a11y-option i{ font-size:15px; color:var(--a11y-muted); width:18px; text-align:center; }
.safe-a11y-option:hover{ background:var(--a11y-paper); }
.safe-a11y-option[aria-pressed="true"]{ border-color:var(--a11y-blue); background:rgba(74,129,211,.08); }
.safe-a11y-option[aria-pressed="true"] i{ color:var(--a11y-blue-dark); }
.safe-a11y-option:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }

/* przełączniki */
.safe-a11y-switch{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:13px 14px; background:#fff; border:1px solid var(--a11y-line); border-radius:12px;
  font-size:14.5px; font-weight:600; color:var(--a11y-ink); text-align:left; cursor:pointer;
  transition:border-color .18s ease, background .18s ease;
}
.safe-a11y-switch i{ font-size:15px; color:var(--a11y-muted); width:16px; min-width:16px; text-align:center; }
.safe-a11y-switch span:not(.safe-a11y-track){ flex:1 1 auto; text-align:left; line-height:1.25; white-space:nowrap; }
.safe-a11y-switch:hover{ background:var(--a11y-paper); }
.safe-a11y-switch:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }
.safe-a11y-track{
  flex:0 0 34px; width:34px; height:20px; min-width:34px; max-width:34px;
  margin-left:auto; border-radius:10px; background:#d6dbe4;
  position:relative; transition:background .2s ease;
}
.safe-a11y-track::after{
  content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(10,21,37,.3); transition:transform .2s ease;
}
.safe-a11y-switch[aria-pressed="true"]{ border-color:var(--a11y-blue); background:rgba(74,129,211,.08); }
.safe-a11y-switch[aria-pressed="true"] i{ color:var(--a11y-blue-dark); }
.safe-a11y-switch[aria-pressed="true"] .safe-a11y-track{ background:var(--a11y-blue-dark); }
.safe-a11y-switch[aria-pressed="true"] .safe-a11y-track::after{ transform:translateX(14px); }

/* stopka panelu */
.safe-a11y-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px; border-top:1px solid var(--a11y-line); background:var(--a11y-paper);
  border-radius:0 0 18px 18px;
}
.safe-a11y-reset{
  display:inline-flex; align-items:center; gap:9px;
  padding:11px 16px; background:#fff; border:1px solid var(--a11y-line); border-radius:10px;
  font-size:14px; font-weight:600; color:var(--a11y-ink); cursor:pointer;
  transition:background .18s ease, border-color .18s ease;
}
.safe-a11y-reset:hover{ background:var(--a11y-paper); border-color:#cfd6e0; }
.safe-a11y-reset:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }
.safe-a11y-decl{ font-size:14px; font-weight:600; color:var(--a11y-blue-dark); text-decoration:none; }
.safe-a11y-decl:hover{ color:var(--a11y-blue); text-decoration:underline; }
.safe-a11y-decl:focus-visible{ outline:3px solid var(--a11y-blue); outline-offset:2px; }

/* ── Tryby wyświetlania ────────────────────────────────────── */
html.a11y-fs-110 #wrapper, html.a11y-fs-110 .cookie-banner-safe, html.a11y-fs-110 .cookie-modal-safe{ zoom:1.10; }
html.a11y-fs-125 #wrapper, html.a11y-fs-125 .cookie-banner-safe, html.a11y-fs-125 .cookie-modal-safe{ zoom:1.25; }
html.a11y-fs-150 #wrapper, html.a11y-fs-150 .cookie-banner-safe, html.a11y-fs-150 .cookie-modal-safe{ zoom:1.50; }

html.a11y-invert #wrapper, html.a11y-invert .cookie-banner-safe, html.a11y-invert .cookie-modal-safe{ filter:invert(1) hue-rotate(180deg); }
html.a11y-gray #wrapper, html.a11y-gray .cookie-banner-safe, html.a11y-gray .cookie-modal-safe{ filter:grayscale(1); }
html.a11y-invert #wrapper img, html.a11y-invert #wrapper video{ filter:invert(1) hue-rotate(180deg); }

/* wysoki kontrast */
html.a11y-hc #wrapper, html.a11y-hc #wrapper *:not(i):not(.fa-solid):not(.fa-brands){
  background-image:none !important;
  background-color:#000 !important;
  color:#fff !important;
  border-color:#ffd400 !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
html.a11y-hc #wrapper a, html.a11y-hc #wrapper a *{ color:#ffd400 !important; text-decoration:underline !important; }
html.a11y-hc #wrapper .btn-main, html.a11y-hc #wrapper .btn-main span,
html.a11y-hc #wrapper button:not(.safe-fab):not(.safe-a11y-close){
  background:#ffd400 !important; color:#000 !important; border:2px solid #ffd400 !important; text-decoration:none !important;
}
html.a11y-hc #wrapper i{ color:#ffd400 !important; }
html.a11y-hc #wrapper img:not(.logo-main):not(.logo-mobile):not(.footer-logo){ filter:grayscale(1) contrast(1.25); }
html.a11y-hc #wrapper input, html.a11y-hc #wrapper textarea, html.a11y-hc #wrapper select{
  background:#000 !important; color:#fff !important; border:2px solid #ffd400 !important;
}
html.a11y-hc #wrapper ::placeholder{ color:#e6e6e6 !important; }
html.a11y-hc #wrapper section, html.a11y-hc #wrapper header, html.a11y-hc #wrapper footer{ background:#000 !important; }

/* czytelność */
html.a11y-underline #wrapper a{ text-decoration:underline !important; text-underline-offset:2px; }
html.a11y-spacing #wrapper{ letter-spacing:.045em; word-spacing:.14em; }
html.a11y-spacing #wrapper p, html.a11y-spacing #wrapper li,
html.a11y-spacing #wrapper td, html.a11y-spacing #wrapper dd{ line-height:1.95 !important; }
html.a11y-readable #wrapper, html.a11y-readable #wrapper *:not(i):not(.fa-solid):not(.fa-brands){
  font-family:Verdana, Tahoma, Arial, Helvetica, sans-serif !important;
}
html.a11y-nomotion #wrapper *{
  animation:none !important; transition:none !important; scroll-behavior:auto !important;
}
html.a11y-nomotion #wrapper video{ display:none !important; }

/* duży kursor */
html.a11y-bigcursor, html.a11y-bigcursor #wrapper *{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'><path d='M7 2 L7 26 L13.2 20.2 L17.4 30 L21.6 28.2 L17.4 18.6 L26 18.6 Z' fill='%23ffffff' stroke='%230a1525' stroke-width='2'/></svg>") 4 2, auto !important;
}
html.a11y-bigcursor #wrapper a, html.a11y-bigcursor #wrapper button,
html.a11y-bigcursor #wrapper [role="button"], html.a11y-bigcursor #wrapper summary{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'><path d='M12 2 C10.3 2 9 3.3 9 5 L9 17 L7.4 15.4 C6.2 14.2 4.2 14.2 3 15.4 L3 18 L10 28 L24 28 L26 16 C26.2 14.4 25 13 23.4 13 L18 13 L18 5 C18 3.3 16.7 2 15 2 Z' fill='%23ffffff' stroke='%230a1525' stroke-width='2'/></svg>") 8 2, pointer !important;
}

/* widoczny focus w całym serwisie */
html.a11y-focus #wrapper a:focus, html.a11y-focus #wrapper button:focus,
html.a11y-focus #wrapper input:focus, html.a11y-focus #wrapper textarea:focus,
html.a11y-focus #wrapper select:focus, html.a11y-focus #wrapper [tabindex]:focus{
  outline:3px solid #ffd400 !important; outline-offset:3px !important;
}

@media print{
  .safe-fab-stack, .safe-a11y-panel, .safe-skip-link{ display:none !important; }
}
