/**
 * Das Torfenster vor einem Link.
 *
 * Bewusst eigenständig gestaltet und nicht aus dem Seitendesign geerbt:
 * Die Seite darunter kann jede Farbe haben, die sich ein Kunde ausdenkt -
 * dunkelgrün, knallrosa, ein Foto. Ein Fenster, das davon erbt, ist
 * irgendwann unlesbar. Weißer Grund, dunkle Schrift, kräftiger Knopf.
 *
 * Vier davon lassen sich einstellen - Fläche, Schrift, Knopf und
 * Knopfschrift. Sie stehen hier als Vorgabe und werden vom Skript
 * überschrieben, wenn am Knopf welche stehen. Nicht geerbt, sondern
 * gesetzt: Wer nichts einstellt, behält das Fenster, das über jeder
 * Seitenfarbe lesbar ist.
 *
 * Alles Übrige - der leisere Text, die Feldumrandung - wird aus diesen
 * vieren gemischt. So bleibt eine dunkle Fläche eine dunkle Fläche,
 * ohne dass jemand acht Farben einzeln stellen muss. Vor jedem
 * color-mix steht ein fester Wert für Browser, die es nicht können.
 */
.ol-gate {
  --ol-gate-grund: #fff;
  --ol-gate-schrift: #21302a;
  --ol-gate-knopf: #17352c;
  --ol-gate-knopf-schrift: #d5f29b;

  --ol-gate-leise: #4d6155;
  --ol-gate-leise: color-mix(in srgb, var(--ol-gate-schrift) 74%, var(--ol-gate-grund));
  --ol-gate-rand: #c3d4c6;
  --ol-gate-rand: color-mix(in srgb, var(--ol-gate-schrift) 26%, var(--ol-gate-grund));
  --ol-gate-feld: #fff;
  --ol-gate-feld: color-mix(in srgb, var(--ol-gate-grund) 94%, var(--ol-gate-schrift));

  box-sizing: border-box;
  width: min(420px, calc(100% - 28px));
  max-height: calc(100dvh - 40px);
  padding: 26px;
  border: 0;
  border-radius: 20px;
  background: var(--ol-gate-grund);
  color: var(--ol-gate-schrift);
  box-shadow: 0 30px 90px rgba(6, 20, 14, .35);
  font: 15px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow: auto;
}
.ol-gate::backdrop { background: rgba(8, 22, 16, .62); backdrop-filter: blur(3px); }

.ol-gate h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
.ol-gate-text { margin: 0 0 18px; color: var(--ol-gate-leise); font-size: 14px; }

.ol-gate-feld { display: block; margin: 0 0 14px; }
.ol-gate-feld span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.ol-gate-feld input {
  box-sizing: border-box; width: 100%;
  padding: 13px 14px; font: inherit;
  border: 1px solid var(--ol-gate-rand); border-radius: 11px;
  background: var(--ol-gate-feld); color: inherit;
}
.ol-gate-feld input:focus {
  outline: 2px solid var(--ol-gate-knopf); outline-offset: 1px;
  border-color: var(--ol-gate-knopf);
}

/* Das Kästchen ist absichtlich leer voreingestellt - ein vorangekreuztes
   Häkchen ist keine Einwilligung (EuGH, Planet49). */
.ol-gate-zustimmung {
  display: flex; gap: 10px; align-items: start;
  margin: 0 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--ol-gate-leise);
}
.ol-gate-zustimmung input {
  width: 19px; height: 19px; margin: 1px 0 0; flex: 0 0 auto;
  accent-color: var(--ol-gate-knopf);
}

.ol-gate-meldung { margin: 0 0 10px; min-height: 1.2em; font-size: 13px; color: var(--ol-gate-knopf); }

.ol-gate-senden {
  display: block; width: 100%;
  padding: 14px; font: inherit; font-weight: 700;
  border: 0; border-radius: 30px;
  background: var(--ol-gate-knopf); color: var(--ol-gate-knopf-schrift); cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}
/* Aufhellen statt einer zweiten festen Farbe: Die erste ist jetzt
   einstellbar, eine passende zweite waere geraten. */
.ol-gate-senden:hover { filter: brightness(1.18); transform: translateY(-1px); }
.ol-gate-senden:disabled { opacity: .6; cursor: wait; transform: none; }

/* Gleichberechtigt, nicht versteckt: Der Weg vorbei muss auffindbar sein,
   sonst ist die Einwilligung nicht freiwillig. */
.ol-gate-weiter {
  display: block; width: 100%;
  margin-top: 10px; padding: 12px;
  font: inherit; font-size: 13.5px;
  border: 1px solid var(--ol-gate-rand); border-radius: 30px;
  background: transparent; color: var(--ol-gate-leise); cursor: pointer;
}
.ol-gate-weiter:hover { background: #f3f8f3; }
.ol-gate-weiter:hover { background: color-mix(in srgb, var(--ol-gate-schrift) 7%, var(--ol-gate-grund)); }

.ol-gate-recht { margin: 14px 0 0; font-size: 11px; line-height: 1.5; color: #7a8c81; }
.ol-gate-recht { color: color-mix(in srgb, var(--ol-gate-schrift) 55%, var(--ol-gate-grund)); }
.ol-gate-recht a { color: var(--ol-gate-knopf); }

.ol-gate-falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .ol-gate-senden { transition: none; }
}
