/* Termine. Gerüst, Band, Filterfelder, Knöpfe und Hinweise kommen aus gemeinsam/rahmen.css.
   Hier steht nur, was es auf dieser Seite allein gibt: Zeitstrahl, Karte und Tabelle.
   Farbe steht nie allein: jede Art hat eine eigene Form, eine eigene Spur und einen Namen. */

/* Farbe je Art. Die Rollenfarben gibt es hell und dunkel in farben.css. */
.tm-art-format       { --c: var(--rolle-netz); }
.tm-art-festlegung   { --c: var(--rolle-wmsb); }
.tm-art-gesetz       { --c: var(--rolle-lieferant); }
.tm-art-frist        { --c: var(--akzent); }
.tm-art-konsultation { --c: var(--rolle-betreiber); }
.tm-art-feiertag     { --c: var(--text-still); }
.tm-art-news         { --c: var(--marke); }

.tm-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.tm-blaettern { display: flex; gap: 8px; }
.tm-ansicht { margin-bottom: 8px; }
.tm-status { margin-top: 8px; }
.tm-symbol path { fill: var(--c); stroke: var(--tinte); stroke-width: 1; }
.tm-symbol.tm-art-news path { fill: var(--grund); stroke: var(--marke); stroke-width: 1; }

/* ---------- Zeitstrahl ---------- */
.tm-strahl { position: relative; border: 1px solid var(--linie); border-radius: 8px; background: var(--grund); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.tm-strahl svg { display: block; max-width: none; }

.tm-gitter line { stroke: var(--linie); stroke-width: 1; }
.tm-gitter .tm-jahr { stroke: var(--linie-stark); }
.tm-achse { font: 400 15px/1 var(--schrift); fill: var(--text-still); paint-order: stroke; stroke: var(--grund); stroke-width: 4px; stroke-linejoin: round; }
.tm-trenner { stroke: var(--linie-stark); stroke-width: 1; }
.tm-spurname { font: 600 15px/1 var(--schrift); fill: var(--tinte); }
.tm-spur > .tm-marke { fill: var(--c); stroke: var(--tinte); stroke-width: 1; }
.tm-leer { font: 400 15px var(--schrift); fill: var(--text-still); }

.tm-knoten { cursor: pointer; outline: none; }
.tm-treffer { fill: transparent; stroke: none; }
.tm-knoten:hover .tm-treffer { fill: var(--raster); }
.tm-knoten:focus-visible .tm-treffer { fill: var(--raster); stroke: var(--marke); stroke-width: 2; }
.tm-marke { fill: var(--c); stroke: var(--tinte); stroke-width: 1; }
.tm-auto .tm-marke { fill: var(--grund); stroke: var(--marke); stroke-width: 1; }
.tm-balken { fill: var(--c); fill-opacity: .3; stroke: var(--c); stroke-width: 1; }
.tm-auto .tm-balken { stroke-dasharray: 4 3; }
.tm-bund { fill: var(--grund); stroke: var(--tinte); stroke-width: 1; }
.tm-zahl { font: 600 15px/1 var(--schrift); fill: var(--tinte); }
.tm-label { font: 400 15px/1 var(--schrift); fill: var(--text); }
.tm-vorbei .tm-marke { fill-opacity: .4; stroke-opacity: .7; }
.tm-vorbei .tm-balken { fill-opacity: .12; }
.tm-vorbei .tm-label { fill: var(--text-still); }
.tm-ring { fill: none; stroke: var(--tinte); stroke-width: 1; }
.tm-gewaehlt .tm-label { font-weight: 600; }

.tm-heute-linie { stroke: var(--marke); stroke-width: 2; }
.tm-heute-feld { fill: var(--marke); }
.tm-heute-text { font: 600 15px/1 var(--schrift); fill: var(--auf-akzent); }

/* ---------- Karte ---------- */
.tm-karte { margin-top: 16px; padding: 24px; border: 1px solid var(--linie-stark); border-radius: 8px; background: var(--grund); }
.tm-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.tm-karte-symbol { display: inline-flex; }
.tm-karte-datum { font-size: 17px; font-weight: 600; }
.tm-karte-abstand { margin-left: auto; font-size: 15px; color: var(--text-still); }
.tm-karte-titel { margin: 8px 0 4px; font-size: 22px; line-height: 1.3; text-wrap: balance; }
.tm-karte-meta { margin-bottom: 8px; font-size: 15px; color: var(--text-still); }
.tm-karte-text { max-width: 66ch; }
.tm-karte-text .satz + .satz { margin-top: 4px; }
.tm-fund, .tm-betrifft { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 8px; font-size: 17px; }
.tm-fund-etikett { min-width: 6em; font-size: 15px; font-weight: 600; color: var(--text-still); }
.tm-fund-hinweis, .tm-fund-extern { font-size: 15px; color: var(--text-still); }
.tm-karte-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tm-klein { margin-top: 8px; }
.tm-bundelliste { margin: 8px 0 0; }
.tm-bundelliste li { border-top: 1px solid var(--linie); }
.tm-bundelliste li:first-child { border-top: 0; }
.tm-datum { font-variant-numeric: tabular-nums; }

.tm-eintrag-knopf {
  display: inline; padding: 4px 0; border: 0; background: none;
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--linie-stark); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.tm-eintrag-knopf:hover, .tm-eintrag-knopf:focus-visible { text-decoration-color: var(--marke-text); }

/* ---------- Liste als Tabelle ---------- */
.tm-monat-block { margin-top: 24px; }
.tm-monat-titel { margin-bottom: 8px; font-size: 19px; line-height: 1.35; }
.tm-tabelle { width: 100%; border-collapse: collapse; }
.tm-zeile > * { padding: 12px 16px 12px 0; border-top: 1px solid var(--linie); vertical-align: top; text-align: left; }
.tm-zeile:last-child > * { border-bottom: 1px solid var(--linie); }
.tm-zeile-datum { width: 11em; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-zeile-titel { font-size: 17px; line-height: 1.4; }
.tm-zeile-text { margin-top: 4px; max-width: 66ch; font-size: 15px; color: var(--text-still); }
.tm-zeile-meta { width: 16em; font-size: 15px; color: var(--text-still); }
.tm-zeile-meta span { display: block; }
.tm-gewaehlt-zeile > * { background: var(--marke-zart); padding-left: 8px; }
.tm-vergangen { margin-top: 16px; }
.tm-vergangen > summary { padding: 8px 0; font-weight: 600; color: var(--text-still); cursor: pointer; }
.tm-vergangen > summary:hover { color: var(--text); }
.tm-leer-text { padding: 16px 0; color: var(--text-still); }

@media (max-width: 720px) {
  .tm-karte-abstand { margin-left: 0; }
  .tm-tabelle, .tm-tabelle tbody { display: block; width: 100%; }
  .tm-zeile { display: block; padding: 12px 0; border-top: 1px solid var(--linie); }
  .tm-zeile:last-child { border-bottom: 1px solid var(--linie); }
  .tm-zeile > * { display: block; width: auto; padding: 0; border: 0; }
  .tm-zeile:last-child > * { border-bottom: 0; }
  .tm-zeile-datum { white-space: normal; font-size: 15px; color: var(--text-still); margin-bottom: 4px; }
  .tm-zeile-meta { margin-top: 6px; }
  .tm-zeile-meta span { display: inline; }
  .tm-zeile-meta span + span::before { content: " · "; }
  .tm-gewaehlt-zeile { background: var(--marke-zart); padding-left: 8px; padding-right: 8px; }
  .tm-gewaehlt-zeile > * { background: transparent; padding-left: 0; }
}
@media print { .tm-blaettern, .tm-karte-leiste, #ics-alle { display: none; } }
