/* ─────────────────────────────────────────────────────────────
   Safe — okno ustawień plików cookie (nowy wygląd)
   Nadpisuje style z safe-custom.css. Ładowane po safe-a11y.css.
   ───────────────────────────────────────────────────────────── */

.cookie-modal-safe{
  position:fixed; inset:0; z-index:100070;
  display:flex; align-items:center; justify-content:center; padding:24px 16px;
}
.cookie-modal-safe[hidden]{ display:none; }
.cookie-modal-safe-backdrop{
  position:absolute; inset:0; background:rgba(10,21,37,.55); backdrop-filter:blur(2px); border:0;
}
.cookie-modal-safe-dialog{
  position:relative; z-index:1;
  width:640px; max-width:100%; max-height:calc(100vh - 48px);
  display:flex; flex-direction:column; overflow:hidden;
  background:#fff; border-radius:18px;
  box-shadow:0 34px 80px rgba(10,21,37,.34);
  font-family:inherit; color:var(--a11y-ink,#1c2430);
}

/* nagłówek */
.cookie-modal-safe-head{
  display:flex; align-items:center; gap:14px;
  padding:20px 22px; border-bottom:1px solid var(--a11y-line,#e5e9ef); background:#fff;
}
.cookie-modal-ic{
  width:36px; height:36px; min-width:36px; display:flex; align-items:center; justify-content:center;
  border-radius:11px; background:rgba(74,129,211,.12); color:#2f6fd0; font-size:17px;
}
.cookie-modal-safe-head h2{
  flex:1; margin:0; font-size:19px; line-height:1.3; font-weight:700; color:#0a1525;
}
.cookie-modal-safe-close{
  position:static; width:38px; height:38px; min-width:38px;
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--a11y-line,#e5e9ef); border-radius:11px;
  color:#66707d; font-size:16px; cursor:pointer; transition:background .18s ease, color .18s ease;
}
.cookie-modal-safe-close:hover{ background:#f4f6f9; color:#1c2430; }
.cookie-modal-safe-close:focus-visible{ outline:3px solid #4a81d3; outline-offset:2px; }

/* treść */
.cookie-modal-safe-body{ padding:22px; overflow-y:auto; }
.cookie-modal-intro{
  margin:0 0 18px; font-size:14.5px; line-height:1.7; color:#66707d;
}
.cookie-groups-safe{ display:flex; flex-direction:column; gap:12px; }

.cookie-group-safe{
  display:block; margin:0; padding:16px 18px;
  background:#fff; border:1px solid var(--a11y-line,#e5e9ef); border-radius:14px;
  cursor:pointer; transition:border-color .18s ease, background .18s ease;
}
.cookie-group-safe:hover{ border-color:#cfd9e8; }
.cookie-group-safe.is-locked{ cursor:default; background:#fff; }
.cookie-group-safe p{
  margin:8px 0 0; font-size:14px; line-height:1.65; color:#66707d;
}
.cookie-group-head{ display:flex; align-items:center; gap:11px; }
.cookie-group-ic{
  width:22px; min-width:22px; display:flex; align-items:center; justify-content:center;
  color:#2f6fd0; font-size:15px;
}
.cookie-group-safe h3{
  flex:1 1 auto; margin:0; font-size:16px; line-height:1.3; font-weight:700; color:#0a1525;
}
.cookie-badge-always{
  flex:0 0 auto; padding:7px 14px; border-radius:999px;
  background:rgba(23,162,116,.12); border:1px solid rgba(23,162,116,.28);
  font-size:13px; font-weight:600; color:#0f7a56; white-space:nowrap;
}

/* przełącznik kategorii */
.cookie-switch-wrap{ flex:0 0 auto; margin-left:auto; display:inline-flex; align-items:center; }
.cookie-switch-input{
  position:absolute; opacity:0; width:1px; height:1px; margin:0;
}
.cookie-switch{
  display:block; width:44px; height:24px; border-radius:12px; background:#d6dbe4;
  position:relative; transition:background .2s ease;
}
.cookie-switch::after{
  content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(10,21,37,.3); transition:transform .2s ease;
}
.cookie-switch-input:checked + .cookie-switch{ background:#2f6fd0; }
.cookie-switch-input:checked + .cookie-switch::after{ transform:translateX(20px); }
.cookie-switch-input:focus-visible + .cookie-switch{ outline:3px solid #4a81d3; outline-offset:3px; }
.cookie-group-safe:has(.cookie-switch-input:checked){ border-color:#4a81d3; background:rgba(74,129,211,.06); }

/* stopka */
.cookie-modal-safe-actions{
  display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap;
  padding:16px 22px; border-top:1px solid var(--a11y-line,#e5e9ef); background:#f4f6f9;
}
.cookie-modal-safe-actions .cookie-btn{ margin:0; }

.cookie-btn{
  padding:12px 20px; border-radius:11px; font-size:14.5px; font-weight:600; white-space:nowrap; line-height:1.2;
  cursor:pointer; border:1px solid transparent; transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.cookie-btn:focus-visible{ outline:3px solid #4a81d3; outline-offset:2px; }
.cookie-btn-secondary{ background:#fff; border-color:var(--a11y-line,#e5e9ef); color:#1c2430; }
.cookie-btn-secondary:hover{ background:#eef1f5; }
.cookie-btn-ghost{ background:#fff; border-color:var(--a11y-line,#e5e9ef); color:#2f6fd0; }
.cookie-btn-ghost:hover{ background:rgba(74,129,211,.08); }
.cookie-btn-primary{ background:#2f6fd0; color:#fff; }
.cookie-btn-primary:hover{ background:#255ab0; }

@media (max-width:575px){
  .cookie-modal-safe-dialog{ border-radius:16px; }
  .cookie-modal-safe-head{ padding:16px 16px; }
  .cookie-modal-safe-body{ padding:16px; }
  .cookie-modal-safe-actions{ padding:14px 16px; justify-content:stretch; }
  .cookie-modal-safe-actions .cookie-btn{ flex:1 1 100%; }
  .cookie-badge-always{ font-size:12px; padding:6px 11px; }
}

/* ── Baner cookies: kompaktowa karta, nie pasek na całą szerokość ── */
.cookie-banner-safe{
  position:fixed; left:auto; right:20px; bottom:20px; z-index:100045;
  width:440px; max-width:calc(100vw - 40px); padding:0; background:none; border:0; box-shadow:none;
}
.cookie-banner-safe[hidden]{ display:none; }
.cookie-banner-safe-inner{
  display:block; padding:20px 22px; max-width:none;
  background:#0a1525; border:1px solid rgba(255,255,255,.12); border-radius:16px;
  box-shadow:0 26px 60px rgba(4,10,20,.45);
}
.cookie-banner-safe-copy{ margin:0; }
.cookie-banner-safe-copy strong{
  display:block; margin-bottom:8px; font-size:15.5px; font-weight:700; color:#fff;
}
.cookie-banner-safe-copy p{
  margin:0; font-size:13.5px; line-height:1.6; color:rgba(255,255,255,.76);
}
.cookie-banner-safe-copy a{ color:#7fb0f5; }
.cookie-banner-safe-actions{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:16px;
}
.cookie-banner-safe-actions .cookie-btn{ flex:1 1 auto; padding:11px 14px; font-size:14px; }
.cookie-banner-safe-actions .cookie-btn-secondary{ background:transparent; border-color:rgba(255,255,255,.28); color:#fff; }
.cookie-banner-safe-actions .cookie-btn-secondary:hover{ background:rgba(255,255,255,.1); }
.cookie-banner-safe-actions .cookie-btn-ghost{ background:transparent; border-color:rgba(255,255,255,.28); color:#9dc2f8; }
.cookie-banner-safe-actions .cookie-btn-ghost:hover{ background:rgba(255,255,255,.1); }

@media (max-width:575px){
  .cookie-banner-safe{ right:12px; left:12px; bottom:74px; width:auto; max-width:none; }
  .cookie-banner-safe-inner{ padding:16px 16px; }
}
