/* Cookie-Banner, Variante 1 „Leiste unten“ (Karte „Cookie-Banner“, Ruben 18.11.2026: „die variante umsetzen“ für ?v=1).
   Aus der Demo v0_3-entwurf/cookie-banner-varianten/ (Teil B), nur Variante 1. Farben und Schriften kommen aus
   assets/style.css (--primary, --secondary, --surface-dark, --on-dark, --gray*, --blue, --font-text).
   Markup setzt assets/cookie-banner.js an den Anfang von <body>. Rechtlich: „Ablehnen“ und „Alle akzeptieren“ gleich groß
   und gleich gefärbt, keine Schalter vorausgewählt. ==Rechtliche Prüfung offen.== */

.ck {
  --ck-linie: rgba(255, 255, 255, .12);
  --ck-leise: rgba(242, 242, 246, .72);
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
  color: var(--on-dark); font-family: var(--font-text); font-size: 14px; line-height: 1.5;
}
.ck[hidden] { display: none; }
.ck *, .ck *::before, .ck *::after { box-sizing: border-box; }
.ck-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.ck__box {
  position: relative; max-height: min(86dvh, 720px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-dark); color: var(--on-dark);
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 -10px 40px rgba(21, 23, 28, .18);
}
.ck__box:focus { outline: none; }
.ck :focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.ck__ebene { max-width: 1552px; margin: 0 auto; }

.ck__titel { margin: 0 0 6px; font-family: "Reckless Standard", serif; font-weight: 400; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.01em; color: inherit; }
.ck__titel:focus { outline: none; }
.ck__text { margin: 0; color: var(--ck-leise); }
.ck__links { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 6px 0 0; font-size: 13px; }
.ck__links a { display: inline-flex; align-items: center; min-height: 32px; color: inherit; text-decoration: underline; text-decoration-color: rgba(242, 242, 246, .45); text-underline-offset: 3px; }
.ck__links a:hover { text-decoration-color: currentColor; }
/* 19.11. Tippfläche mindestens 44 px hoch, ohne Optik- und Layoutänderung: unsichtbare Erweiterung per ::after */
.ck__links a, .ck__details summary { position: relative; }
.ck__links a::after, .ck__details summary::after { content: ""; position: absolute; inset: -7px -4px; }

/* Knöpfe: Pille wie .nav-cta, 44 px Tippfläche; auf der dunklen Leiste hell */
.ck__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck-knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: 14px; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.ck-knopf--voll { background: var(--on-dark); border-color: var(--on-dark); color: #15171c; }
.ck-knopf--voll:hover { background: #c4c5ce; border-color: #c4c5ce; }
.ck-knopf--rand { grid-column: 1 / -1; background: transparent; border-color: #5a5d66; color: var(--on-dark); }
.ck-knopf--rand:hover { border-color: var(--on-dark); }

.ck__zu { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ck__zu[hidden] { display: none; }
.ck__zu svg { width: 22px; height: 22px; }
.ck__zu:hover { background: rgba(255, 255, 255, .08); }

/* Ebene 2: Kategorien */
.ck__liste { list-style: none; margin: 18px 0; padding: 0; border-top: 1px solid var(--ck-linie); }
.ck__kat { padding: 14px 0 10px; border-bottom: 1px solid var(--ck-linie); }
.ck__kat-zeile { display: flex; align-items: flex-start; gap: 16px; }
.ck__kat-text { flex: 1; min-width: 0; }
.ck__kat-titel { margin: 0 0 2px; font-family: var(--font-text); font-size: 15px; font-weight: 500; line-height: 1.4; color: inherit; }
.ck__kat-info { margin: 0; color: var(--ck-leise); font-size: 13px; }
.ck__immer { flex: none; margin-top: 2px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12px; color: rgba(242, 242, 246, .8); white-space: nowrap; }
.ck__details { margin-top: 4px; font-size: 13px; }
.ck__details summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; color: var(--ck-leise); text-decoration: underline; text-decoration-color: #8f8e98; text-underline-offset: 3px; }
.ck__details summary:hover { color: var(--on-dark); }
.ck__tabelle { width: 100%; margin: 4px 0 6px; border-collapse: collapse; font-size: 12px; line-height: 1.45; }
.ck__tabelle th, .ck__tabelle td { padding: 6px 8px 6px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--ck-linie); }
.ck__tabelle th { font-weight: 500; color: var(--ck-leise); }
.ck__art { color: var(--ck-leise); }
.ck code { font-size: .9em; }

/* Schalter: echtes Kontrollkästchen mit role="switch"; aus = grau, an = Blau */
.ck-schalter { position: relative; flex: none; display: inline-block; width: 48px; height: 32px; cursor: pointer; }
.ck-schalter input { position: absolute; inset: -7px 0; width: 100%; height: auto; margin: 0; opacity: 0; cursor: pointer; z-index: 1; } /* 19.11.: 46 px hohe Tippfläche */
.ck-schalter__bahn { position: absolute; left: 2px; top: 3px; width: 44px; height: 26px; border-radius: 999px; background: #5a5d66; transition: background-color .15s ease; }
.ck-schalter__bahn::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s ease; }
.ck-schalter input:checked + .ck-schalter__bahn { background: var(--blue); }
.ck-schalter input:checked + .ck-schalter__bahn::after { transform: translateX(18px); }
.ck-schalter input:focus-visible + .ck-schalter__bahn { outline: 2px solid var(--on-dark); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .ck[data-auf="true"] .ck__box { animation: ck-hoch .24s ease-out; }
}
@keyframes ck-hoch { from { transform: translateY(100%); } to { transform: none; } }

@media (min-width: 900px) {
  .ck__ebene--1:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
  .ck__ebene--1 .ck__text { max-width: 78ch; }
  .ck__ebene--1 .ck__knoepfe { grid-template-columns: auto auto auto; }
  .ck__ebene--1 .ck-knopf--rand { grid-column: auto; order: -1; }
  .ck__ebene--2 .ck__kopf { max-width: 70ch; padding-right: 48px; }
  .ck__liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 0; }
  .ck__kat { border-top: 1px solid var(--ck-linie); border-bottom: 0; }
  .ck__ebene--2 .ck__knoepfe--2 { grid-template-columns: auto auto auto; justify-content: start; }
  .ck__ebene--2 .ck-knopf--rand { grid-column: auto; order: -1; }
  .ck__ebene--2 .ck__links { margin-top: 10px; }
}
@media (max-width: 899px) {
  .ck__box { padding: 20px 20px calc(16px + env(safe-area-inset-bottom)); }
  .ck__kopf { margin-bottom: 14px; }
  .ck__ebene--2 .ck__kopf { padding-right: 40px; margin-bottom: 0; }
}

/* Platz unten, damit die Leiste nichts dauerhaft verdeckt (nur solange der Banner offen ist) */
body.ck-offen { padding-bottom: var(--ck-hoehe, 0px); }

@media (forced-colors: active) {
  .ck__box { border: 1px solid CanvasText; }
  .ck-schalter__bahn { border: 1px solid CanvasText; }
  .ck-schalter input:checked + .ck-schalter__bahn { background: Highlight; }
}
