/* ===========================================================================
   consent.css — Cookie-Consent (optionales Modul)
   Setzt auf das Overlay-Primitive (.scrim/.modal) aus styles.css auf und nutzt
   ausschließlich die Design-Tokens. Wird NICHT gebraucht? Einfach diese Datei
   und cookie-consent/consent.js nicht einbinden.
   =========================================================================== */

.consent { max-width: 42rem; }

.consent__title {
  font-size: var(--text-h4);
  margin-bottom: var(--space-16);
}
.consent__text {
  color: var(--color-text-2);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin-bottom: var(--space-16);
}
.consent__text a { color: var(--color-text); }

/* --- Kategorien (zweite Ebene, per „Einstellungen" aufgeklappt) ----------- */
.consent__cats {
  margin: var(--space-8) 0 var(--space-24);
  border-top: var(--border);
}
.consent__cats[hidden] { display: none; }

.consent__cat {
  display: flex;
  align-items: flex-start;
  gap: var(--space-16);
  padding: var(--space-16) 0;
  border-bottom: var(--border);
}
.consent__cat-body { flex: 1; }
.consent__cat-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.02em;
}
.consent__cat-desc {
  display: block;
  color: var(--color-text-3);
  font-size: var(--text-small);
  margin-top: 2px;
}

/* Native Checkbox als Schalter – Gelb nur als interaktiver „an"-Zustand */
.consent__toggle {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  margin-top: 2px;
  accent-color: var(--color-accent);
  cursor: pointer;
  flex: none;
}
.consent__toggle:disabled { cursor: not-allowed; opacity: 0.6; }

/* --- Aktionen ------------------------------------------------------------- */
/* WICHTIG (DSGVO): „Akzeptieren" und „Ablehnen" sind optisch gleichwertig –
   beide dieselbe Schaltfläche, KEIN gelbes Nudging auf eine Seite.          */
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}
.consent__btn {
  flex: 1 1 auto;
  min-width: 8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.03em;
  line-height: 1;
  text-align: center;
  padding: var(--space-16) var(--space-24);
  border: 2px solid var(--color-text);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--color-text);
  color: var(--color-surface);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.consent__btn:hover {
  background: var(--color-surface);
  color: var(--color-text);
}
/* Sekundär (Einstellungen / Auswahl speichern) – klar untergeordnet, aber
   nicht „versteckt". Steht in einer eigenen Zeile über den Hauptaktionen. */
.consent__btn--secondary {
  background: transparent;
  color: var(--color-text);
}
.consent__btn--secondary:hover {
  background: var(--color-text);
  color: var(--color-surface);
}
.consent__actions--secondary { margin-bottom: var(--space-16); }

/* ===========================================================================
   Platzhalter für gesperrte Einbettungen (YouTube, Google Maps …)
   Solange keine Einwilligung für „Externe Medien" vorliegt, wird statt des
   iframes dieser Platzhalter gezeigt. main.js/consent.js ersetzt ihn bei
   Zustimmung (global) oder per Klick auf „Laden" (nur dieses eine Element).
   =========================================================================== */
.embed-consent {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-32);
  min-block-size: 12rem;
  aspect-ratio: var(--embed-ratio, 16 / 9);
  background: var(--color-surface-2);
  border: var(--border);
  border-radius: var(--radius);
}
.embed-consent > iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  border-radius: inherit;
}
.embed-consent__inner { max-width: 32rem; }
.embed-consent__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-2);
}
.embed-consent__text {
  color: var(--color-text-3);
  font-size: var(--text-small);
  margin: var(--space-8) 0 var(--space-16);
}
/* Hier ist Gelb korrekt: eine echte, gewünschte Interaktion (nicht eine von
   zwei gleichwertigen Ja/Nein-Optionen). */
.embed-consent__btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.03em;
  padding: var(--space-16) var(--space-24);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: 2px solid var(--color-text);
  border-radius: var(--radius);
  cursor: pointer;
}
.embed-consent__btn:hover { background: var(--color-accent-strong); }
