/* ProBus v2 – Cookie-Hinweis, Fenster „Cookie-Einstellungen“ und Knopf im Fuß (siehe inc/einwilligung.php).
   Nutzt die Farben des Themes, passt sich damit von selbst an hell und dunkel an. */

/* ---------- Knopf im Fuß: sieht aus wie die Links daneben ---------- */
.fuss__knopf { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: #D5DADD; }
.fuss__knopf:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--rot); text-underline-offset: .3em; }

/* ---------- Hinweis unten am Rand ---------- */
.cookie-hinweis { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 0 var(--rand) 20px; pointer-events: none; }
.cookie-hinweis[hidden] { display: none; }
.cookie-hinweis__innen { pointer-events: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px 40px; max-width: 1180px; max-height: 70svh; overflow: auto; margin-inline: auto; padding: 24px 28px; background: var(--asphalt); color: var(--licht); border: 1px solid var(--linie); border-top: 4px solid var(--rot); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.cookie-hinweis h2 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.15; }
.cookie-hinweis p { margin: 0; max-width: 72ch; font-size: .95rem; line-height: 1.55; color: var(--nebel); }
.cookie-hinweis p a { color: var(--licht); text-decoration-color: var(--rot); text-underline-offset: .25em; }
.cookie-hinweis__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; justify-items: stretch; }
.cookie-hinweis__mehr { grid-column: 1 / -1; justify-self: center; }

/* Beide Entscheidungen sehen gleich aus: Ablehnen ist genauso leicht wie Zustimmen. */
.cookie-knopf { min-width: 150px; }

/* Textlink als Knopf */
button.textlink { padding: 0; border: 0; background: none; cursor: pointer; font-size: .95rem; }

/* Solange der Hinweis offen ist, steht der Hilfe-Knopf darüber statt dahinter. */
body .hilfe-knopf { bottom: calc(20px + var(--cookie-hoehe, 0px)); }
@media (max-width: 700px) { body .hilfe-knopf { bottom: calc(12px + var(--cookie-hoehe, 0px)); } }

html.hell .cookie-hinweis__innen { box-shadow: 0 14px 40px rgba(25, 30, 35, .22); }

@media (max-width: 820px) {
  .cookie-hinweis { padding: 0; }
  .cookie-hinweis__innen { grid-template-columns: 1fr; gap: 16px; padding: 20px 20px calc(18px + env(safe-area-inset-bottom)); border-inline: 0; border-bottom: 0; }
  .cookie-hinweis h2 { font-size: 1.2rem; }
  .cookie-hinweis p { font-size: .9rem; }
  .cookie-knopf { min-width: 0; }
}

/* ---------- Fenster „Cookie-Einstellungen“ ---------- */
.cookie-fenster { width: min(640px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; background: var(--asphalt); color: var(--licht); border: 1px solid var(--linie); border-top: 4px solid var(--rot); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
.cookie-fenster::backdrop { background: rgba(4, 5, 6, .72); }
.cookie-fenster__innen { position: relative; padding: 28px clamp(20px, 4vw, 32px) 24px; }
.cookie-fenster h2 { margin: 0 48px 18px 0; font-size: clamp(1.5rem, 4vw, 1.9rem); }
.cookie-fenster h3 { font-size: 1.05rem; }
.cookie-fenster p { margin: 8px 0 0; font-size: .93rem; line-height: 1.55; color: var(--nebel); }
.cookie-fenster__zu { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid var(--linie); border-radius: 50%; background: var(--nacht); color: var(--licht); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.cookie-fenster__zu:hover { border-color: var(--rot); }
.cookie-gruppe { padding: 16px 0; border-top: 1px solid var(--linie); }
.cookie-gruppe__kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-gruppe__kopf label { cursor: pointer; }
.cookie-gruppe__immer { flex: none; font-family: var(--technik); font-weight: 700; font-size: .85rem; color: var(--schiefer); }
.cookie-fenster__fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 8px 0 0 !important; padding-top: 20px; border-top: 1px solid var(--linie); }

/* Schalter an/aus */
.cookie-schalter { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 54px; height: 30px; margin: 0; border: 2px solid var(--schiefer); border-radius: 999px; background: var(--blech); cursor: pointer; transition: background .15s, border-color .15s; }
.cookie-schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--licht); transition: transform .15s; }
.cookie-schalter:checked { background: var(--rot); border-color: var(--rot); }
.cookie-schalter:checked::after { transform: translateX(24px); background: #fff; }
@media (prefers-reduced-motion: reduce) { .cookie-schalter, .cookie-schalter::after { transition: none; } }
