/* ============================================================
   Baner zgód cookie (RODO) — kompaktowy baner + panel preferencji.
   Prosty, nowoczesny; kolory z motywu (navy/red) z fallbackami.
   ============================================================ */
.footer-cookie-link { margin-left: 12px; color: inherit; opacity: .85; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.footer-cookie-link:hover { opacity: 1; }
.fwc { position: fixed; inset: 0; z-index: 1500; pointer-events: none; font-family: Inter, system-ui, Arial, sans-serif; }
.fwc[hidden] { display: none; }
.fwc-overlay { position: absolute; inset: 0; background: rgba(15,23,42,.5); pointer-events: auto; animation: fwcFade .18s ease; }
.fwc-overlay[hidden] { display: none; }
@keyframes fwcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fwcUp { from { transform: translateY(18px); opacity: .3; } to { transform: none; opacity: 1; } }

/* ---- Baner kompaktowy ---- */
.fwc-bar {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(1080px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 22px;
  background: #fff; border: 1px solid #e6e9ef; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,23,42,.22);
  padding: 18px 22px; pointer-events: auto; animation: fwcUp .24s cubic-bezier(.2,.75,.3,1);
}
.fwc[data-pos="box"] .fwc-bar { left: 18px; transform: none; width: min(400px, calc(100vw - 32px)); flex-direction: column; align-items: stretch; gap: 14px; }
.fwc-bar[hidden] { display: none; }
.fwc-bar-txt { flex: 1; min-width: 0; }
.fwc-title { display: block; font-size: 15.5px; font-weight: 800; color: var(--navy, #15233b); }
.fwc-msg { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted, #5b6472); }
.fwc-policy { color: var(--navy, #15233b); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.fwc-bar-btns { display: flex; align-items: center; gap: 8px; flex: none; }
.fwc[data-pos="box"] .fwc-bar-btns { flex-wrap: wrap; }

/* ---- Przyciski ---- */
.fwc-btn { appearance: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; padding: 11px 18px; border-radius: 10px; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.fwc-btn:active { transform: translateY(1px); }
.fwc-btn-primary { background: var(--navy, #15233b); color: #fff; box-shadow: 0 6px 16px rgba(21,35,59,.22); }
.fwc-btn-primary:hover { background: #0f1b30; box-shadow: 0 8px 22px rgba(21,35,59,.3); }
.fwc-btn-light { background: #f1f3f7; color: var(--navy, #15233b); border-color: #e6e9ef; }
.fwc-btn-light:hover { background: #e7eaf0; }
.fwc-btn-ghost { background: transparent; color: var(--muted, #5b6472); }
.fwc-btn-ghost:hover { color: var(--navy, #15233b); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Panel preferencji ---- */
.fwc-prefs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(15,23,42,.34);
  padding: 22px 24px; pointer-events: auto; animation: fwcUp .22s cubic-bezier(.2,.75,.3,1);
}
.fwc-prefs[hidden] { display: none; }
.fwc-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fwc-prefs-head .fwc-title { font-size: 18px; }
.fwc-x { border: 0; background: transparent; color: var(--muted-2, #98a2b3); width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.fwc-x:hover { background: #f1f3f7; color: var(--navy, #15233b); }
.fwc-prefs-intro { margin: 6px 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted, #5b6472); }

.fwc-cats { display: flex; flex-direction: column; gap: 10px; }
.fwc-cat { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; border: 1px solid #eceef3; border-radius: 14px; padding: 14px 16px; }
.fwc-cat-txt { min-width: 0; }
.fwc-cat-name { display: block; font-size: 14px; font-weight: 700; color: var(--navy, #15233b); }
.fwc-cat-desc { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--muted, #5b6472); }

/* ---- Przełącznik (switch) ---- */
.fwc-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.fwc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.fwc-slider { position: absolute; inset: 0; background: #d3d8e0; border-radius: 999px; transition: background .18s; }
.fwc-slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: transform .18s; }
.fwc-switch input:checked + .fwc-slider { background: #1f9d55; }
.fwc-switch input:checked + .fwc-slider::before { transform: translateX(20px); }
.fwc-switch.is-locked { cursor: not-allowed; }
.fwc-switch.is-locked .fwc-slider { background: #9aa6b6; opacity: .8; }

.fwc-prefs-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---- Przycisk ponownego otwarcia (FAB, lewy dół — nie koliduje z widgetem czatu po prawej) ---- */
.fwc-fab {
  position: absolute; left: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 1px solid #e6e9ef; color: var(--navy, #15233b);
  box-shadow: 0 8px 22px rgba(15,23,42,.18); cursor: pointer; pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s;
}
.fwc-fab[hidden] { display: none; }
.fwc-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,.24); }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .fwc-bar { left: 12px; right: 12px; bottom: 12px; transform: none; width: auto; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .fwc[data-pos="box"] .fwc-bar { left: 12px; right: 12px; width: auto; }
  .fwc-bar-btns { flex-direction: column-reverse; }
  .fwc-btn { width: 100%; padding: 12px; }
  .fwc-prefs { padding: 18px; }
  .fwc-prefs-foot { flex-direction: column-reverse; }
  .fwc-prefs-foot .fwc-btn { width: 100%; }
  .fwc-fab { left: 12px; bottom: 12px; }
}
