/* ==========================================================
   CONSENT-BANNER, RECHTLICHES (Footer-Links, Platzhalter)
   ========================================================== */
.consent {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 10000; /* über Header (150), unter Splash (10001) */
  width: calc(100% - 2rem);
  max-width: 28rem;
  padding: 1.25rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--wp--preset--border-radius--md, 20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: var(--color-text);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.consent[hidden] { display: none; }
.consent.is-visible { opacity: 1; transform: none; }

.consent__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.2;
  outline: none;
}
.consent__text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-muted);
}
.consent__text a { color: var(--color-text); text-decoration: underline; text-underline-offset: 2px; }

.consent__settings { margin: 0 0 1rem; }
.consent__settings[hidden] { display: none; }
.consent__row { border-top: 1px solid var(--color-border); }
.consent__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.5rem 0;
  cursor: pointer;
}
.consent__option input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--color-text);
}
.consent__label { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; font-size: 0.875rem; }
.consent__label span { font-size: 0.8125rem; color: var(--color-muted); }

.consent__actions { display: flex; flex-direction: column; gap: 0.5rem; }
.consent__btn {
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.consent__btn { width: 100%; white-space: nowrap; line-height: 1.3; }
.consent__btn--main { padding-block: 0.5rem; }
.consent__btn--ghost { border-color: transparent; color: var(--color-muted); text-decoration: underline; text-underline-offset: 3px; }
.consent__btn:hover { background: var(--color-text); color: var(--color-bg); }
.consent__btn--ghost:hover { border-color: var(--color-text); text-decoration: none; }
.consent__btn[hidden] { display: none; }
.consent :focus-visible,
.site-legal a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* Externe Einbettungen (Core-Embed) hinter Einwilligung */
.embed-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9; /* Mindesthöhe; ein explizites min-height würde das Mitwachsen mit dem Inhalt abschalten */
  background-color: #222224;
  border: 1px solid var(--color-border);
  border-radius: var(--wp--preset--border-radius--md, 20px);
}
/* Im Seitenverhältnis-Rahmen (Core setzt ein Polster-Pseudoelement) wächst der Platzhalter mit dem Inhalt. */
.wp-has-aspect-ratio .wp-block-embed__wrapper:has(> .embed-consent)::before {
  content: none;
  padding-top: 0;
}
.embed-loaded { outline: none; }
.embed-loaded iframe { max-width: 100%; }

/* Footer: rechtliche Links */
.site-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-legal a { color: var(--color-muted); text-decoration: none; transition: color 0.2s ease; }
.site-legal a:hover { color: var(--color-text); }

/* Rechtstexte */
.legal-todo {
  padding: 0.05em 0.5em;
  border-radius: var(--radius-pill);
  background: rgba(255, 200, 80, 0.18);
  color: var(--color-text);
}
.legal-note {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--wp--preset--border-radius--sm, 12px);
}

@media (max-width: 600px) {
  .consent { right: max(1rem, env(safe-area-inset-right)); max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .consent { transform: none; transition: none; }
  .consent__btn, .site-legal a { transition: none; }
}

/* Optionale Dauer-Einwilligung an den „laden“-Buttons (Karte, Embeds) */
.consent-remember {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  max-width: 34rem;
  margin: 0.25rem auto 0;
  padding: 0.25rem 0.5rem;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.consent-remember input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--color-text);
  cursor: pointer;
}
.consent-remember:hover { color: var(--color-text); }
.consent-remember:has(input:focus-visible) {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
  border-radius: var(--wp--preset--border-radius--sm, 12px);
}
