/* Cookie-Frage (assets/cookie-frage.js). Aufbau und Maße wie auf handschriftpost.de (src/cookie-frage.css) und
   neu.leadscraper.de, Farben aus theme.css: Fenster in der Mitte (.is-mitte) über der abgedunkelten, gesperrten Seite
   (.consent-wand), bis gewählt ist. Auf den Rechtstexten ohne .is-mitte unten am Rand. „Alle akzeptieren“ ist die
   Haupttaste, „Ablehnen“ steht in derselben Reihe, gleich groß und lesbar. */
.consent {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2001;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  width: min(600px, calc(100vw - 32px)); padding: 16px 16px 16px 20px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 4px 8px #122a1d14, 0 40px 80px -32px #122a1d52;
  font-size: 14px; line-height: 1.5; color: var(--ink-soft); text-align: left;
  transform: translateX(-50%);
}
.consent[hidden], .consent [hidden], .consent-wand[hidden] { display: none; }
.consent-wand { position: fixed; inset: 0; z-index: 2000; background: rgba(18, 42, 29, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
/* Die Seite rollt nicht, solange das Fenster steht. Der Platz der Bildlaufleiste bleibt, damit beim Schließen nichts springt. */
.consent-sperrt { overflow: hidden; scrollbar-gutter: stable; }
.consent-sperrt body { overflow: hidden; }
.consent.is-mitte {
  top: 50%; bottom: auto; width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 24px 20px; border-radius: 22px; transform: translate(-50%, -50%);
}
.consent.is-mitte:focus { outline: none; }
.consent.is-mitte .consent-kurz { gap: 18px; }
.consent.is-mitte .consent-kurz p:first-child { flex-basis: 100%; font-size: 17px; line-height: 1.45; color: var(--ink); font-weight: 500; }
.consent.is-mitte .consent-tasten { width: 100%; margin-left: 0; }
/* „Einstellungen“ steht im Fenster unter den beiden Tasten, damit „Ablehnen“ und „Alle akzeptieren“ eine Reihe bilden. */
.consent.is-mitte .consent-kurz .consent-taste.is-leise { order: 3; flex-basis: 100%; height: 32px; }
.consent.is-mitte .consent-kurz .consent-mehr { flex-basis: 100%; text-align: center; }
.consent.is-fein { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.consent-kurz { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; width: 100%; }
.consent-fein { display: grid; gap: 12px; width: 100%; }
.consent p { margin: 0; }
.consent-kurz p { flex: 1 1 280px; }
.consent a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--sand-deep); text-underline-offset: 3px; }
.consent a:hover { color: var(--brand-600); text-decoration-color: currentColor; }
.consent-tasten { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.consent-fein .consent-tasten { margin-left: 0; }
.consent-titel { font-size: 17px; font-weight: 600; color: var(--ink); }
.consent-gruppe { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-soft); }
.consent-kopf { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.consent-name { font-weight: 600; color: var(--ink); }
.consent-immer { margin-left: auto; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.consent-text, .consent-dienste { font-size: 13px; }
.consent-dienste { color: var(--muted); }
.consent-mehr { font-size: 13px; color: var(--muted); }
/* Schalter: ein Kontrollkästchen, nur anders gezeichnet. Bleibt mit Tastatur und Vorleseprogramm ein Kontrollkästchen. */
.consent-schalter {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 38px; height: 22px; margin: 0;
  border-radius: 999px; background: var(--line); border: 1px solid var(--sand-deep); cursor: pointer; transition: background 0.2s;
}
.consent-schalter::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #122a1d33; transition: transform 0.2s; }
.consent-schalter:checked { background: var(--brand); border-color: transparent; }
.consent-schalter:checked::after { transform: translateX(16px); }
.consent-schalter:disabled { opacity: 0.55; cursor: default; }
.consent-schalter:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.consent-taste {
  flex: 1 1 0; height: 44px; padding: 0 18px; border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--ink); white-space: nowrap; cursor: pointer;
  background: var(--surface); border: 1px solid var(--sand-deep); transition: background 0.2s, border-color 0.2s;
}
/* „Alle akzeptieren“ ist die Haupttaste. „Ablehnen“ bleibt in derselben Reihe, gleich hoch und lesbar. */
.consent-taste.is-ja { flex: 2 1 0; background: var(--brand-600); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -6px #2a6f4699; }
.consent-taste.is-leise { flex: 0 1 auto; padding: 0 10px; background: none; border-color: transparent; color: var(--muted); font-weight: 400; text-decoration: underline; text-decoration-color: var(--sand-deep); text-underline-offset: 3px; box-shadow: none; }
.consent-taste:focus-visible, .footer-cookie:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.footer-cookie { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.site-footer .footer-cookie { color: #cad9cc; }
.site-footer .footer-cookie:hover { color: #fff; text-decoration: none; }
.footer-cookie:hover { text-decoration: underline; }
@media (hover: hover) {
  .consent-taste:hover { background: var(--paper); border-color: var(--faint); }
  .consent-taste.is-ja:hover { background: var(--brand-700); }
  .consent-taste.is-leise:hover { background: none; color: var(--ink); }
}
@media (max-width: 480px) {
  .consent { padding: 16px; }
  .consent.is-mitte { padding: 22px 16px 16px; }
  .consent-tasten { width: 100%; }
  .consent.is-fein { padding: 16px; }
  /* Schmal: „Alle akzeptieren“ oben über die ganze Breite, die beiden anderen darunter. */
  .consent-tasten .consent-taste.is-ja { order: -1; flex-basis: 100%; }
}
