/* =============================================
   Panel Dostępności — Ośrodek Sosenka
   ============================================= */

/* ── Skip link ── */
.acc-skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  background: #FF0000;
  color: #000;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  z-index: 9999999;
  white-space: nowrap;
  transition: top 0.18s ease;
}
.acc-skip-link:focus {
  top: 0;
  outline: 3px solid #231F20;
  outline-offset: 2px;
}

/* ── Wrapper ───────────────────────────────────────────────
   Cały blok (metka + panel) jest jednym flex-kontenerem.
   W stanie zamkniętym: translateX(288px) — panel schowany
   za prawą krawędzią ekranu, widoczna tylko 44px metka.
   W stanie otwartym: translateX(0) — całość wjeżdża.
───────────────────────────────────────────────────────── */
#acc-wrap {
  --acc-panel-w: 288px;
  --acc-trigger-w: 44px;

  position: fixed;
  right: 0;
  top: 50%;
  z-index: 999999;
  display: flex;
  flex-direction: row;       /* metka PO LEWEJ, panel PO PRAWEJ */
  align-items: stretch;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  user-select: none;

  /* Zamknięty: przesuń w prawo o szerokość panelu */
  transform: translateY(-50%) translateX(var(--acc-panel-w));
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
#acc-wrap.acc-open {
  transform: translateY(-50%) translateX(0);
}

/* ── Trigger — metka po lewej ── */
#acc-trigger {
  width: var(--acc-trigger-w);
  flex-shrink: 0;
  padding: 20px 0;
  min-height: 128px;
  background: #FF0000;
  border: none;
  border-radius: 14px 0 0 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  transition: background 0.2s ease;
  box-shadow: -4px 0 28px rgba(0, 0, 0, 0.22);
}
#acc-trigger:hover   { background: #031A4B; }
#acc-trigger:focus-visible {
  outline: 3px solid #231F20;
  outline-offset: -3px;
}
#acc-trigger svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.acc-trigger-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}

/* ── Panel — prawa część bloku ── */
#acc-panel {
  width: var(--acc-panel-w);
  flex-shrink: 0;
  background: #111827;
  overflow: hidden;        /* clipuje treść przy animacji */
  color: #f3f4f6;
}
.acc-inner {
  width: var(--acc-panel-w);
  padding-bottom: 14px;
}

