/*
 * Einwilligungs-Banner (Cookie-Hinweis) der Natur-Sport-Freunde-Eifel e.V.
 * Eigene Datei, damit das kompilierte Tailwind in style.css unverändert bleibt.
 * Farben, Radien und Schriften kommen aus den Variablen von style.css.
 * Wird nur eingebunden, wenn im Admin-Bereich wirklich etwas einwilligungspflichtig ist.
 */

.ew {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  pointer-events: none;
}

.ew[hidden] {
  display: none;
}

.ew-box {
  pointer-events: auto;
  width: 100%;
  max-width: 44rem;
  max-height: calc(100dvh - 1.5rem);
  /* overflow-x: hidden verhindert eine unnötige zweite Bildlaufleiste bei krummen Höhen */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.6);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-body);
  box-shadow: 0 10px 40px -12px rgb(14 34 22 / 35%);
}

.ew-box:focus {
  outline: none;
}

.ew-box:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.ew-titel {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.ew-text {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.ew-text a,
.ew-fuss a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Auswahl je Zweck (zweite Ebene) */
.ew-optionen {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.ew-optionen[hidden] {
  display: none;
}

.ew-legende {
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ew-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
}

.ew-option input[type="checkbox"] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  accent-color: var(--primary);
}

.ew-option input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.ew-option-titel {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ew-option-text {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* Schaltflächen: gleich groß, gleich auffällig – Ablehnen ist so leicht wie Annehmen. */
.ew-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1rem;
}

.ew-knopf {
  flex: 1 1 12rem;
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  border: 2px solid var(--primary);
  border-radius: 9999px;
  background: var(--card);
  color: var(--primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}

.ew-knopf:hover {
  background: var(--secondary);
}

.ew-knopf:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.ew-knopf[hidden] {
  display: none;
}

.ew-fuss {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  align-items: center;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.ew-link {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ew-link:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.ew-meldung {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--primary);
}

/* Fußzeilen-Schaltfläche „Cookie-Einstellungen“ (nur mit JavaScript sichtbar) */
.ew-fusszeile[hidden] {
  display: none;
}

/* Platzhalter für Inhalte anderer Anbieter, solange keine Einwilligung vorliegt */
.ew-platzhalter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) * 1.6);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.ew-platzhalter-titel {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .ew {
    padding: 1.25rem;
  }

  .ew-box {
    padding: 1.5rem;
  }

  .ew-titel {
    font-size: 1.25rem;
  }
}

@media (prefers-contrast: more) {
  .ew-box,
  .ew-option {
    border-color: var(--foreground);
  }
}
