/* ============================================
   kfwd – Cookie-Einstellungen, 2-Klick-Hinweise, Cookie-Übersicht
   Farben mit mind. 4,5:1 (Text) bzw. 3:1 (Bedienelemente) Kontrast
   ============================================ */
:root {
    --consent-gruen: #437316;
    --consent-gruen-hover: #365d12;
    --consent-grau: #767676;
    --consent-fokus: #1a1a1a;
}

/* ── Banner (erste Ebene), kompakt ── */
.consent-banner { position: fixed; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; z-index: 9999; max-width: 900px; margin: 0 auto; max-height: calc(100vh - 2.5rem); overflow-y: auto; background: #fff; color: var(--color-text, #505050); border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22); }
.consent-banner[hidden] { display: none; }
.consent-banner__inner { padding: 1rem 1.25rem; }
.consent-banner__titel { font-size: 1rem; font-weight: 500; margin: 0 0 0.25rem; color: var(--color-text, #505050); }
.consent-banner__text, .consent-banner__text p { font-size: 0.8125rem; line-height: 1.5; margin: 0 0 0.25rem; }
.consent-banner__dienste { font-size: 0.75rem; line-height: 1.45; margin: 0.25rem 0 0; }
.consent-banner__klein { font-size: 0.75rem; line-height: 1.45; margin: 0.25rem 0 0; color: #555; }
.consent-banner__aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.consent-banner__aktionen .consent-btn { padding: 0.55rem 0.75rem; font-size: 0.85rem; }
.consent-banner__aktionen .consent-btn--breit { grid-column: 1 / -1; }
.consent-banner__links { display: flex; gap: 1rem; margin: 0.4rem 0 0; font-size: 0.75rem; }
.consent-banner a, .consent-dialog a, .consent-hinweis a { color: var(--consent-gruen); text-decoration: underline; }
/* breit: Text links, Buttons rechts */
@media (min-width: 900px) {
    .consent-banner__inner { display: grid; grid-template-columns: 1fr 280px; column-gap: 1.75rem; align-items: center; }
    .consent-banner__inner > * { grid-column: 1; }
    .consent-banner__aktionen { grid-column: 2; grid-row: 1 / span 7; margin-top: 0; }
}

/* ── Buttons: "Alle akzeptieren" und "Nur notwendige" gleichwertig ── */
.consent-btn { display: inline-block; width: 100%; padding: 0.7rem 1.25rem; border: 2px solid var(--consent-gruen); border-radius: 6px; background: var(--consent-gruen); color: #fff; font-family: var(--font-sans, 'Ubuntu', sans-serif); font-size: 0.9rem; font-weight: 500; line-height: 1.3; text-align: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.consent-btn:hover { background: var(--consent-gruen-hover); border-color: var(--consent-gruen-hover); }
.consent-btn--zweit { background: #fff; color: var(--consent-gruen); }
.consent-btn--zweit:hover { background: #eef5e6; color: var(--consent-gruen-hover); }
.consent-btn--link { width: auto; background: none; border-color: transparent; color: var(--consent-gruen); text-decoration: underline; padding: 0.4rem 0.75rem; }
.consent-btn--link:hover { background: none; border-color: transparent; color: var(--consent-gruen-hover); }
.cookie-uebersicht .consent-btn { width: auto; }
.consent-btn:focus-visible, .consent-dialog__zu:focus-visible, .consent-details summary:focus-visible, .cc-settings-btn:focus-visible, .consent-video__play:focus-visible,
.consent-banner a:focus-visible, .consent-dialog a:focus-visible, .consent-hinweis a:focus-visible { outline: 3px solid var(--consent-fokus); outline-offset: 2px; }

/* ── Einstellungsdialog ── */
.consent-dialog { margin: auto; width: min(640px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: none; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); color: var(--color-text, #505050); }
.consent-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.consent-dialog__inner { padding: 1.5rem; }
.consent-dialog__kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.consent-dialog__titel { font-size: 1.25rem; font-weight: 500; margin: 0; }
.consent-dialog__zu { display: inline-flex; padding: 0.4rem; border: none; border-radius: 6px; background: none; color: var(--color-text, #505050); cursor: pointer; }
.consent-dialog__zu:hover { background: #f0f0f0; }
.consent-dialog__intro { font-size: 0.875rem; line-height: 1.6; margin: 0 0 1rem; }
.consent-dialog__aktionen { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
@media (min-width: 560px) { .consent-dialog__aktionen { flex-direction: row; } }

.consent-kat { border-top: 1px solid #e0e0e0; padding: 1rem 0 0.5rem; }
.consent-kat__titel { font-size: 1rem; font-weight: 500; margin: 0 0 0.25rem; }
.consent-kat__text { font-size: 0.8125rem; line-height: 1.5; margin: 0 0 0.75rem; color: #555; }
.consent-dienst { margin-bottom: 0.75rem; }

/* Schalter: echtes Kontrollkästchen, sichtbarer Fokus */
.consent-schalter { position: relative; display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.9375rem; }
.consent-schalter input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.consent-schalter__bahn { position: relative; flex-shrink: 0; width: 44px; height: 24px; border-radius: 12px; background: var(--consent-grau); transition: background 0.2s; }
.consent-schalter__bahn::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.consent-schalter input:checked + .consent-schalter__bahn { background: var(--consent-gruen); }
.consent-schalter input:checked + .consent-schalter__bahn::after { transform: translateX(20px); }
.consent-schalter input:disabled + .consent-schalter__bahn { background: #8aa870; cursor: not-allowed; }
.consent-schalter input:focus-visible + .consent-schalter__bahn { outline: 3px solid var(--consent-fokus); outline-offset: 2px; }
.consent-schalter small { color: #555; }

.consent-details { margin: 0.35rem 0 0 3.5rem; font-size: 0.8125rem; line-height: 1.5; }
.consent-details summary { cursor: pointer; color: var(--consent-gruen); text-decoration: underline; width: fit-content; }
.consent-details dl { margin: 0.5rem 0 0; }
.consent-details dt { font-weight: 500; margin-top: 0.4rem; }
.consent-details dd { margin: 0; }
.consent-details ul { margin: 0; padding-left: 1rem; }
.consent-details code { font-size: 0.8em; }

/* ── 2-Klick-Hinweis (Videos, Karte) ── */
.consent-hinweis { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-start; gap: 0.6rem; padding: 1rem 1.25rem; background: rgba(255, 255, 255, 0.97); color: var(--color-text, #505050); overflow-y: auto; cursor: default; }
.consent-hinweis--flaeche { position: relative; inset: auto; min-height: 320px; align-items: center; text-align: center; background: #f5f5f5; }
.consent-hinweis__text { font-size: 0.8125rem; line-height: 1.5; margin: auto 0 0; max-width: 34rem; }
.consent-hinweis__aktionen:last-child { margin-bottom: auto; }
.consent-hinweis__aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.consent-hinweis .consent-btn { width: auto; padding: 0.5rem 0.9rem; font-size: 0.8125rem; }

/* ── Video mit 2-Klick (Block/KirbyTag) ── */
.consent-video { margin: 1.5rem 0; }
.consent-video__flaeche { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-md, 8px); background: #000; }
.consent-video__flaeche img { width: 100%; height: 100%; object-fit: cover; display: block; }
.consent-video__flaeche iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.consent-video__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 0; border: none; border-radius: 50%; background: none; cursor: pointer; }
.consent-video figcaption { font-size: 0.875rem; margin-top: 0.5rem; color: var(--color-text-light, #707070); }

/* ── Cookie-Übersicht in der Datenschutzerklärung ── */
.cookie-uebersicht__tabelle { overflow-x: auto; margin-bottom: 1.5rem; }
.cookie-uebersicht table { min-width: 560px; }
.cookie-uebersicht code { font-size: 0.85em; white-space: nowrap; }

/* ── Footer-Button "Cookie-Einstellungen" ── */
.cc-settings-btn { background: none; border: 1px solid var(--color-text-light, #707070); font-family: var(--font-sans, 'Ubuntu', sans-serif); font-size: 0.8125rem; font-weight: 400; color: var(--color-text-light, #707070); cursor: pointer; padding: 0.375rem 1rem; border-radius: 2rem; transition: border-color 0.2s, color 0.2s; }
.cc-settings-btn:hover { color: var(--consent-gruen); border-color: var(--consent-gruen); }

@media (max-width: 768px) {
    .consent-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-width: none; max-height: calc(100vh - 1.5rem); }
    .consent-dialog__inner { padding: 1.25rem; }
    .consent-details { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .consent-btn, .consent-schalter__bahn, .consent-schalter__bahn::after, .cc-settings-btn { transition: none; }
}

/* ── Einsatzstellenkarte ── */
.storelocator__map { position: relative; }
.storelocator__map > .consent-hinweis { align-items: center; text-align: center; background: #f5f5f5; }
.storelocator__status { min-height: 1.25rem; margin: 0.5rem 0 0.75rem; font-size: 0.875rem; }
