/* Cookie-Hinweis, Gestaltung.
 *
 * Alle Farben und Maße stehen als Variablen ganz oben. Wer das Aussehen an
 * einen Kunden anpassen will, aendert nur diesen Block und sonst nichts.
 */

:root {
  --ch-grund: #ffffff;
  --ch-text: #1a1a1a;
  --ch-text-leise: #5a5a5a;
  --ch-linie: #e2e2e2;
  --ch-akzent: #1f6feb;
  --ch-akzent-text: #ffffff;
  --ch-radius: 12px;
  --ch-schatten: 0 10px 40px rgba(0, 0, 0, 0.18);
  --ch-breite: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ch-grund: #17181a;
    --ch-text: #f0f0f0;
    --ch-text-leise: #a8a8a8;
    --ch-linie: #303236;
    --ch-schatten: 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --ch-grund: #17181a;
  --ch-text: #f0f0f0;
  --ch-text-leise: #a8a8a8;
  --ch-linie: #303236;
  --ch-schatten: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Solange gefragt wird, laesst sich die Seite dahinter nicht scrollen.
   Sonst kann man den Kasten wegscrollen und ihn dabei uebersehen. */
html.ch-offen,
html.ch-offen body {
  overflow: hidden;
}

/* Gegen die Stile der Wirtsseite abschirmen.
 *
 * Ein Baustein, der in fremde Seiten eingebaut wird, erbt deren Regeln.
 * Auf elfon.de zwang das Theme jede Ueberschrift in Grossbuchstaben, und
 * so stand da "HINWEIS ZU COOKIES". Deshalb setzen wir die Eigenschaften,
 * die erfahrungsgemaess durchschlagen, ausdruecklich zurueck. */
.ch-hinter,
.ch-hinter * {
  box-sizing: border-box;
  text-transform: none;
  letter-spacing: normal;
  font-style: normal;
  text-shadow: none;
  float: none;
  max-width: none;
}

.ch-hinter {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}

@media (min-width: 40rem) {
  .ch-hinter {
    align-items: center;
  }
}

.ch-kasten {
  width: 100%;
  max-width: var(--ch-breite) !important;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--ch-grund);
  color: var(--ch-text);
  border-radius: var(--ch-radius);
  box-shadow: var(--ch-schatten);
  padding: 1.6rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (min-width: 40rem) {
  .ch-kasten {
    padding: 2rem;
  }
}

.ch-titel {
  margin: 0 0 0.7rem;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 650;
}

.ch-text {
  margin: 0 0 1.2rem;
  color: var(--ch-text-leise);
}

.ch-liste {
  margin: 0 0 1.3rem;
  border-top: 1px solid var(--ch-linie);
}

.ch-zeile {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--ch-linie);
}

.ch-box {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--ch-akzent);
}

.ch-box:disabled {
  opacity: 0.55;
}

.ch-beschriftung {
  display: block;
  cursor: pointer;
}

.ch-kopf {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.ch-beschreibung {
  display: block;
  color: var(--ch-text-leise);
  font-size: 0.87rem;
}

.ch-knoepfe {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 34rem) {
  .ch-knoepfe {
    flex-direction: row;
  }
}

/* Beide Knoepfe sind gleich breit und gleich auffaellig. Ein blasser oder
   kleinerer Ablehnen-Knopf macht die Einwilligung angreifbar. */
.ch-knopf {
  flex: 1 1 0;
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--ch-linie);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--ch-grund);
  color: var(--ch-text);
  transition: filter 0.15s ease;
}

.ch-knopf:hover {
  filter: brightness(0.96);
}

.ch-knopf:focus-visible {
  outline: 2px solid var(--ch-akzent);
  outline-offset: 2px;
}

.ch-knopf-haupt {
  background: var(--ch-akzent);
  border-color: var(--ch-akzent);
  color: var(--ch-akzent-text);
}

.ch-knopf-zweit {
  background: var(--ch-grund);
}

.ch-knopf-schlicht {
  flex: 0 1 auto;
  background: none;
  border-color: transparent;
  color: var(--ch-text-leise);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ch-fuss {
  margin: 1.1rem 0 0;
  font-size: 0.83rem;
  color: var(--ch-text-leise);
}

.ch-fuss a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .ch-knopf {
    transition: none;
  }
}

/* Anpassung fuer elfon.de: Akzentfarbe des Shops statt der Vorgabe. */
:root {
  --ch-akzent: #00b3b7;
  --ch-akzent-text: #ffffff;
}
