/* ============================================================
   COOKIE-BANNER + CONSENT-MODAL · DSGVO-Logik
   Banner unten beim ersten Besuch, Settings-Modal für granulare Wahl.
   Light-Edition-konform: Paper-BG mit dunklem Top-Border, rote
   Primary-CTA, Mono-Body. Wird per svw-shell.js bei missing
   localStorage `svw-cookie-consent` injected.
   ============================================================ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 9000;
  background: var(--paper);
  border-top: 3px solid var(--ink);
  padding: 22px 56px;
  display: grid; grid-template-columns: 1fr auto; gap: 28px;
  align-items: center;
  box-shadow: 0 -8px 24px rgba(14,14,18,0.10);
  font-family: var(--body);
}
.cookie-banner .text { max-width: 820px; }
.cookie-banner .h {
  font-family: var(--display); font-weight: 900; font-style: normal;
  font-size: 22px; line-height: 1; text-transform: uppercase;
  color: var(--ink); margin: 0 0 6px; letter-spacing: 0.005em;
}
.cookie-banner .h .r { color: var(--red); }
.cookie-banner p {
  font-size: 13px; line-height: 1.55; color: rgba(14,14,18,0.78);
  margin: 0;
}
.cookie-banner p a {
  color: var(--ink); font-weight: 700; text-decoration: underline;
  text-decoration-color: var(--red); text-underline-offset: 3px;
}
.cookie-banner .cta-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center;
}
.cookie-banner .btn {
  font-family: var(--display); font-weight: 900; font-style: normal;
  font-size: 14px; padding: 12px 20px; text-transform: uppercase;
  letter-spacing: 0.02em; cursor: pointer;
  border: none; text-decoration: none;
  transition: background .12s;
}
.cookie-banner .btn.primary { background: var(--red); color: white; }
.cookie-banner .btn.primary:hover { background: var(--red-deep); }
.cookie-banner .btn.outline {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink);
  padding: 10px 18px;
}
.cookie-banner .btn.outline:hover { background: var(--ink); color: white; }
.cookie-banner .btn.ghost {
  background: transparent; color: var(--ink);
  text-decoration: underline; text-decoration-color: rgba(14,14,18,0.30);
  text-underline-offset: 3px;
  padding: 12px 8px;
  font-weight: 800; font-style: normal;
}
.cookie-banner .btn.ghost:hover { text-decoration-color: var(--red); }

/* --- Settings-Modal (granulare Kategorien) --- */
/* Default ist DISPLAY:NONE — wird per `.is-open`-Klasse aktiviert.
   Diese klassen-basierte Lösung ist robust gegen jede CSS-Specificity-
   Diskussion (vorher gab es einen Bug mit dem `hidden`-Attribut, das vom
   Browser-Default überschrieben wurde). */
.cookie-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(14,14,18,0.65);
  align-items: center; justify-content: center;
  padding: 24px;
  font-family: var(--body);
}
.cookie-modal.is-open { display: flex; }
.cookie-modal .box {
  background: white;
  max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  border: 2px solid var(--ink);
  padding: 40px 44px;
  position: relative;
}
.cookie-modal .box .close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  color: rgba(14,14,18,0.55); padding: 4px 8px;
}
.cookie-modal .box .close:hover { color: var(--red); }
.cookie-modal .box .h {
  font-family: var(--display); font-weight: 900; font-style: normal;
  font-size: 36px; line-height: 0.95; text-transform: uppercase;
  color: var(--ink); margin: 0 0 16px; letter-spacing: 0.005em;
}
.cookie-modal .box .h .r { color: var(--red); }
.cookie-modal .box .intro {
  font-size: 13px; line-height: 1.55; color: rgba(14,14,18,0.78);
  margin: 0 0 24px;
}
.cookie-modal .cat {
  display: grid; grid-template-columns: 1fr auto; gap: 18px;
  padding: 18px 0; border-top: 1px solid rgba(14,14,18,0.10);
  align-items: flex-start;
}
.cookie-modal .cat:last-of-type { border-bottom: 1px solid rgba(14,14,18,0.10); }
.cookie-modal .cat .info .name {
  font-family: var(--display); font-weight: 800; font-style: normal;
  font-size: 17px; text-transform: uppercase; color: var(--ink);
  margin-bottom: 4px; letter-spacing: 0.005em;
}
.cookie-modal .cat .info .desc {
  font-size: 12px; line-height: 1.5; color: rgba(14,14,18,0.65);
}
.cookie-modal .toggle {
  width: 52px; height: 28px;
  background: rgba(14,14,18,0.15);
  position: relative; cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.cookie-modal .toggle::after {
  content: ""; position: absolute;
  left: 3px; top: 3px;
  width: 22px; height: 22px;
  background: white;
  transition: left .15s;
}
.cookie-modal .toggle.on { background: var(--red); }
.cookie-modal .toggle.on::after { left: 27px; }
.cookie-modal .toggle.locked {
  background: rgba(14,14,18,0.55); cursor: not-allowed;
}
.cookie-modal .toggle.locked::after { left: 27px; opacity: 0.85; }
.cookie-modal .actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 26px; flex-wrap: wrap;
}
.cookie-modal .btn {
  font-family: var(--display); font-weight: 900; font-style: normal;
  font-size: 14px; padding: 12px 20px; text-transform: uppercase;
  letter-spacing: 0.02em; cursor: pointer;
  border: none; text-decoration: none;
}
.cookie-modal .btn.primary { background: var(--red); color: white; }
.cookie-modal .btn.primary:hover { background: var(--red-deep); }
.cookie-modal .btn.outline {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink);
  padding: 10px 18px;
}
.cookie-modal .btn.outline:hover { background: var(--ink); color: white; }

/* Handy: dasselbe 1fr/auto-Grid-Problem wie bei .dyn-tile (siehe
   css/pages/index.css) — bei 56px Innenabstand links+rechts bleibt auf
   schmalen Screens kaum Platz fuer Text UND Buttons nebeneinander.
   Banner und Kategorie-Zeilen im Modal stapeln darunter. */
@media (max-width: 640px) {
  .cookie-banner { grid-template-columns: 1fr; padding: 20px 20px 22px; gap: 16px; }
  .cookie-banner .cta-row { justify-content: flex-start; }
  .cookie-modal .box { padding: 28px 22px; }
  .cookie-modal .cat { grid-template-columns: 1fr; gap: 10px; }
  .cookie-modal .toggle { align-self: flex-start; }
}
