/*
 * Kundenkonto (deobald-sr 1.4.0): Übersicht, Termine buchen, Rechnungen, Stammdaten.
 * Wird nur vom Portal-Layout geladen. Farben und Schriften kommen aus dem Auftritt
 * des jeweiligen Hauses (Variablen des Website-Layouts); hier stehen nur Aufbau und Abstände.
 */
.sr-portal { --pk-linie: var(--front-line, #d8dcd4); --pk-flaeche: var(--t-surface, #fff); --pk-leise: var(--muted, #6a6f6b); --pk-akzent: var(--t-accent, #416666); }
.sr-portal-tabs { flex-wrap: wrap; gap: 6px 24px; }
.sr-portal-tabs a { white-space: nowrap; }
.sr-portal-bar { margin-bottom: 32px; }

.pk-intro h1 { font-size: clamp(32px, 4.2vw, 52px); }
.pk-intro p { margin-bottom: 24px; max-width: 640px; }
.pk-neben { font-size: 14px; line-height: 1.5; color: var(--pk-leise); }
.pk-mitte { text-align: center; margin: 12px 0 0; }
.pk-tag { display: inline-block; min-width: 1.8em; font-weight: 650; }

/* Abschnitte der Übersicht */
.pk-abschnitt { margin: 0 0 40px; }
.pk-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin: 0 0 14px; }
.pk-kopf h2, .pk-konditionen h2, .pk-uebersprungen h2 { font-size: 22px; margin: 0; }
.pk-kopf a { font-size: 15px; }

.pk-aktion { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; margin: 0 0 28px; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); }
.pk-aktion-haupt, .pk-aktion-neben { padding: 26px 28px; }
.pk-aktion-neben { border-left: 1px solid var(--pk-linie); }
.pk-aktion h2 { font-size: 24px; margin: 0 0 8px; }
.pk-aktion h3 { font-size: 16px; margin: 0 0 10px; }
.pk-aktion p { margin: 0 0 18px; line-height: 1.6; max-width: 46ch; }
.pk-raumliste { list-style: none; margin: 0; padding: 0; }
.pk-raumliste li { border-top: 1px solid var(--pk-linie); }
.pk-raumliste li:first-child { border-top: 0; }
.pk-raumliste a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: inherit; text-decoration: none; }
.pk-raumliste a:hover { text-decoration: underline; }

.pk-konditionen { margin: 0 0 40px; padding: 18px 28px; border: 1px solid var(--pk-linie); border-left: 4px solid var(--pk-akzent); background: var(--pk-flaeche); }
.pk-konditionen h2 { font-size: 16px; margin: 0 0 6px; }
.pk-konditionen ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.pk-rabatt { font-weight: 650; margin: 0 0 12px; }

/* Zeilen: Rechnung, Termin, vergangene Buchung */
.pk-karten { border: 1px solid var(--pk-linie); background: var(--pk-flaeche); }
.pk-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 24px; padding: 16px 22px; border-top: 1px solid var(--pk-linie); }
.pk-karten > .pk-zeile:first-child { border-top: 0; }
.pk-zeile--termin { border: 1px solid var(--pk-linie); background: var(--pk-flaeche); margin-bottom: 10px; }
.pk-zeile-haupt strong { margin-right: 8px; }
.pk-zeile-haupt .pk-neben { margin-top: 4px; }
.pk-betrag { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.pk-betrag small { display: block; font-weight: 400; font-size: 13px; color: var(--pk-leise); }
.pk-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pk-knoepfe form { margin: 0; }
.pk-hinweis { margin: 14px 0 0; padding: 14px 22px; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); font-size: 15px; line-height: 1.6; }
.pk-hinweis p { margin: 0; }

