/* =========================================================
   Termine – Zusatz-Stile der öffentlichen Seiten (/termine …)
   Wird vom Modul als /termine/stil.css?v=<hash> ausgeliefert, weil
   site.css (Kern) nur tokens + base + public enthält. Grundlage sind
   .event-row, .date-block, .mcal, .facts … aus public.css.
   Kern-Wunsch: Modul-CSS für öffentliche Seiten in site.css bündeln.
   ========================================================= */

/* ---------- Absage, Reihe (wie Prototyp termine.css) ---------- */
.termine-cancel-badge {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .85rem;
  color: #fff; background: var(--danger); border-radius: 999px; padding: 2px 11px; white-space: nowrap;
}
.termine-series-tag {
  display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; font-weight: 700; color: var(--info);
  background: var(--info-soft); border-radius: 999px; padding: 2px 11px;
  /* lange Regeln („Jeden letzten Dienstag im Monat (April bis …)“) dürfen auf dem Handy umbrechen */
  white-space: normal; max-width: 100%; overflow-wrap: anywhere;
}
.termine-row--cancelled .event-row__title s { text-decoration-thickness: 2px; text-decoration-color: var(--danger); }
.event-row.termine-row--cancelled { background: #fdf7f7; border-color: #f1c9c9; }
.event-row.termine-row--cancelled .date-block { background: var(--surface-2); border-color: var(--border); }
.event-row.termine-row--cancelled .date-block__day { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.termine-cancel-reason { margin: -2px 0 8px; color: var(--danger); font-weight: 700; font-size: .97rem; }
.termine-day-note { margin: -2px 0 8px; color: var(--info); font-weight: 700; font-size: .97rem; }
.mcal__ev.termine-mev--cancelled { background: #fdf2f2; border-left-color: var(--danger); }
.mcal__ev.termine-mev--cancelled s { text-decoration-color: var(--danger); }

/* ---------- Detailseite ---------- */
.termine-struck s { text-decoration-thickness: 3px; text-decoration-color: var(--danger); }
.termine-cancel-banner {
  display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 18px; padding: 16px 18px;
  background: var(--danger-soft); color: var(--danger); border: 2px solid var(--danger); border-radius: var(--radius);
}
.termine-cancel-banner strong { font-size: 1.15em; }
.termine-cancel-banner p { margin: 4px 0 0; font-weight: 600; }
.termine-cancel-banner__icon { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; font-weight: 800; }
.termine-day-banner { margin: 4px 0 18px; padding: 14px 18px; background: var(--info-soft); color: var(--info); border-radius: var(--radius); font-weight: 700; }
.termine-series-next a { font-weight: 700; display: inline-block; padding: 12px 2px; }
.event-detail .cluster + .cluster { margin-top: 12px; }
.termine-occurrence-note { color: var(--text-muted); margin: 0 0 12px; }

/* ---------- Bedienleiste: Links statt Knöpfe (ohne JavaScript) ---------- */
.segmented a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 800; text-decoration: none; color: var(--text);
}
.segmented a[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow-1); color: var(--brand-strong); }
.termine-chips a.chip { text-decoration: none; color: var(--text); }
.termine-chips a.chip[aria-current="true"] { background: var(--ink-black); color: #fff; border-color: var(--ink-black); }
.termine-chips a.chip[aria-current="true"] .chip__dot { box-shadow: 0 0 0 2px #fff; }
/* Sprungleiste (Regelmäßige Treffen, Jahresprogramm, Programm wie auf der bisherigen Website):
   Symbol + Text, Klickfläche ≥ 48 px, bricht auf dem Handy (390 px) um statt überzulaufen */
.termine-jump { font-weight: 700; font-size: max(1.125rem, var(--fs-pub)); list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.termine-jump li { max-width: 100%; }
.termine-jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; max-width: 100%; overflow-wrap: anywhere; }

/* ---------- Regelmäßige Treffen ---------- */
.termine-regular { margin-top: 40px; }
.termine-regular__icon {
  width: 68px; min-height: 60px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--info-soft); border-radius: 12px;
}
.termine-regular__next { margin: -2px 0 8px; font-size: .97rem; }
@media (max-width: 520px) { .termine-regular__icon { width: 52px; } }

/* ---------- Monatsansicht: Reihen unter dem Raster nur einmal (UX 15) ---------- */
.termine-month-series__title { margin-top: 28px; }
.termine-month-series__dates { margin: -2px 0 8px; line-height: 1.7; }
.termine-month-series__lead { font-weight: 800; }
.termine-month-series__day { white-space: nowrap; }
.termine-month-series__day.is-cancelled s { text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.termine-month-series__out { color: var(--danger); font-weight: 700; white-space: normal; }
.termine-month-series__changed { color: var(--info); font-weight: 700; white-space: normal; }
.termine-month-series__text { margin: -2px 0 8px; }

/* ---------- Monatsansicht als Tabelle ---------- */
.mcal-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; }
.mcal-table th { padding: 6px 0; }
.mcal-table abbr { text-decoration: none; }
.mcal-table__td { vertical-align: top; padding: 0; }
.mcal-table__td .mcal__cell { height: 100%; }
.mcal-table__td--empty { background: transparent; }
@media (max-width: 640px) { .mcal-table { border-spacing: 2px; margin: 0 -2px; } }

/* ---------- Abo ---------- */
.termine-abo__q { font-weight: 800; margin: 0 0 8px; }
.termine-abo .abo-url code { overflow-wrap: anywhere; }
.termine-abo__choice { margin: 0; }
.termine-abo__delay { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-s); padding: 12px 14px; font-weight: 700; }
.termine-abo__https a { overflow-wrap: anywhere; }

/* ---------- Jahresprogramm ---------- */
.termine-yp__controls { display: grid; gap: 12px; margin-bottom: 24px; }
.termine-yp__month { break-inside: avoid; page-break-inside: avoid; }
.termine-yp__month + .termine-yp__month { margin-top: 28px; }
.termine-yp__month h2 { font-family: var(--font-serif); font-size: 1.35rem; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.termine-yp { width: 100%; border-collapse: collapse; font-size: 1rem; }
.termine-yp th, .termine-yp td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.termine-yp th { font-size: .9rem; color: var(--text-muted); font-weight: 800; }
.termine-yp td:first-child { font-weight: 700; }
/* Datum/Uhrzeit nur ab Tablet-Breite ohne Umbruch – auf dem Handy (Zeilen als Raster) darf die Regel
   einer Reihe („Jeden Donnerstag (Januar, Februar, …)“) umbrechen, sonst läuft die Seite seitlich über */
@media (min-width: 641px) {
  .termine-yp td:first-child, .termine-yp td:nth-child(2) { white-space: nowrap; }
}
.termine-yp .cat { white-space: nowrap; }
.termine-yp tr.is-cancelled td { color: var(--text-muted); }
.termine-yp tr.is-cancelled s { text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.termine-yp__cancel { color: var(--danger); font-weight: 800; }
.termine-yp__foot { margin-top: 28px; color: var(--text-muted); font-size: .95rem; }
.termine-print-hint { color: var(--text-muted); margin: 0; }
@media (max-width: 640px) {
  .termine-yp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .termine-yp tr { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .termine-yp td { border: 0; padding: 2px 0; min-width: 0; overflow-wrap: anywhere; }
  .termine-yp td:nth-child(3) { grid-column: 1 / -1; font-weight: 700; }
  .termine-yp td:nth-child(4), .termine-yp td:nth-child(5) { grid-column: 1 / -1; }
}

/* ---------- Drucken ---------- */
@media print {
  .no-print, .cal-controls, .termine-abo, .termine-yp__controls, .edit-fab, .crumbs { display: none !important; }
  .page-hero { padding: 0 0 8px; background: none; color: #000; }
  .page-hero::before { display: none; }
  .page-hero__title { font-size: 20pt; }
  .page-hero__intro { font-size: 11pt; }
  .section { padding: 0; }
  .termine-yp { font-size: 10pt; }
  .termine-yp th, .termine-yp td { padding: 3pt 6pt; border-bottom: .5pt solid #999; }
  .termine-yp__month h2 { font-size: 13pt; margin-top: 10pt; break-after: avoid; page-break-after: avoid; }
  .termine-yp tr { break-inside: avoid; page-break-inside: avoid; }
  .termine-yp .cat { background: none; padding: 0; }
  .termine-yp__foot { font-size: 9pt; }
  a[href]::after { content: none; }
  .event-row { box-shadow: none; break-inside: avoid; }
}
