/* Pflege-Rechner (Spec v0.4 §5): Grundschrift >= 18 px, Klickflaechen >= 44 px, Kontrast WCAG AA, Druckansicht.
   Seit 01.12.2026: Gestaltung so weit wie moeglich ueber die Bootstrap-Klassen des Portals (border, shadow-sm, card,
   row/col, d-flex, gap, text-nowrap, align-middle, btn-group, fixed-bottom, focus-ring ...). Hier steht nur, was BS
   nicht abdeckt - mit Begruendung. Dark-Mode: scss/bootstrap/scss/_root.scss, Abschnitt "Pflege-Rechner". */

/* Grundschrift 18 px (Zielgruppe aelter, Spec §5) - BS-Standard ist 16 px */
.pr-wrap { font-size: 1.125rem; line-height: 1.6; }
.pr-wrap .form-text,
.pr-wrap .small { font-size: 1rem; }
.pr-text p { max-width: 48rem; }

/* --- Accordions (Rechtsstand, FAQ, "Was ist das?", Eigene Werte, Grenzen) ---
   BS-Accordion ueber seine CSS-Variablen angepasst: kompakter, Open Sans statt der Headline-Schrift, Darkmint-Fokus.
   Grundton weiss; Banner hellorange, FAQ lightmint. */