/* ── Header ── */
.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 6px;
}
.acc-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.acc-close {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.acc-close:hover       { background: rgba(255, 255, 255, 0.14); color: #fff; }
.acc-close:focus-visible { outline: 2px solid #FF0000; outline-offset: 2px; }

/* ── Section ── */
.acc-section {
  padding: 6px 16px;
}
.acc-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
}

/* ── Font Controls — 2 równe przyciski ── */
.acc-font-row {
  display: flex;
  gap: 6px;
}
.acc-font-btn {
  flex: 1;
  height: 46px;            /* stała wysokość = równe przyciski */
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  cursor: pointer;
  color: #d1d5db;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acc-font-btn:nth-child(1) { font-size: 14px; }
.acc-font-btn:nth-child(2) { font-size: 20px; }
.acc-font-btn:hover {
  background: rgba(247, 165, 0, 0.12);
  border-color: rgba(247, 165, 0, 0.5);
  color: #FF0000;
}
.acc-font-btn:focus-visible { outline: 2px solid #FF0000; outline-offset: 2px; }
.acc-font-btn.acc-active {
  background: #FF0000;
  border-color: #FF0000;
  color: #fff;
}

/* ── Toggle Buttons ── */
.acc-toggle-btn {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  cursor: pointer;
  color: #d1d5db;
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.acc-toggle-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.acc-toggle-btn:hover {
  background: rgba(247, 165, 0, 0.09);
      border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.acc-toggle-btn:hover svg  { opacity: 1; }
.acc-toggle-btn:focus-visible { outline: 2px solid #FF0000; outline-offset: 2px; }
.acc-toggle-btn.acc-active {
  background: rgba(247, 165, 0, 0.14);
  border-color: #FF0000;
  color: #FF0000;
}
.acc-toggle-btn.acc-active svg { opacity: 1; }
.acc-toggle-status {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #6b7280;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.acc-toggle-btn.acc-active .acc-toggle-status {
  background: #FF0000;
  color: #111;
}

/* ── Divider ── */
.acc-divider {
  margin: 8px 16px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Reset Button ── */
.acc-reset-btn {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  cursor: pointer;
  color: #6b7280;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.acc-reset-btn:hover {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.acc-reset-btn:focus-visible { outline: 2px solid #FF0000; outline-offset: 2px; }

/* ── Declaration Link ── */
.acc-declaration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  padding: 10px 20px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.acc-declaration:hover,
.acc-declaration:focus-visible {
  color: #FF0000;
  text-decoration: underline;
  outline: none;
}


/* =============================================
   WYSOKI KONTRAST
   ============================================= */

body.acc-contrast,
body.acc-contrast div,
body.acc-contrast section,
body.acc-contrast nav,
body.acc-contrast header,
body.acc-contrast footer,
body.acc-contrast main,
body.acc-contrast article,
body.acc-contrast aside,
body.acc-contrast p,
body.acc-contrast span,
body.acc-contrast h1, body.acc-contrast h2,
body.acc-contrast h3, body.acc-contrast h4,
body.acc-contrast h5, body.acc-contrast h6,
body.acc-contrast li, body.acc-contrast ul,
body.acc-contrast ol, body.acc-contrast td,
body.acc-contrast th, body.acc-contrast tr,
body.acc-contrast table, body.acc-contrast thead,
body.acc-contrast tbody, body.acc-contrast label,
body.acc-contrast input, body.acc-contrast textarea,
body.acc-contrast select, body.acc-contrast em,
body.acc-contrast strong, body.acc-contrast blockquote {
  background-color: #000 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
body.acc-contrast a {
  color: #ffff00 !important;
  text-decoration: underline !important;
}
body.acc-contrast button:not(#acc-wrap button) {
  background-color: #111 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
body.acc-contrast img   { filter: brightness(0.85) contrast(1.15); }
body.acc-contrast video { filter: brightness(0.9); }
body.acc-contrast .more__18 {
  background: #ffff00 !important;
  color: #000 !important;
  border-color: #ffff00 !important;
}
body.acc-contrast .more__18 * { color: #000 !important; }
body.acc-contrast input,
body.acc-contrast textarea {
  background: #111 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

/* ── Przywrócenie wyglądu panelu w trybie kontrastowym ── */
body.acc-contrast #acc-trigger         { background: #FF0000 !important; color: #fff !important; }
body.acc-contrast #acc-trigger *       { color: #fff !important; background: transparent !important; }
body.acc-contrast #acc-panel           { background: #111827 !important; }
body.acc-contrast .acc-inner *         { background-color: transparent !important; color: #f3f4f6 !important; border-color: rgba(255,255,255,0.09) !important; }
body.acc-contrast .acc-title           { color: #fff !important; }
body.acc-contrast .acc-section-label  { color: #6b7280 !important; }
body.acc-contrast .acc-font-btn        { background: rgba(255,255,255,0.05) !important; color: #d1d5db !important; border-color: rgba(255,255,255,0.1) !important; }
body.acc-contrast .acc-font-btn.acc-active { background: #FF0000 !important; color: #fff !important; border-color: #FF0000 !important; }
body.acc-contrast .acc-toggle-btn      { background: rgba(255,255,255,0.04) !important; color: #d1d5db !important; border-color: rgba(255,255,255,0.09) !important; }
body.acc-contrast .acc-toggle-btn.acc-active { background: rgba(247,165,0,.14) !important; color: #FF0000 !important; border-color: #FF0000 !important; }
body.acc-contrast .acc-toggle-status  { background: rgba(255,255,255,0.07) !important; color: #6b7280 !important; }
body.acc-contrast .acc-toggle-btn.acc-active .acc-toggle-status { background: #FF0000 !important; color: #111 !important; }
body.acc-contrast .acc-close          { background: rgba(255,255,255,0.07) !important; color: #9ca3af !important; }
body.acc-contrast .acc-reset-btn      { background: transparent !important; color: #6b7280 !important; border-color: rgba(255,255,255,0.07) !important; }
body.acc-contrast .acc-declaration    { color: #4b5563 !important; border-color: rgba(255,255,255,0.05) !important; }
body.acc-contrast .acc-divider        { border-color: rgba(255,255,255,0.06) !important; }


/* =============================================
   PODKREŚLENIE LINKÓW
   ============================================= */

body.acc-underline a:not(#acc-wrap a) {
  text-decoration: underline !important;
}


/* =============================================
   FOCUS STYLES (WCAG 2.4.7)
   ============================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #FF0000 !important;
  outline-offset: 2px !important;
}


/* =============================================
   MOBILE
   ============================================= */

@media screen and (max-width: 1000px) {
  #acc-wrap {
    --acc-panel-w: 264px;
    --acc-trigger-w: 36px;
  }
  #acc-trigger {
    min-height: 104px;
    padding: 14px 0;
    border-radius: 10px 0 0 10px;
  }
  .acc-trigger-label { display: none; }
}
