/* CZYSTO — baner zgody cookies. Prefiks cz-cc, bez kolizji z main.css.
   Kolory i font zgodne z css/main.css: #2E3D82, #2DB8D4, #00B9D6, #4B4B4B, #E4F2F6, 'SF Pro Display'. */
.cz-cc, .cz-cc *, .cz-cc-reopen { box-sizing: border-box; }
.cz-cc [hidden], .cz-cc[hidden], .cz-cc-reopen[hidden] { display: none !important; }

.cz-cc {
  --cz-navy: #2E3D82;
  --cz-navy-dark: #24306A;
  --cz-accent: #2DB8D4;
  --cz-btn: #00B9D6;          /* jak .btn--blue na stronie */
  --cz-btn-hover: #00A3BD;
  --cz-text: #4B4B4B;
  --cz-muted: #646464;
  --cz-soft: #E4F2F6;
  --cz-line: #E5E9F6;

  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2147483000;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--cz-text);
}

/* Pasek przyklejony do dołu ekranu */
.cz-cc__bar {
  background: #fff;
  border-top: 3px solid var(--cz-accent);
  box-shadow: 0 -8px 30px rgba(46, 61, 130, .18);
  max-height: 85vh;
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.cz-cc.is-visible .cz-cc__bar { transform: none; }

.cz-cc__inner { max-width: 1140px; margin: 0 auto; padding: 14px 16px; }

.cz-cc__main { display: flex; align-items: center; gap: 24px; }
.cz-cc__text { flex: 1 1 auto; margin: 0; }
.cz-cc__title { color: var(--cz-navy); font-weight: 700; }
.cz-cc__text strong { color: var(--cz-navy); }
.cz-cc__a, .cz-cc__link {
  color: var(--cz-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.cz-cc__a:hover, .cz-cc__link:hover { color: var(--cz-accent); }
.cz-cc__link { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* Przyciski — jednakowa wielkość (odrzucenie tak samo łatwe jak akceptacja) */
.cz-cc__actions { flex: 0 0 auto; display: flex; gap: 8px; }
.cz-cc__btn {
  appearance: none; font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1.2;
  min-width: 168px; min-height: 42px; padding: 10px 14px; border-radius: 4px; cursor: pointer;
  border: 2px solid transparent; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.cz-cc__btn:focus-visible { outline: 3px solid rgba(45, 184, 212, .5); outline-offset: 2px; }
.cz-cc__btn--outline { background: #fff; color: var(--cz-navy); border-color: var(--cz-navy); }
.cz-cc__btn--outline:hover { background: var(--cz-soft); }
.cz-cc__btn--accent { background: var(--cz-btn); color: #fff; border-color: var(--cz-btn); }
.cz-cc__btn--accent:hover { background: var(--cz-btn-hover); border-color: var(--cz-btn-hover); }
.cz-cc__btn--navy { background: var(--cz-navy); color: #fff; border-color: var(--cz-navy); }
.cz-cc__btn--navy:hover { background: var(--cz-navy-dark); border-color: var(--cz-navy-dark); }
.cz-cc__btn--sm { min-width: 0; min-height: 36px; padding: 7px 16px; font-size: 13px; }

/* Panel ustawień */
.cz-cc__panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cz-line); }
.cz-cc__cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cz-cc__cat { background: #F9FAFB; border: 1px solid var(--cz-line); border-radius: 8px; padding: 10px 12px; }
.cz-cc__cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; cursor: pointer; }
.cz-cc__cat-name { font-weight: 700; color: var(--cz-navy); font-size: 13px; }
.cz-cc__cat-desc { margin: 4px 0 0; font-size: 12px; color: var(--cz-muted); }
.cz-cc__always { font-size: 11px; font-weight: 700; color: var(--cz-accent); white-space: nowrap; }
.cz-cc__panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.cz-cc__note { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 12px; color: var(--cz-muted); }
.cz-cc__panel-foot .cz-cc__btn { flex: 0 0 auto; }

.cz-cc__switch { position: relative; flex: 0 0 40px; width: 40px; height: 22px; }
.cz-cc__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cz-cc__switch span { position: absolute; inset: 0; border-radius: 22px; background: #C9CFDB; transition: background .2s; }
.cz-cc__switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.cz-cc__switch input:checked + span { background: var(--cz-accent); }
.cz-cc__switch input:checked + span::after { transform: translateX(18px); }
.cz-cc__switch input:focus-visible + span { outline: 3px solid rgba(45, 184, 212, .5); outline-offset: 2px; }

/* Przycisk ponownego otwarcia — w stylu .upBtn (który jest po prawej), tu po lewej */
.cz-cc-reopen {
  position: fixed; left: 15px; bottom: 15px; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #2DB8D4;
  box-shadow: 0 4px 14px rgba(46, 61, 130, .25); transition: transform .2s;
}
.cz-cc-reopen:hover { transform: scale(1.08); }
.cz-cc-reopen:focus-visible { outline: 3px solid rgba(45, 184, 212, .5); outline-offset: 2px; }

/* Tablet: tekst nad przyciskami */
@media (max-width: 991px) {
  .cz-cc__main { flex-direction: column; align-items: stretch; gap: 12px; }
  .cz-cc__actions .cz-cc__btn { flex: 1 1 0; min-width: 0; }
  .cz-cc__cats { grid-template-columns: repeat(2, 1fr); }
  /* Przycisk „Zapisz” pod notatką, na pełną szerokość — jak 3 główne przyciski */
  .cz-cc__panel-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .cz-cc__panel-foot .cz-cc__btn { width: 100%; min-height: 42px; font-size: 14px; }
}

/* Mobile */
@media (max-width: 575px) {
  .cz-cc { font-size: 13px; }
  .cz-cc__inner { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .cz-cc__actions { flex-direction: column; gap: 6px; }
  .cz-cc__btn { min-height: 40px; white-space: normal; }
  .cz-cc__cats { grid-template-columns: 1fr; gap: 6px; }
  .cz-cc__panel-foot { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-cc__bar, .cz-cc-reopen { transition: none; }
}
