/* Cookie-Banner: Blatt von unten wie das Menü auf dem Handy (Variante 3 aus entwurf/neubau/cookie-varianten.html).
   "Alle ablehnen" und "Alle akzeptieren" teilen sich dieselbe Regel und müssen genau gleich aussehen. */
.ck-dim { position: fixed; inset: 0; z-index: 890; background: rgba(20,18,14,0.34); }
.ck { position: fixed; z-index: 900; left: 0; right: 0; bottom: 0; width: min(640px, 100%); margin: 0 auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: var(--ink); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.2); padding: 0 36px; font-size: 15.5px; line-height: 1.5; text-align: left; }
.ck:focus { outline: none; }
/* Kopfzeile mit Titel und X bleibt beim Scrollen stehen; die Linie darunter erscheint erst, wenn etwas darunter durchläuft (cookies.js). */
.ck-kopf { position: sticky; top: 0; z-index: 2; background: #fff; margin: 0 -36px; padding: 12px 36px 8px; box-shadow: 0 1px 0 transparent; transition: box-shadow 0.18s; }
.ck.ck-unterwegs .ck-kopf { box-shadow: 0 1px 0 var(--line); }
.ck-kopf::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: #d9d2c5; margin: 0 auto 18px; }
.ck h2 { font-size: 26px; line-height: 1.15; margin: 0; padding-right: 44px; }
.ck > p { margin: 0 0 10px; color: var(--ink-soft); text-wrap: pretty; }
.ck-zu { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); display: grid; place-items: center; padding: 0; }
.ck-zu:hover { background: var(--sand); color: var(--ink); }
.ck-zu svg { width: 22px; height: 22px; display: block; }
.ck-arten { list-style: none; margin: 0 0 4px; padding: 0; }
.ck-arten li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line-on-card); }
.ck-w { flex: 1; min-width: 0; }
.ck-w b { display: block; font-weight: 700; }
.ck-w small { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 6px; }
.ck-t { display: block; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.ck-immer { flex: none; font-size: 14px; font-weight: 600; color: var(--ok); white-space: nowrap; padding-top: 2px; }
.ck-sw { flex: none; position: relative; display: block; width: 50px; height: 30px; margin: 0; cursor: pointer; }
.ck-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-sw i { position: absolute; inset: 0; border-radius: 100px; background: #cfc8bb; transition: background 0.18s; pointer-events: none; }
.ck-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.18s; }
.ck-sw input:checked + i { background: var(--ink); }
.ck-sw input:checked + i::after { transform: translateX(20px); }
.ck-sw input:focus-visible + i { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
/* Anbieter, Zweck, Cookies mit Dauer, Empfänger */
.ck-d { flex: 0 0 100%; margin-top: 4px; font-size: 14px; line-height: 1.45; }
.ck-d summary { display: inline-block; list-style: none; cursor: pointer; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 3px 0; }
.ck-d summary::-webkit-details-marker { display: none; }
.ck-d summary:hover { color: var(--ink); }
.ck-d dl { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 5px 14px; margin: 6px 0 4px; padding: 12px 14px; background: #f7f3ec; border-radius: 10px; }
.ck-d dt { color: var(--muted); margin: 0; }
.ck-d dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.ck-d dd a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* Knöpfe bleiben beim Scrollen sichtbar */
.ck-unten { position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.ck-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ck-kn { border: 0; border-radius: 100px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; line-height: 1.2; padding: 13px 18px; min-height: 54px; white-space: nowrap; }
.ck-kn:hover { background: #000; }
.ck-lk { border: 0; background: none; padding: 4px 0; color: var(--ink); font-size: 15px; line-height: 1.5; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ck-lk:hover { color: var(--gold-deep); }
.ck-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 14px; }
.ck-re { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.ck-re a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.ck-re a:hover { color: var(--ink); }
.ck > p.ck-kennung { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .ck { padding: 0 18px; }
  .ck-kopf { margin: 0 -18px; padding: 10px 18px 7px; }
  .ck-unten { padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px)); }
  .ck-d dl { grid-template-columns: minmax(0,1fr); gap: 0; padding: 10px 12px; }
  .ck-d dd + dt { margin-top: 7px; }
  .ck-kopf::before { margin-bottom: 14px; }
  .ck h2 { font-size: 23px; padding-right: 40px; }
  .ck > p { margin: 0 0 8px; }
  .ck-kn { padding-inline: 10px; }
  .ck-re { gap: 14px; }
  .ck-zu { top: 8px; right: 8px; }
}
/* Angemeldet: nicht unter die Leiste von WordPress */
.admin-bar .ck { max-height: calc(100vh - 46px); max-height: calc(100dvh - 46px); }
@media screen and (max-width: 782px) { .admin-bar .ck { max-height: calc(100vh - 58px); max-height: calc(100dvh - 58px); } }
/* Handy quer und sehr niedrige Fenster: flacher, damit zwischen Kopf und Knöpfen Platz bleibt */
@media (max-height: 480px) {
  .ck-kopf { padding-top: 8px; padding-bottom: 5px; }
  .ck-kopf::before { display: none; }
  .ck h2 { font-size: 20px; }
  .ck-zu { top: 0; }
  .ck-unten { padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); }
  .ck-kn { min-height: 46px; padding-block: 8px; }
  .ck-fuss { margin-top: 6px; }
}
@media (max-width: 340px) { .ck-zwei { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .ck:not([hidden]) { animation: ck-rein 0.34s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
  .ck-dim:not([hidden]) { animation: ck-hell 0.25s both; }
}
@keyframes ck-rein { from { transform: translateY(60px); opacity: 0; } }
@keyframes ck-hell { from { opacity: 0; } }
/* Fußzeile: „Cookie-Einstellungen“ steht ganz rechts, der Knopf „Nach oben“ darf den Link nicht verdecken */
@media (min-width: 901px) and (max-width: 1430px) { .ft-legal, .ft-fein { padding-right: 60px; } }
@media print { .ck, .ck-dim { display: none; } }