/* Serie in der Übersicht */
.pk-serie { border: 1px solid var(--pk-linie); background: var(--pk-flaeche); margin-bottom: 10px; }
.pk-serie > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 16px 22px; cursor: pointer; list-style: none; }
.pk-serie > summary::-webkit-details-marker { display: none; }
.pk-serie-titel { display: flex; flex-wrap: wrap; gap: 2px 0; align-items: baseline; }
.pk-serie-titel span::before { content: "·"; margin: 0 8px; color: var(--pk-leise); }
.pk-serie-neben { grid-column: 1; font-size: 14px; color: var(--pk-leise); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pk-serie-auf { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; text-decoration: underline; white-space: nowrap; }
.pk-serie[open] .pk-serie-auf { visibility: hidden; }
.pk-serie--offen { border-left: 4px solid var(--warn, #b7791f); }
.pk-termine { list-style: none; margin: 0; padding: 0 22px; border-top: 1px solid var(--pk-linie); }
.pk-termine li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--pk-linie); font-variant-numeric: tabular-nums; }
.pk-termine li:first-child { border-top: 0; }
.pk-termine--spalten { padding: 0; border-top: 0; columns: 3 190px; column-gap: 28px; }
.pk-termine--spalten li { break-inside: avoid; border-top: 0; padding: 4px 0; justify-content: flex-start; }
.pk-termine--spalten li.ist-aktuell { font-weight: 700; }
.pk-serie-fuss { margin: 0; padding: 12px 22px 16px; font-size: 14px; }
.pk-detail .pk-serie-fuss { padding: 10px 0 0; }

.pk-alt { margin: 0 0 40px; }
.pk-alt > summary { cursor: pointer; font-size: 17px; padding: 12px 0; }
.pk-alt .pk-karten { margin-top: 8px; }
.pk-seiten { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 16px; font-size: 15px; }

/* Hinweis mit Handlung (Zahlung offen, Termine nicht buchbar) */
.pk-zahlhinweis { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin: 0 0 20px; padding: 16px 22px; border: 1px solid var(--pk-linie); border-left: 4px solid var(--warn, #b7791f); background: var(--pk-flaeche); }
.pk-zahlhinweis p { margin: 0; line-height: 1.6; max-width: 62ch; }
.pk-serie .pk-zahlhinweis { margin: 0; border-width: 1px 0 0 0; }
.pk-detail .pk-zahlhinweis { margin: 20px 0 0; }
.pk-zahlhinweis--gross { padding: 22px 26px; }
.pk-uebersprungen { margin: 0 0 20px; padding: 18px 22px; border: 1px solid var(--pk-linie); border-left: 4px solid var(--danger, #b3261e); background: var(--pk-flaeche); }
.pk-uebersprungen h2 { font-size: 18px; margin: 0 0 6px; }
.pk-uebersprungen p { margin: 0 0 8px; }
.pk-uebersprungen ul { margin: 0; padding-left: 20px; line-height: 1.7; }

/* Tabellen: Rechnungen, Terminlisten. Auf dem Handy als Karten. */
.pk-tabelle { width: 100%; border-collapse: collapse; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); margin: 0 0 12px; font-size: 15px; }
.pk-tabelle th, .pk-tabelle td { padding: 13px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--pk-linie); }
.pk-tabelle thead th { border-top: 0; font-size: 13px; font-weight: 650; color: var(--pk-leise); }
.pk-tabelle .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-tabelle tfoot th { font-size: 16px; }
.pk-tabelle-knoepfe { text-align: right; white-space: nowrap; }
.pk-tabelle-knoepfe form { display: inline-block; margin: 0 6px 0 0; }
.pk-tabelle tr.ist-gesperrt td { color: var(--pk-leise); }
.pk-tabelle tr.ist-gesperrt td:nth-child(2) label, .pk-tabelle tr.ist-gesperrt td:first-child { text-decoration: none; }
.pk-haken { width: 1%; }
.pk-haken input { width: 20px; height: 20px; }
.pk-tabelle label { cursor: pointer; }
.pk-tabelle .sros-badge { vertical-align: 1px; }

/* Buchungsdetail */
.pk-detail-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.pk-detail-kopf h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); }
.pk-positionen tfoot th, .pk-positionen tfoot td { padding: 12px 14px; text-align: left; border-top: 1px solid var(--pk-linie); }
.pk-positionen tfoot .num { text-align: right; }
.pk-rabattzeile td { font-weight: 650; }
.pk-detail .pk-karten { border-width: 1px 0; }
.pk-detail .pk-zeile { padding-inline: 0; }

/* Formulare */
.pk-formular { max-width: 860px; }
.pk-formular .sros-btn { margin-top: 8px; }
.pk-schmal { flex: 0 0 150px !important; }
.pk-gruppe { border: 0; border-top: 1px solid var(--pk-linie); margin: 22px 0 0; padding: 20px 0 0; min-width: 0; }
.pk-gruppe > legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-size: 20px; font-weight: 650; }
.pk-gruppe > legend + * { clear: both; }
.pk-wahl { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.pk-wahl .sros-check { margin-bottom: 6px; font-size: 16px; }
.pk-zwischen { font-size: 16px; margin: 18px 0 6px; }
.pk-storno { line-height: 1.6; }

.pk-schritte { display: flex; gap: 0; list-style: none; margin: 0 0 24px; padding: 0; counter-reset: schritt; font-size: 14px; color: var(--pk-leise); }
.pk-schritte li { counter-increment: schritt; padding: 0 22px 8px 0; margin-right: 22px; border-bottom: 2px solid var(--pk-linie); }
.pk-schritte li::before { content: counter(schritt) ". "; }
.pk-schritte li[aria-current] { color: inherit; font-weight: 650; border-bottom-color: currentColor; }

.pk-raumwahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 18px; max-width: 860px; }
.pk-raumwahl a { display: block; padding: 14px 18px; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); color: inherit; text-decoration: none; }
.pk-raumwahl a span { display: block; font-size: 14px; color: var(--pk-leise); }
.pk-raumwahl a[aria-current] { border-color: var(--pk-akzent); box-shadow: inset 0 0 0 1px var(--pk-akzent); }
.pk-raumwahl a:hover { border-color: var(--pk-akzent); }

