/*
 * Cookie-Banner und -Einstellungen (einwilligung.js).
 *
 * Der Banner sitzt unten und lässt die Seite benutzbar. „Alle akzeptieren“ und
 * „Nur notwendige“ sind bewusst gleich gewichtet: Ablehnen darf nicht
 * schwerer sein als Zustimmen.
 */

.einw {
  position: fixed; z-index: 50;
  left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 34rem;
  background: #fff; color: var(--text);
  border: 1px solid var(--linie); border-radius: var(--rundung);
  box-shadow: 0 10px 40px rgba(var(--tief-rgb, 8, 37, 43), .22);
  padding: 1.2rem 1.3rem;
}

.einw-titel { font-size: 1.05rem; margin: 0 0 .4rem; }

.einw-text { font-size: .92rem; line-height: 1.55; color: var(--text-schwach); margin: 0 0 1rem; }
.einw-text a { color: var(--akzent-dunkel); }

.einw-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.einw-knoepfe .knopf { padding: .65rem 1.1rem; font-size: .95rem; }
.einw-ja { flex: 1 1 9rem; }

/* --- Dialog ---------------------------------------------------------------- */

.einw-dialog {
  width: min(100% - 2rem, 40rem); max-height: min(100% - 2rem, 46rem);
  border: 0; border-radius: var(--rundung); padding: 1.4rem 1.5rem;
  color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.einw-dialog::backdrop { background: rgba(var(--tief-rgb, 8, 37, 43), .55); }

.einw-dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.einw-dialog-kopf h2 { font-size: 1.25rem; margin: 0; }

.einw-zu {
  border: 0; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--text-schwach); padding: .2rem .4rem;
}
.einw-zu:hover { color: var(--text); }

.einw-dialog > .einw-text { margin-top: .6rem; }

.einw-liste { display: grid; gap: .7rem; margin-bottom: 1.2rem; }

.einw-kategorie { border: 1px solid var(--linie); border-radius: var(--rundung); padding: .9rem 1rem; }
.einw-kategorie > p { font-size: .9rem; color: var(--text-schwach); margin: .3rem 0 .4rem; }

.einw-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.einw-label { font-weight: 650; display: flex; align-items: center; gap: .6rem; cursor: pointer; }

.einw-pflicht {
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  color: var(--akzent-dunkel); background: var(--akzent-hell);
  padding: .12rem .5rem; border-radius: 999px;
}

/* Schalter aus einer gewöhnlichen Checkbox – bleibt für Tastatur und Vorlesegerät eine. */
.einw-kopf input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 2.6rem; height: 1.5rem; border-radius: 999px;
  background: #c5d0d4; position: relative; transition: background .15s;
}
.einw-kopf input::after {
  content: ''; position: absolute; top: .2rem; left: .2rem;
  width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.einw-kopf input:checked { background: var(--akzent); }
.einw-kopf input:checked::after { transform: translateX(1.1rem); }
.einw-kopf input:disabled { opacity: .55; cursor: default; }
.einw-kopf input:focus-visible { outline: 3px solid var(--akzent-mittel, var(--akzent)); outline-offset: 2px; }

.einw-kategorie summary { font-size: .85rem; color: var(--akzent-dunkel); cursor: pointer; }
.einw-rollen { overflow-x: auto; }
.einw-tabelle { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .8rem; }
.einw-tabelle th, .einw-tabelle td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.einw-tabelle th { color: var(--text-schwach); font-weight: 600; }

/* Der Verweis im Fuß ist ein Knopf, sieht aber aus wie seine Nachbarn. */
.fuss-knopf {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: #a8ccd2; text-align: left;
}
.fuss-knopf:hover { color: #fff; text-decoration: underline; }

@media (max-width: 620px) {
  .einw { left: .6rem; right: .6rem; bottom: .6rem; padding: 1rem; }
  .einw-knoepfe .knopf-still { flex: 1 1 100%; }
  .einw-dialog { padding: 1.1rem 1rem; }
}