.pr-accordion {
    --bs-accordion-bg: #fff;
    --bs-accordion-btn-bg: #fff;
    --bs-accordion-active-bg: #fff;
    --bs-accordion-active-color: #212529;
    --bs-accordion-btn-color: #212529;
    --bs-accordion-btn-padding-y: .6rem;
    --bs-accordion-btn-padding-x: 1rem;
    --bs-accordion-body-padding-y: .25rem;
    --bs-accordion-body-padding-x: 1rem;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--bs-darkmint, #ceddc7);
    --bs-accordion-btn-focus-border-color: var(--bs-darkmint, #ceddc7);
}
.pr-banner {
    --bs-accordion-bg: #fff8ec;
    --bs-accordion-btn-bg: #fff8ec;
    --bs-accordion-active-bg: #fff8ec;
}
.pr-faq .pr-accordion {
    --bs-accordion-bg: var(--bs-lightmint, #edf3ed);
    --bs-accordion-btn-bg: var(--bs-lightmint, #edf3ed);
    --bs-accordion-active-bg: var(--bs-lightmint, #edf3ed);
    --bs-accordion-btn-padding-y: 1rem;
    --bs-accordion-body-padding-y: .5rem;
}
.pr-accordion .accordion-header,
.pr-accordion .accordion-button { font-family: 'Open Sans', sans-serif; }
/* Inhalt oben ausrichten: bei zweizeiliger Ueberschrift stehen Icon und Pfeil an der ersten Zeile statt mittig */
.pr-accordion .accordion-button { font-size: 1.125rem; font-weight: 600; min-height: 2.75rem; align-items: flex-start; line-height: 1.5; }
.pr-accordion .accordion-button > i { margin-top: .25em; flex: 0 0 auto; }
.pr-accordion .accordion-button::after { margin-top: .125em; }
.pr-accordion .accordion-button:not(.collapsed) { box-shadow: none; }
/* feine Trennlinie zwischen Ueberschrift und ausgeklapptem Inhalt */
.pr-accordion .accordion-body { font-size: 1rem; padding-top: .75rem; padding-bottom: .75rem; border-top: 1px solid rgba(0, 0, 0, .1); }
.pr-faq .pr-accordion .accordion-body { padding-bottom: 1.25rem; }

/* --- Formular ---
   Lightmint per ID statt .bg-lightmint: die Klasse wird im Dark-Mode grau, das Formular soll mint bleiben. */
.pr-wrap #pr-form,
.pr-wrap #ph-form { background-color: var(--bs-lightmint, #edf3ed) !important; }
/* Kontrast >= 3:1 fuer Feldraender (WCAG 1.4.11), auch auf hellgruenem Grund - BS-Grau ist zu hell */
.pr-wrap form .form-control,
.pr-wrap form .form-select { border-color: #7a8288; background-color: #fff; }
.pr-wrap form .input-group-text { border-color: #7a8288; }
.pr-wrap form .form-check-input { border-color: #7a8288; }
/* Schrittanzeige wird mobil statt eines Textfelds fokussiert (keine Tastatur) - ohne Fokusrahmen */
#pr-progress:focus { outline: none; }

/* Auswahlkarten (Radio sichtbar, Karte markiert die Wahl) - kein BS-Gegenstueck mit sichtbarem Radio */
.pr-choice {
    display: flex; align-items: center; gap: .75rem;
    min-height: 3.25rem; padding: .75rem 1rem;
    border: 2px solid #7a8288; border-radius: .5rem; cursor: pointer; background: #fff;
}
.pr-choice input { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; accent-color: #481860; }
.pr-choice:has(input:checked) { border-color: #481860; background: #f4eef7; }
.pr-choice:focus-within { outline: 3px solid #b35f00; outline-offset: 2px; }
/* Pflegegrad 1-5 ab Tablet in einer Zeile: etwas kleinere Schrift, damit "Pflegegrad 5" passt */
@media (min-width: 768px) {
    .pr-choices-pg .pr-choice { gap: .4rem; padding: .75rem .5rem; font-size: 1rem; line-height: 1.3; }
}

/* Betragsfelder: begrenzte Breite, mobil volle Breite (BS hat keine max-width-Stufen) */
.pr-money { max-width: 18rem; }
.pr-select { font-size: 1.125rem; min-height: 3rem; max-width: 24rem; }
@media (max-width: 575.98px) {
    .pr-money, .pr-select { max-width: none; width: 100%; }
}
.pr-money .form-control,
.pr-money .input-group-text { font-size: 1.125rem; min-height: 3rem; }
/* Das Portal-Bootstrap ist auf Zusatzfelder LINKS vom Eingabefeld eingestellt (.form-control ohne linken Rand,
   .input-group-text ohne rechten Rand und nur links rund). In den Rechnern steht "€"/"%" rechts -> Raender und
   Ecken hier spiegeln, sonst fehlt dem Feld der linke Rand (Klicktest 26.11.2026). */
.pr-money > .form-control {
    border-left: var(--bs-border-width) solid #7a8288;
    border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.pr-money > .input-group-text {
    border: var(--bs-border-width) solid #7a8288; border-left: 0;
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
/* Checkbox mit groesserer Klickflaeche */
.pr-check .form-check-input { width: 1.4rem; height: 1.4rem; margin-top: .2rem; }
.pr-check .form-check-label { padding-left: .5rem; }

/* --- Ergebnis --- */
#pr-result:focus,
#ph-result:focus { outline: none; }
/* Scroll-Ziele mit etwas Luft zum oberen Rand */
#pr-beispiele, #pr-result, #pr-form, #ph-result, #ph-form, #ph-land, #pr-hinweis { scroll-margin-top: 1rem; }
/* Kernaussage: groesser als BS-Stufen; mobil hoechstens 2 Zeilen (Schrift waechst mit der Breite, 16-20 px) */
.pr-headline { font-size: 1.6rem; line-height: 1.3; }
.pr-headline strong { font-size: 2.2rem; white-space: nowrap; }
@media (max-width: 767.98px) {
    .pr-headline { font-size: clamp(1rem, 4.6vw, 1.25rem); }
    .pr-headline strong { font-size: 1em; }
}
.pr-pos strong { color: #2e6b2e; }
.pr-neg strong { color: #be0000; }
.pr-zero strong { color: #495057; }

/* --- Tabellen ---
   Feste dunkle Schrift: das Portal-Bootstrap setzt die Tabellenschrift (--bs-emphasis-color) im Dark-Mode auf Weiss */
.pr-wrap .pr-table { --bs-table-color: #212529; --bs-table-striped-color: #212529; --bs-table-bg: #fff; color: #212529; }
.pr-wrap .pr-table > :not(caption) > * > * { color: #212529; }
/* Ueberblick-Tabelle: je Leistung ein tbody; Leistungen wechseln Mint/Hell, darin die Zeilen dunkler/heller
   (zweistufiges Streifenmuster - BS table-striped kennt nur eine Stufe) */
.pr-wrap .pr-table-groups > tbody:nth-of-type(odd) > tr:nth-child(odd) > * { --bs-table-bg: #dce7dc; }
.pr-wrap .pr-table-groups > tbody:nth-of-type(odd) > tr:nth-child(even) > * { --bs-table-bg: #edf3ed; }
.pr-wrap .pr-table-groups > tbody:nth-of-type(even) > tr:nth-child(odd) > * { --bs-table-bg: #f6f9f6; }
.pr-wrap .pr-table-groups > tbody:nth-of-type(even) > tr:nth-child(even) > * { --bs-table-bg: #fff; }
/* Einfache Tabellen: Zeilen im Wechsel Mint/Weiss (BS table-striped waere grau) */
.pr-wrap .pr-table-rows > tbody > tr:nth-of-type(odd) > * { --bs-table-bg: #edf3ed; }
.pr-table .pr-sum th, .pr-table .pr-sum td { font-weight: 700; border-top: 2px solid #495057; }

/* Tabellen-Tabs (rechner-ui.js): mobil nur die gewaehlte Spalte */
@media (max-width: 767.98px) {
    .pr-tabs-an[data-tab-aktiv="1"] [data-tab]:not([data-tab="1"]),
    .pr-tabs-an[data-tab-aktiv="2"] [data-tab]:not([data-tab="2"]),
    .pr-tabs-an[data-tab-aktiv="3"] [data-tab]:not([data-tab="3"]),
    .pr-tabs-an[data-tab-aktiv="4"] [data-tab]:not([data-tab="4"]),
    .pr-tabs-an[data-tab-aktiv="5"] [data-tab]:not([data-tab="5"]) { display: none; }
}

/* Tabellen mobil (bis sm) als Karten: oben die Zeile, darunter die Werte mit Beschriftung (data-label) */
@media (max-width: 767.98px) {
    .pr-table-karten thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pr-table-karten, .pr-table-karten tbody, .pr-table-karten tr { display: block; width: 100%; }
    .pr-table-karten tr { border: 1px solid #dee2e6; border-radius: .5rem; overflow: hidden; margin-bottom: .75rem; }
    .pr-table-karten tr.pr-sum { border: 2px solid #495057; }
    .pr-wrap .pr-table-karten > tbody > tr:nth-of-type(n) > th {
        display: block; --bs-table-bg: var(--bs-lightmint, #edf3ed); border: 0; border-bottom: 1px solid #dee2e6; padding: .6rem .75rem;
    }
    .pr-wrap .pr-table-karten > tbody > tr:nth-of-type(n) > td {
        display: flex; justify-content: space-between; gap: 1rem; --bs-table-bg: #fff; border: 0; padding: .35rem .75rem;
    }
    .pr-table-karten td::before { content: attr(data-label); font-weight: 600; text-align: left; }
    /* Summenkarten: Titel in Brand-subtle */
    .pr-wrap .pr-table-karten > tbody > tr.pr-sum:nth-of-type(n) > th { --bs-table-bg: var(--bs-brand-bg-subtle, #dad1df); }
}

/* --- Diagramme --- */
/* Reform: Balken in voller Breite bei fester Hoehe (Breiten je Abschnitt kommen inline aus dem JS) */
.pr-hbar-label { width: 3.25rem; }
.pr-hbar-track { height: 2.125rem; min-width: 0; }
.pr-hbar-track > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-legend-farbe { flex: none; width: 1rem; height: 1rem; border-radius: 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* Heim: Verlaufslinie (SVG) */
/* Heim: Verlaufsdiagramm in voller Breite; rechner-heim.js zeichnet es in Kastenbreite, Hoehe bleibt 200 px */
.pr-bars { width: 100%; height: auto; display: block; }
.pr-axis { font-size: 13px; fill: #495057; }
/* Heim: Bundeslaender-Vergleich (Balkenliste mit drei Spalten, mobil zweizeilig) */
.ph-countries { list-style: none; padding: 0; margin: 0; }
.ph-countries li { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr 5.5rem; gap: .75rem; align-items: center; padding: .2rem 0; }
.ph-countries .ph-c-bar { background: #edf3ed; height: 1.1rem; border-radius: 2px; overflow: hidden; }
.ph-countries .ph-c-bar span { display: block; height: 100%; background: #9cac97; }
.ph-countries .is-selected { font-weight: 700; }
.ph-countries .is-selected .ph-c-bar span { background: #481860; }
.ph-countries .ph-c-val { text-align: right; white-space: nowrap; }
@media (max-width: 575.98px) {
    .ph-countries li { grid-template-columns: 1fr 5rem; }
    .ph-countries .ph-c-bar { grid-column: 1 / -1; order: 3; }
}

/* Ringdiagramm in der Einleitung (Reform): Illustration, Themen direkt am Abschnitt (SVG + Animation).
   Ohne JS voll sichtbar; rechner-reform.js setzt pr-ring--wait (leer) und beim Sichtbarwerden pr-ring--run. */
.pr-ring { max-width: 28rem; margin: 0 auto 1.5rem; }
.pr-ring-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pr-ring-track { stroke: #e9ecef; }
.pr-ring-label line { stroke-width: .5; stroke-linecap: round; }
.pr-ring-label text { font-size: 4.6px; font-weight: 600; fill: #212529; }
.pr-ring--wait .pr-ring-seg { stroke-dasharray: 0 100; }
.pr-ring--wait .pr-ring-label { opacity: 0; }
.pr-ring--run .pr-ring-seg { animation: pr-ring-fill var(--dur) linear var(--delay) both; }
.pr-ring--run .pr-ring-label { animation: pr-ring-in .4s ease-out var(--delay) both; }
@keyframes pr-ring-fill {
    from { stroke-dasharray: 0 100; }
    to { stroke-dasharray: var(--len) var(--rest); }
}
@keyframes pr-ring-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Balkendiagramm in der Einleitung (Heim): gestapelter Balken, Begriffe am Abschnitt (SVG + Animation).
   Ohne JS voll sichtbar; die Seite setzt pr-anim-wait (leer), rechner-ui.js beim Sichtbarwerden pr-anim-run. */
.pr-hbalken { max-width: 32rem; margin: 0 auto; }
.pr-hbalken-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pr-hbalken-track { fill: #e9ecef; }
.pr-hbalken-seg { transform-box: fill-box; transform-origin: left center; }
.pr-hbalken-label line { stroke-width: .4; }
.pr-hbalken-label text { font-size: 4px; font-weight: 600; fill: #212529; }
.pr-anim-wait .pr-hbalken-seg { transform: scaleX(0); }
.pr-anim-wait .pr-hbalken-label { opacity: 0; }
.pr-anim-run .pr-hbalken-seg { animation: pr-hbalken-fill var(--dur) linear var(--delay) both; }
.pr-anim-run .pr-hbalken-label { animation: pr-ring-in .4s ease-out var(--delay) both; }
@keyframes pr-hbalken-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --- Bewegung: Kacheln und Teaser heben sich beim Hovern (BS hat keine Hover-Utilities) --- */
a.pr-linkcard,
.pr-teaser { transition: box-shadow .15s ease, transform .15s ease; }
a.pr-linkcard:hover,
.pr-teaser:hover { box-shadow: 0 .375rem .75rem rgba(0, 0, 0, .15) !important; }
a.pr-linkcard:hover { color: #481860 !important; transform: translateY(-2px); }

/* Trenner vor "Allgemeine Informationen": Kreis mit Pfeil (Groesse - BS hat keine festen Kreisgroessen) */
.pr-trenner-kreis { width: 3rem; height: 3rem; font-size: 1.25rem; }

/* --- Abdunkeln beim Arbeiten im Formular (rechner-ui.js formFokus): graue Flaeche ueber der Seite, Formular darueber --- */
.pr-abdunkeln {
    position: fixed; inset: 0; z-index: 1040;
    background: rgba(33, 37, 41, .45);
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.pr-abdunkeln.is-an { opacity: 1; visibility: visible; }
.pr-fokus-an { position: relative; z-index: 1041; }

/* Tabellen immer komplett sichtbar: kein eigener Scrollbereich (BS .table-responsive wuerde scrollen).
   Mobil sorgen Karten und Tabs dafuer, dass die Tabellen in die Breite passen. */
.pr-wrap .table-responsive { overflow: visible; }

/* --- Mobiler Balken "Jetzt berechnen" (Position ueber BS fixed-bottom): Schatten nach oben, gleitet weg --- */
.pr-mobil-cta {
    box-shadow: 0 -.25rem .75rem rgba(0, 0, 0, .1);
    transition: transform .25s ease, visibility .25s;
}
.pr-mobil-cta.is-aus { transform: translateY(100%); visibility: hidden; }
/* Platz am Seitenende, damit der Balken (p-3 + Button) nichts verdeckt */
@media (max-width: 767.98px) {
    body.pr-mobil-cta-an { padding-bottom: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pr-ring--run .pr-ring-seg,
    .pr-ring--run .pr-ring-label,
    .pr-anim-run .pr-hbalken-seg,
    .pr-anim-run .pr-hbalken-label { animation: none; }
    a.pr-linkcard, .pr-teaser, .pr-mobil-cta, .pr-abdunkeln { transition: none; }
    a.pr-linkcard:hover { transform: none; }
}

@media print {
    nav, header, footer, .navbar, #pr-form, #pr-cta, #ph-form, #ph-cta, .breadcrumb, .social-reminder, .reminder-anmeldung, ins.adsbygoogle,
    .pr-wrap > div > section:not(#pr-result):not(#pr-result-more):not(#ph-result):not(#ph-result-more) { display: none !important; }
    #pr-result, #pr-result-more, #ph-result, #ph-result-more { display: block !important; }
    #pr-cta-band, #ph-cta-band, .pr-info-band { display: none !important; }
    .pr-wrap .border { border: 0 !important; }
    .pr-wrap .shadow-sm { box-shadow: none !important; }
    .pr-wrap { font-size: 12pt; }
    .pr-headline strong { color: #000 !important; }
    /* Rechtsstand-Text im Druck immer sichtbar */
    #pr-banner-text { display: block !important; }
    /* Ringdiagramm im Druck immer voll, ohne Animation */
    .pr-ring .pr-ring-seg { animation: none !important; stroke-dasharray: var(--len) var(--rest) !important; }
    .pr-ring .pr-ring-label { animation: none !important; opacity: 1 !important; }
    .pr-hbalken .pr-hbalken-seg { animation: none !important; transform: none !important; }
    .pr-hbalken .pr-hbalken-label { animation: none !important; opacity: 1 !important; }
}