/* Terminart: drei Reiter. Ohne :has() bleiben alle drei Bereiche sichtbar. */
.pk-reiter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pk-reiter label { cursor: pointer; }
.pk-reiter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pk-reiter span { display: inline-block; padding: 9px 16px; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); }
.pk-reiter input:checked + span { border-color: var(--pk-akzent); background: var(--pk-akzent); color: var(--t-on-accent, #fff); }
.pk-reiter input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }
.pk-feld-art { border: 1px solid var(--pk-linie); padding: 16px 18px; margin: 0 0 12px; }
.pk-feld-art h3 { font-size: 16px; margin: 0 0 12px; }
@supports selector(:has(*)) {
  .pk-terminart .pk-feld-art { display: none; }
  .pk-terminart .pk-feld-art h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pk-terminart:has(#art-regel:checked) .pk-feld-art[data-art="regel"],
  .pk-terminart:has(#art-monat:checked) .pk-feld-art[data-art="monat"],
  .pk-terminart:has(#art-liste:checked) .pk-feld-art[data-art="liste"] { display: block; }
}
.pk-ende { display: grid; grid-template-columns: auto minmax(0, 220px); gap: 8px 16px; align-items: center; margin: 4px 0 8px; }
.pk-ende .sros-check { margin: 0; font-size: 16px; }
.pk-zahl { max-width: 110px; }
.pk-tage { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; margin: 0 0 12px; }

.pk-vorschau .pk-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.pk-abschluss { max-width: 640px; margin: 0 auto; }
.pk-abschluss .sros-check { font-size: 16px; }
.pk-weiter { margin-top: 20px; }
.pk-weiter ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.8; }

@media (max-width: 760px) {
  .sr-portal-bar { margin-bottom: 22px; }
  .sr-portal-tabs { gap: 4px 18px; }
  .sr-portal-tabs a { padding: 6px 0; }
  .pk-aktion { grid-template-columns: 1fr; }
  .pk-aktion-haupt, .pk-aktion-neben { padding: 20px 18px; }
  .pk-aktion-neben { border-left: 0; border-top: 1px solid var(--pk-linie); }
  .pk-aktion .sros-btn { width: 100%; justify-content: center; text-align: center; }
  .pk-konditionen { padding: 16px 18px; }
  .pk-zeile { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .pk-zeile .pk-knoepfe { grid-column: 1 / -1; }
  .pk-serie > summary { grid-template-columns: 1fr; padding: 14px 16px; }
  .pk-serie-auf { grid-column: 1; grid-row: auto; }
  .pk-termine { padding: 0 16px; }
  .pk-serie-fuss { padding: 12px 16px 14px; }
  .pk-zahlhinweis { padding: 14px 16px; }
  .pk-vorschau .pk-spalten { grid-template-columns: 1fr; }
  .pk-schmal { flex: 1 1 auto !important; }
  .pk-ende { grid-template-columns: 1fr; }
  .pk-schritte li { padding-right: 12px; margin-right: 12px; }

  /* Tabellen als Karten */
  .pk-tabelle, .pk-tabelle tbody, .pk-tabelle tfoot, .pk-tabelle tr, .pk-tabelle td, .pk-tabelle th { display: block; }
  .pk-tabelle { border: 0; background: none; }
  .pk-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pk-tabelle tbody tr { position: relative; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); margin-bottom: 10px; padding: 10px 14px; }
  .pk-tabelle td { border: 0; padding: 4px 0; text-align: left !important; }
  .pk-tabelle td[data-titel]::before { content: attr(data-titel) ": "; color: var(--pk-leise); font-size: 13px; }
  .pk-tabelle td.pk-haken { position: absolute; top: 10px; right: 12px; width: auto; }
  .pk-tabelle td.pk-haken input { width: 26px; height: 26px; }
  .pk-tabelle--termine td:nth-child(2) { padding-right: 44px; font-weight: 650; }
  .pk-tabelle--termine td[data-titel]:nth-child(2)::before { content: none; }
  .pk-tabelle-knoepfe { white-space: normal; padding-top: 8px !important; display: flex !important; flex-wrap: wrap; gap: 8px; }
  .pk-tabelle-knoepfe form { margin: 0; }
  .pk-tabelle tfoot tr { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--pk-linie); background: var(--pk-flaeche); padding: 12px 14px; }
  .pk-tabelle tfoot th { border: 0; padding: 0; }
  .pk-tabelle tfoot th:empty { display: none; }
}

/* Nachträge nach der Sichtprüfung */
.sr-portal .sros-badge { font-size: 12px; padding: 4px 8px; }
.pk-positionen { width: 100%; border-collapse: collapse; font-size: 15px; }
.pk-positionen td { padding: 10px 0; border-top: 1px solid var(--pk-linie); vertical-align: top; }
.pk-positionen tbody tr:first-child td { border-top: 0; }
.pk-positionen .num { text-align: right; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.pk-positionen tfoot th, .pk-positionen tfoot td { padding: 12px 0; }
.pk-vorschau .pk-spalten > * { min-width: 0; margin: 0; }
@media (max-width: 760px) {
  .pk-serie-titel { display: block; }
  .pk-serie-titel span { display: block; }
  .pk-serie-titel span::before { content: none; }
}
