/* ============================================================
   LBZ Checkup – Einwilligung, Datenschutz und Rechtslinks
   Wird über _Kopf auf allen Seiten geladen (im Editor direkt).
     ew-  Einwilligung (Karte für den Kunden, Kasten für den Berater,
          Stand mit Widerruf, Hinweise auf Prüf- und Anfragen-Seite)
     ds-  Abschnitt „Datenschutz im LBZ-Checkup“
     rechtslinks  Impressum · Datenschutz · Erstinformation
   ============================================================ */

/* ---------------- Rechtslinks ---------------- */

.rechtslinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 18px;
}

.rechtslinks a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.rechtslinks a:hover { color: var(--ink); }
.rechtslinks a:focus-visible { outline: 3px solid rgba(255, 206, 0, 0.55); outline-offset: 2px; border-radius: 4px; }

.footer .rechtslinks { margin-top: 0; padding: 8px 0 4px; }

/* Editor: schmale Leiste unter der App */
.ed-fuss { flex: none; padding: 2px 16px 6px; }
.ed-fuss .rechtslinks { margin: 0; font-size: 11.5px; }

/* ---------------- Datenschutz im LBZ-Checkup ---------------- */

.footer .ds-abschnitt { text-align: left; font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }

.ds-text p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 10px; overflow-wrap: anywhere; }
.ds-text p:last-child { margin-bottom: 0; }
.ds-text strong { color: var(--ink); }
.ds-text a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* Widerspruchsrecht: von den übrigen Informationen sichtbar getrennt (Art. 21 Abs. 4 DSGVO) */
.ds-text .ds-widerspruch { border-left: 3px solid var(--line-strong); background: rgba(0, 0, 0, 0.025); border-radius: 0 8px 8px 0; padding: 8px 12px; margin-top: 14px; }

/* Anmeldeseite: zum Aufklappen */
.ds-details { text-align: left; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.ds-details > summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    border-radius: 12px;
}
.ds-details > summary:focus-visible { outline: 3px solid rgba(255, 206, 0, 0.55); outline-offset: 2px; }
.ds-details[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.ds-details .ds-text { padding: 12px 14px 14px; max-height: 60vh; overflow: auto; }
.ds-details .ds-text p { font-size: 12.5px; }

/* ---------------- Einwilligung: Platz im Formular ---------------- */

.ew-platz { margin-bottom: 24px; }
.ew-platz:empty { display: none; }
.ul-section .ew-platz { margin-bottom: 18px; }

/* Karte mit dem Text, dem Häkchen und „Einwilligen“ */
.ew-karte {
    border: 1px solid #f0d24b;
    border-left: 4px solid var(--yellow);
    background: #fffdf2;
    border-radius: 14px;
    padding: 18px 20px;
    color: var(--ink-2);
}

.ew-karte:focus { outline: 3px solid rgba(255, 206, 0, 0.55); outline-offset: 2px; }

.ew-kopf { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }

.ew-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--black);
    color: var(--yellow);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    margin-top: 1px;
}

.ew-titel { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.35; }
.ew-unter { font-size: 13px; color: var(--muted); margin-top: 2px; }

.ew-text { margin: 4px 0 14px; }
.ew-text p { font-size: 13.5px; line-height: 1.6; margin: 0 0 9px; overflow-wrap: anywhere; }
.ew-text strong { color: var(--ink); }
.ew-text a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.ew-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    margin-bottom: 12px;
}

.ew-check input { margin-top: 2px; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--black); cursor: pointer; }
.ew-check input:focus-visible { outline: 3px solid rgba(255, 206, 0, 0.7); outline-offset: 2px; }

