/* Cookie-Banner und Detaileinstellungen – bewusst neutral gehalten, damit die
   Datei sowohl über dem Planer als auch auf den Rechtsseiten funktioniert. */

.gp-consent {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(10px, 3vw, 28px);
  pointer-events: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gp-consent-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  padding: clamp(18px, 3vw, 26px);
  overflow-y: auto;
  color: #17241d;
  text-align: left;
  background: #fff;
  border: 1px solid #dfe3dc;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(16, 28, 21, 0.32);
  pointer-events: auto;
}

/* Die Detaileinstellungen sind ein echter Dialog und werden zentriert und
   abgedunkelt dargestellt. */
.gp-consent:has(.gp-consent-dialog) {
  align-items: center;
  background: rgba(16, 28, 21, 0.45);
  pointer-events: auto;
}

.gp-consent-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.gp-consent-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #3d4a43;
}

.gp-consent-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.gp-consent-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  padding: 12px 14px;
  background: #fbfaf6;
  border: 1px solid #dfe3dc;
  border-radius: 12px;
}

.gp-consent-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #16231c;
}

.gp-consent-option input:disabled { opacity: 0.55; }

.gp-consent-option label {
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.gp-consent-option input:disabled + label { cursor: default; }

.gp-consent-option p {
  grid-column: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #5f6b63;
}

.gp-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gp-consent-btn {
  flex: 1 1 180px;
  min-height: 44px;
  padding: 11px 18px;
  color: #17241d;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #c9d1c8;
  border-radius: 11px;
  cursor: pointer;
}

.gp-consent-btn:hover { background: #f1f3ee; }

/* Zustimmen und Ablehnen sind gleich gestaltet – keine Dark Patterns. */
.gp-consent-btn-primary {
  color: #fff;
  background: #16231c;
  border-color: #16231c;
}

.gp-consent-btn-primary:hover { background: #24382d; }

.gp-consent-btn-quiet {
  flex: 0 1 auto;
  color: #5f6b63;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.gp-consent-btn-quiet:hover { color: #17241d; background: transparent; }

.gp-consent-btn:focus-visible {
  outline: 3px solid rgba(232, 135, 30, 0.55);
  outline-offset: 2px;
}

.gp-consent-links {
  margin: 14px 0 0;
  font-size: 13px;
}

.gp-consent-links a { color: #a64d12; }
.gp-consent-links a:hover { color: #71330b; }

@media (max-width: 560px) {
  .gp-consent-card { border-radius: 14px; }
  .gp-consent-btn { flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------
   Anzeigenfläche

   § 26 MedienG verlangt, dass entgeltliche Veröffentlichungen als "Anzeige",
   "entgeltliche Einschaltung" oder "Werbung" gekennzeichnet sind. Die
   Kennzeichnung steckt deshalb in der Klasse selbst und nicht im Markup der
   einzelnen Fläche – so kann sie beim Einbau nicht vergessen werden:

     <aside class="ad-slot">…Code des Werbenetzwerks…</aside>

   Die Fläche muss sichtbar vom redaktionellen Inhalt getrennt bleiben; das
   übernehmen Rahmen und Beschriftung.

   Ohne Werbeeinwilligung bleibt die Fläche vollständig aus dem Layout: Die
   Klasse gp-consent-ads setzt js/consent.js erst nach der Zustimmung auf das
   <html>-Element. So entsteht vorher kein leerer, beschrifteter Kasten. */
.ad-slot { display: none; }

html.gp-consent-ads .ad-slot {
  position: relative;
  display: block;
  padding: 22px 12px 12px;
  margin: 18px 0;
  background: #fbfaf6;
  border: 1px solid #dfe3dc;
  border-radius: 12px;
}

.ad-slot::before {
  content: "Anzeige";
  position: absolute;
  top: 6px;
  left: 12px;
  color: #5f6b63;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.gp-consent-ads :lang(en) .ad-slot::before { content: "Advertisement"; }

/* Stillgelegte Einbindungen (data-consent) belegen keinen Platz, solange keine
   Einwilligung vorliegt – sonst bliebe ein leerer Rahmen im Layout stehen. */
[data-consent]:not([data-consent-active]) { display: none; }
