/* ============================================================
   consent.css - banner zgody na cookies (patrz consent.js)
   Korzysta z tych samych zmiennych co main.css / site.css
   (z wartosciami zapasowymi, gdyby arkusz strony sie nie wczytal).
   ============================================================ */

.cc {
  position: fixed; left: 24px; bottom: 24px; z-index: 300;
  width: min(600px, calc(100vw - 48px));
  max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #E5E1D6);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 42, .06), 0 18px 48px rgba(16, 24, 42, .18);
  padding: 22px 22px 20px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--ink2, #38435A);
  opacity: 0; transform: translateY(18px);
  transition: opacity .35s ease, transform .35s ease;
}
.cc[hidden] { display: none; }
.cc.cc-show { opacity: 1; transform: none; }

.cc-head { display: flex; align-items: center; gap: 12px; }
.cc-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  background: var(--accentSoft, #EAF2EE); color: var(--accent, #15795B);
  border: 1px solid var(--accentBorder, rgba(21, 121, 91, .22));
  display: flex; align-items: center; justify-content: center;
}
.cc-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em;
  color: var(--ink, #10182A); line-height: 1.25;
}
.cc-text { font-size: .88rem; line-height: 1.6; margin-top: 12px; }
.cc-text a {
  color: var(--accent, #15795B); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}

/* ─── Kategorie ─── */
.cc-prefs {
  margin-top: 16px;
  background: var(--bg, #F4F1E8); border: 1px solid var(--line, #E5E1D6);
  border-radius: 13px; padding: 2px 16px;
}
.cc-prefs[hidden] { display: none; }
.cc-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line, #E5E1D6);
}
.cc-cat:last-child { border-bottom: none; }
.cc-cat-name {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 600; font-size: .95rem; color: var(--ink, #10182A);
}
.cc-cat-desc { font-size: .8rem; line-height: 1.5; color: var(--muted, #636D7D); margin-top: 3px; }
.cc-always {
  flex-shrink: 0; font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--accentSoft, #EAF2EE); color: var(--accent, #15795B);
  border: 1px solid var(--accentBorder, rgba(21, 121, 91, .22));
  border-radius: 100px; padding: 4px 10px;
}
.cc-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Przelacznik (natywny checkbox - dziala z klawiatury i czytnikami) */
.cc-switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; }
.cc-switch input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.cc-track {
  position: absolute; inset: 0; border-radius: 100px;
  background: var(--lineStrong, #9b9b9b);
  transition: background .2s;
}
.cc-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 42, .25);
  transition: transform .2s;
}
.cc-switch input:checked + .cc-track { background: var(--accent, #15795B); }
.cc-switch input:checked + .cc-track::after { transform: translateX(18px); }
.cc-switch input:focus-visible + .cc-track {
  outline: 2px solid var(--accent, #15795B); outline-offset: 2px;
}

/* ─── Przyciski ─── */
/* "Odrzuc" i "Akceptuj" maja IDENTYCZNY wyglad - wymog RODO/EROD:
   odmowa zgody nie moze byc trudniejsza ani mniej widoczna niz zgoda. */
.cc-actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px;
  margin-top: 18px;
}
.cc-btn {
  appearance: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2;
  padding: 11px 18px; border-radius: 10px;
  transition: opacity .2s, border-color .2s, color .2s;
}
.cc-btn[hidden] { display: none; }
.cc-btn-solid { background: var(--ink, #10182A); color: #fff; border: 1px solid var(--ink, #10182A); }
.cc-btn-solid:hover { opacity: .88; }
.cc-btn-outline {
  background: var(--surface, #fff); color: var(--ink, #10182A);
  border: 1px solid var(--lineStrong, #9b9b9b);
  margin-right: auto;
}
.cc-btn-outline:hover { border-color: var(--accent, #15795B); color: var(--accent, #15795B); }
.cc-btn:focus-visible { outline: 2px solid var(--accent, #15795B); outline-offset: 2px; }

/* Link "Ustawienia cookies" w stopce - wyglada jak pozostale linki stopki */
.cc-footer-link {
  appearance: none; background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: .82rem; color: var(--muted, #636D7D);
  transition: color .2s;
}
.cc-footer-link:hover { color: var(--ink, #10182A); }

/* ─── Mobile ─── */
@media (max-width: 600px) {
  .cc {
    left: 16px; right: 16px; bottom: 16px; width: auto;
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    padding: 18px 18px 0;
  }
  /* Przyciski przyklejone do dolu - widoczne nawet przy przewijaniu kategorii */
  .cc-actions {
    flex-direction: column-reverse; align-items: stretch; gap: 8px;
    position: sticky; bottom: 0;
    background: var(--surface, #fff);
    margin: 14px -18px 0; padding: 12px 18px 16px;
  }
  .cc-expanded .cc-actions { border-top: 1px solid var(--line, #E5E1D6); }
  .cc-btn { width: 100%; padding: 13px 16px; }
  .cc-btn-outline { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cc, .cc-track, .cc-track::after { transition: none; }
}