.ew-aktionen { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.ew-aktionen .btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.ew-meldung { font-size: 13px; color: #8c0011; }
.ew-meldung:empty { display: none; }

/* Hinweis unter der Karte: die Fragen sind bis zur Einwilligung gesperrt */
.ew-gesperrt-hinweis { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Gesundheitsschritt ohne Einwilligung: Fragen sichtbar, aber erkennbar gesperrt */
.ew-ohne-einwilligung .input[readonly],
.ew-ohne-einwilligung .input:disabled {
    background: #f4f4f5;
    color: var(--ink-2);
    -webkit-text-fill-color: var(--ink-2);
    opacity: 1;
    cursor: not-allowed;
}
.ew-ohne-einwilligung .seg-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.ew-ohne-einwilligung .file-picker { cursor: not-allowed; opacity: 0.6; }

/* Stand: eingewilligt (kompakt, mit Widerruf) */
.ew-stand {
    display: flex;
    gap: 10px 12px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #b7e2c4;
    border-left: 4px solid #1d7a3f;
    background: #f3faf5;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: #14532d;
}

.ew-stand .ew-icon { background: #1d7a3f; color: #fff; width: 22px; height: 22px; font-size: 12px; }
.ew-stand-text { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.ew-stand-text strong { color: #0f3d22; }
.ew-stand .btn { white-space: nowrap; }

/* Widerrufen bzw. gesperrt */
.ew-stand--widerrufen { border-color: #ffb3bc; border-left-color: var(--red); background: #fff4f5; color: #8c0011; }
.ew-stand--widerrufen .ew-icon { background: var(--red); }
.ew-stand--widerrufen .ew-stand-text strong { color: #6b000d; }

/* Text zum Nachlesen (Stand, Berater) */
.ew-details { flex-basis: 100%; }
.ew-details > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink); width: max-content; max-width: 100%; }
.ew-details > summary:focus-visible { outline: 3px solid rgba(255, 206, 0, 0.55); outline-offset: 2px; border-radius: 4px; }
.ew-details .ew-text { margin: 10px 0 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); }

/* Berater: Kasten mit Stand und Vermerk */
.ew-berater {
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--yellow);
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--ink-2);
}

.ew-berater .ew-kopf { margin-bottom: 6px; }
.ew-berater .ew-titel { font-size: 15px; }
.ew-berater p { margin: 0 0 8px; line-height: 1.5; }

.ew-vermerk {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafafa;
}

.ew-vermerk legend { font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.ew-vermerk fieldset { border: 0; padding: 0; margin: 0; }

.ew-felder { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin: 8px 0 10px; }
.ew-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ew-feld .input { height: 40px; max-width: 200px; }
.ew-form-wahl { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink); }
.ew-form-wahl label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ew-form-wahl input { width: 18px; height: 18px; accent-color: var(--black); }
.ew-form-wahl input:focus-visible { outline: 3px solid rgba(255, 206, 0, 0.7); outline-offset: 2px; }
.ew-vermerk .ew-check { margin-bottom: 10px; }

/* Datei-Fragen ohne Einwilligung */
.ew-datei-hinweis { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.ew-datei-hinweis a { color: var(--ink); font-weight: 600; }

/* Prüf- und Anfragen-Seite: Hinweis „Einwilligung fehlt“ */
.ew-hinweis-seite { margin-bottom: 18px; }

/* ---------------- Einwilligung zur GdP-Mitgliedschaft (gewerkschaft.js, direkt an der Frage) ---------------- */

.gw-platz { margin: 2px 0 12px; }
.gw-platz:empty { display: none; }

.gw-box {
    border: 1px solid #f0d24b;
    border-left: 4px solid var(--yellow);
    background: #fffdf2;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-2);
}

.gw-box:focus { outline: 3px solid rgba(255, 206, 0, 0.55); outline-offset: 2px; }
.gw-box p { margin: 0 0 8px; }
.gw-box .ew-icon { width: 22px; height: 22px; font-size: 12px; }
.gw-box .ew-check { margin: 10px 0; font-size: 13.5px; }
.gw-box .ew-aktionen { margin-top: 2px; }
.gw-box .ew-vermerk { margin-top: 8px; }

.gw-kopf { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.gw-kopf-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.gw-kopf-text strong { color: var(--ink); }

.gw-hinweis { font-size: 12.5px; color: var(--muted); }
.gw-box > .gw-hinweis:last-child { margin: 8px 0 0; }

.gw-details { margin: 6px 0 2px; }

/* Titel des Einwilligungstexts, sichtbar über dem aufklappbaren Volltext */
.gw-box .gw-titel { margin: 6px 0 2px; color: var(--ink); }

/* Im Abschnitt „Datenschutz im LBZ-Checkup“: Stand mit Widerruf bzw. Löschen, auch wenn die Frage nicht zu sehen ist */
.gw-platz--datenschutz { margin: 16px 0 0; }

/* Eingewilligt: eine Zeile mit „Einwilligung widerrufen“ */
.gw-box--ok { border-color: #b7e2c4; border-left-color: #1d7a3f; background: #f3faf5; color: #14532d; padding: 8px 12px; }
.gw-box--ok .ew-icon { background: #1d7a3f; color: #fff; }
.gw-box--ok strong { color: #0f3d22; }
.gw-zeile { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.gw-zeile-text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.gw-zeile .btn { white-space: nowrap; }

/* Berater: weißer Kasten wie bei der Gesundheits-Einwilligung */
.gw-box--berater { background: #fff; border-color: var(--line-strong); }

.tag-freiwillig { cursor: help; }

/* Ohne Einwilligung: Ja/Nein sichtbar, aber erkennbar gesperrt */
.gw-gesperrt .seg-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.gw-gesperrt .input[readonly],
.gw-gesperrt .input:disabled { background: #f4f4f5; cursor: not-allowed; }

/* Nach dem Widerruf vor dem Abschluss: nur noch die Bestätigung */
.ew-ende {
    max-width: 640px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px 26px;
    text-align: center;
}

.ew-ende:focus { outline: none; }
.ew-ende h1 { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.ew-ende p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 0 0 12px; }
.ew-ende .btn { margin-top: 6px; }

@media (max-width: 640px) {
    .ew-karte { padding: 14px 14px; }
    .ew-titel { font-size: 16px; }
    .ew-text p { font-size: 13px; }
    .ew-check { padding: 10px 12px; font-size: 13.5px; }
    .ew-aktionen .btn { flex: 1 1 100%; justify-content: center; }
    .ew-feld .input { max-width: none; }
    .ew-feld { flex: 1 1 100%; }
    .ew-ende { margin: 20px 10px; padding: 22px 16px; }
    .ds-text p { font-size: 13px; }
    .gw-box { padding: 10px 12px; }
    .gw-zeile .btn { flex: 1 1 100%; justify-content: center; }
}
