/* =========================================================
   FARB-TOKENS (Brand – mirror, in Produktion ggf. global)
========================================================= */

.termin-section,
.month-groups {
  --termin-buchinger: blue;
  --termin-basenfasten: #ff6c0f;
  --termin-vitalfasten: green;
  --termin-red2: #460f22;
  --termin-zebra: #f5f1e6; /* getönte Zeile */
  --termin-special-bg: #a7d9db; /* Specials auf der vollen Terminseite */
  --termin-special-bg2: #b9e8eb; /* Zweite Zebra-Farbe fuer mehrere Specials */
  --termin-special-bg-hover: cyan;
  --termin-row-bdr: rgba(40, 32, 26, 0.06);
  --termine-date-header-bg: #eadfca; /* Defaultfarbe date-header-row */
}

/* =========================================================
   SIDEBAR / LAYOUT
========================================================= */

#termine {
  padding-bottom: 0px;
}

.layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 6rem;
}

.section-sidebar-left {
  position: sticky;
  top: calc(50vh - 225px);
  width: fit-content;
  background: transparent !important;
}

.termin-section {
  padding-top: 6rem;
}

.content {
  min-width: 0;
}

/* =========================================================
   FILTER-BAR
========================================================= */

.filter-bar {
  position: sticky;
  top: 73px !important;
  z-index: 50;
  background: transparent;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar .inner {
  background: #fff;
  border-radius: 5px;
  padding: 1rem 1rem 0.6rem;
  border: 1px solid var(--border);
}

.filter-bar .year-filter {
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  margin-right: 4px;
}

.filter-btn {
  padding: 0.3rem 0.85rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--main-red-color);
  color: var(--main-red-color);
}

.filter-btn.active-red {
  background: var(--main-red-color);
  border-color: var(--main-red-color);
  color: #fff;
}
.filter-btn.active-all {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #fff;
}

/* =========================================================
   JAHR-TABS
========================================================= */

.year-filter {
  display: flex;
  gap: 8px;
}

.year-tab {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
  margin: 0 auto;
  width: 100%;
}

.year-tab:hover {
  border-color: var(--main-red-color);
  color: var(--main-red-color);
}

.year-tab.active {
  background: var(--main-blue-color);
  border-color: var(--main-blue-color);
  color: #fff;
}

/* =========================================================
   MONATS-FILTER
========================================================= */

.month-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 36px;
}

.month-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.month-btn:hover {
  border-color: var(--main-red-color);
  color: var(--main-red-color);
}

.month-btn.active,
.month-btn.active:hover {
  background: var(--main-red-color);
  border-color: var(--main-red-color);
  color: white;
}

/* =========================================================
   SECTION-HEADER
========================================================= */

.section-header {
  margin-bottom: 8px;
}




.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0 24px;
}

/* =========================================================
   TABELLE
========================================================= */

.month-groups {
  display: block;
}

/* Tabellenkopf bewusst ausblenden, falls er serverseitig noch ausgegeben wird. */
.termin-thead,
.termin-table thead {
  display: none !important;
}

.termin-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(40, 32, 26, 0.04);
}

.termin-thead th {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream2);
}

.termin-thead th.termin-th-action {
  text-align: right;
}

/* Hinweis: Diese Regel blendete den cremefarbenen Spacer NUR im Single-Modus aus.
   Dadurch entstanden weisse Streifen unter den Zeilen (nackte Tabellenzelle).
   Deaktiviert, damit die Trennzeilen im Single-Modus wieder cremefarben sind.
#termine-grid.termine-grid.single.month-groups table.termin-table tbody.month-group tr.date-header-row td span.date-header-spacer {
  display:none !important;
}
*/

/* ---- Monats-Gruppe (tbody) ---- */

.month-group.hidden {
  display: none !important;
}


.month-header-row td {
  padding: 0.85rem 1.3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Cremefarbener Tabellenhintergrund scheint durch (vorher weiss). */
  background: transparent;
	border-bottom: 1px solid black !important;
  margin-bottom: 10px;
}

.month-group:first-of-type .month-header-row td {
  border-top: none;
}

.month-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}


.month-name {
  margin: 0;
  white-space: nowrap;
}

.month-count {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.month-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.month-group.has-month-gap .month-header-row td {
  border-top: 22px solid var(--termine-date-header-bg, #eadfca);
}

/* Tabelle transparent halten, damit leere Trennzeilen den Hintergrund
   von #termine zeigen und nicht den weißen Tabellenhintergrund. */
#termine .termin-table {
  background: transparent;
}

/* ---- Datum-Gruppe innerhalb eines Monats ----
   Leere technische Trennzeile ohne Inhalt.
   Der Hintergrund kommt über --termine-date-header-bg.
   Default ist #eadfca; JS überschreibt nur, wenn #termine selbst eine Farbe hat. */

#termine .date-header-row,
#termine .date-header-row:hover,
#termine .date-header-row td {
  background: var(--termine-date-header-bg, #eadfca) !important;
  background-color: var(--termine-date-header-bg, #eadfca) !important;
  border: none !important;
  box-shadow: none !important;
}

.date-header-row td {
  height: 10px;
  padding: 0 !important;
  line-height: 0;
  font-size: 0;
}

.month-header-row + .date-header-row td {
  height: 6px;
}

/* ---- Datenzeile + Zebra ---- */

.termin-row {
  background: #fff;
  border-bottom: 1px solid var(--termin-row-bdr);
  transition: background 0.12s;
}

.termin-row.is-zebra {
  /* jede zweite Datenzeile getönt */
  background: var(--termin-zebra);
}

.termin-row:last-child {
  border-bottom: none;
}

.termin-row:hover {
  background: var(--cream2);
}

.termin-cell {
  padding: 1rem 1.3rem;
  vertical-align: middle;
  font-size: 0.86rem;
  color: var(--charcoal);
}

/* ---- Farbiger Akzentbalken links (je Fastenart) ---- */

.termin-cell-datum {
  border-left: 10px solid transparent;
  padding-left: 1.5rem;
}

.termin-row.buchinger .termin-cell-datum {
  border-left-color: var(--termin-buchinger);
}
.termin-row.basenfasten .termin-cell-datum {
  border-left-color: var(--termin-basenfasten);
}
.termin-row.vitalfasten .termin-cell-datum {
  border-left-color: var(--termin-vitalfasten);
}

/* ---- Datum / Ort ---- */



.termin-datum {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--charcoal);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.15s,
    color 0.15s;
}

a.termin-datum:hover {
  color: var(--main-red-color);
  border-bottom-color: var(--main-red-color);
}

.termin-ort {
  font-size: 16px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ---- Fastenart-Badge ---- */

.termin-badge {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.34rem 0.7rem;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: middle;
}

.termin-badge.buchinger {
  background: var(--termin-buchinger);
}
.termin-badge.basenfasten {
  background: var(--termin-basenfasten);
}
.termin-badge.vitalfasten {
  background: var(--termin-vitalfasten);
}
.termin-badge.unknown {
  background: #000;
}

/* ---- Workshop-Tag ---- */



.termin-workshop-tag {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  margin-left: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a5c3a;
  background: rgba(122, 92, 58, 0.08);
  border: 1px solid rgba(122, 92, 58, 0.22);
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: middle;
}

a.termin-badge:hover,
a.termin-badge:focus {
  color: #fff;
  text-decoration: none;
  filter: brightness(0.95);
}

a.termin-workshop-tag:hover,
a.termin-workshop-tag:focus {
  color: #7a5c3a;
  text-decoration: none;
  background: rgba(122, 92, 58, 0.14);
  border-color: rgba(122, 92, 58, 0.34);
}

/* =========================================================
   Seminar- und Workshop-Bezeichnungen als klickbare Labels
========================================================= */

.termin-cell-type {
  /* Ohne Workshop soll die Tabellenzelle normal bleiben. */
  display: revert;
}

.termin-cell-type.has-workshop {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.termin-cell-type.no-workshop {
  display: revert;
}

.termin-cell-type.no-workshop .termin-workshop-tag,
.termin-workshop-tag.no-display {
  display: none !important;
}

.termin-seminar-link,
.termin-workshop-tag {
  max-width: 100%;
}

.termin-seminar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.25;
  color: #6d1a34;
}

.termin-badge-prefix,
.termin-workshop-prefix {
  font-weight: 700;
  white-space: nowrap;
}

.termin-seminar-title,
.termin-badge-title,
.termin-workshop-title {
  white-space: normal;
}

.termin-workshop-tag {
  gap: 0.35rem;
  text-transform: none;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.termin-workshop-title {
  font-style: italic;
}

@media (max-width: 720px) {
  .termin-cell-type {
    display: flex;
    align-items: flex-start;
  }

  .termin-cell-type.has-workshop {
    flex-wrap: wrap;
  }

  .termin-seminar-link,
  .termin-workshop-tag {
    width: 100%;
    justify-content: flex-start;
  }

  .termin-cell-type.no-workshop .termin-workshop-tag,
  .termin-workshop-tag.no-display {
    display: none !important;
  }
}

/* ---- Leitung (Fotos + Namen) ---- */

.termin-cell-leader .user-wrapper {
  display: flex;
  gap: 3px;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.termin-cell-leader .user-wrapper .image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.termin-cell-leader .img-user {
  width: 65px;
  height: 65px;
  min-width: 65px;
  min-height: 65px;
  max-width: none;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--border);
}

.termin-cell-leader .label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ---- Aktion / Buchen ---- */

.termin-cell-action {
  text-align: right;
  white-space: nowrap;
}

.termin-book {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--main-blue-color);
  border: 1px solid var(--main-blue-color);
  padding: 0.6rem 1.05rem;
  border-radius: 3px;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}

.termin-book::after {
  content: "\2192";
  transition: transform 0.15s;
}

.termin-book:hover {
  background: white;
  color: var(--main-blue-color);
}

.termin-book:hover::after {
  transform: translateX(3px);
}

/* ---- Anderswo ---- */

.termin-row.anderswo .termin-ort {
  color: var(--charcoal);
}

/* =========================================================
   STATUS / NO RESULTS
========================================================= */

.no-results {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
  font-size: 16px;
  display: none;
}

.no-results.visible {
  display: block;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .section-sidebar-left {
    position: static;
  }
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 0.8rem 1.5rem;
    gap: 0.8rem;
  }
}

/* Tabelle -> Karten-Stapel auf Mobil */
@media (max-width: 720px) {
  .termin-thead {
    display: none;
  }

  .termin-table,
  .termin-table tbody {
    display: block;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .month-group {
    display: block;
    margin-bottom: 1.5rem;
  }

  .month-header-row {
    display: block;
  }
  .month-header-row td {
    display: block;
    padding: 0.4rem 0;
    background: none;
    border: none;
  }
  .month-line {
    display: none;
  }

  .month-group.has-month-gap .month-header-row td {
    border-top: none;
    padding-top: 1.4rem;
  }

  .date-header-row {
    display: block;
    margin: 0;
  }

  .date-header-row td {
    display: block;
    height: 8px;
    padding: 0 !important;
    background: var(--termine-date-header-bg, #eadfca) !important;
    background-color: var(--termine-date-header-bg, #eadfca) !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 0;
    font-size: 0;
  }

  .month-header-row + .date-header-row td {
    height: 4px;
  }



  .termin-row {
    display: block;
    background: #fff !important; /* keine Zebra-Tönung in Karten */
    border: 1px solid black;
    border-left: 10px solid var(--border);
    border-radius: 3px;
    padding: 0.9rem 1rem;
    margin-bottom: 12px;
  }

  .termin-row.buchinger {
    border-left-color: var(--termin-buchinger);
  }
  .termin-row.basenfasten {
    border-left-color: var(--termin-basenfasten);
  }
  .termin-row.vitalfasten {
    border-left-color: var(--termin-vitalfasten);
  }

  .termin-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border: none;
  }

  .termin-cell::before {
    content: attr(data-label);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
  }

  .termin-cell-datum {
    border-left: none;
    padding-left: 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.4rem;
  }
  .termin-cell-datum::before {
    display: none;
  }

  .termin-cell-leader .user-wrapper {
    justify-content: flex-end;
  }

  .termin-cell-action {
    justify-content: stretch;
  }
  .termin-cell-action::before {
    display: none;
  }

  .termin-book {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
  }
}

/* Mobile Terminseite: alle Termine des aktiven Jahres untereinander anzeigen. */
@media (max-width: 720px) {
  #month-filter,
  .filter-group.month-filter {
    display: none !important;
  }

  .filter-bar {
    margin-bottom: 18px;
  }

  .year-filter {
    display: flex;
    gap: 8px;
  }

  .year-tab {
    min-height: 40px;
  }
}

/* =========================================================
   FIX: date-header-row darf nicht weiß werden
   Muss am Dateiende stehen, damit Theme-/Tabellen-Regeln überschrieben werden.
========================================================= */

#termine {
  --termine-date-header-bg: #eadfca;
}

#termine .termin-table,
#termine .termin-table tbody,
#termine .termin-table .month-group {
  background: transparent !important;
  background-color: transparent !important;
}

#termine .termin-table tr.date-header-row,
#termine .termin-table tr.date-header-row:hover,
#termine .termin-table tr.date-header-row > td,
#termine .termin-table tr.date-header-row:hover > td {
  background: #eadfca !important;
  background-color: #eadfca !important;
  border: none !important;
  box-shadow: none !important;
}

#termine .termin-table tr.date-header-row > td {
  height: 10px;
  padding: 0 !important;
  line-height: 0;
  font-size: 0;
}

#termine .termin-table .month-header-row + tr.date-header-row > td {
  height: 6px;
}

#termine .termin-table tr.date-header-row > td::before,
#termine .termin-table tr.date-header-row > td::after {
  display: none !important;
  content: "" !important;
}

/* =========================================================
   FINAL-FIX: date-header-row darf niemals weiß durchscheinen
   Ursache ist oft die Tabellen-/Zellenfläche, nicht nur die TR.
   Deshalb werden Tabelle, TR, TD und Pseudo-Spacer abgesichert.
========================================================= */

html body #termine {
  --termine-date-header-bg: #eadfca;
}

html body #termine .termin-table {
  background: #eadfca !important;
  background-color: #eadfca !important;
}

html body #termine .termin-table tbody.month-group,
html body #termine .termin-table tr.date-header-row,
html body #termine .termin-table tr.date-header-row:hover,
html body #termine .termin-table tr.date-header-row > td,
html body #termine .termin-table tr.date-header-row:hover > td {
  background: #eadfca !important;
  background-image: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

html body #termine .termin-table tr.date-header-row > td {
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

html body #termine .termin-table tr.date-header-row > td::before {
  content: "" !important;
  display: block !important;
  height: 10px !important;
  width: 100% !important;
  background: #eadfca !important;
  background-color: #eadfca !important;
  background-image: none !important;
}

html
  body
  #termine
  .termin-table
  .month-header-row
  + tr.date-header-row
  > td::before {
  height: 6px !important;
}

html body #termine .termin-table tr.date-header-row > td::after {
  display: none !important;
  content: "" !important;
}

/* =========================================================
   FINAL-FIX 2: date-header-row fest auf #eadfca
   Nicht mehr über var(), weil die Variable auf der Live-Seite
   offenbar wieder weiß gesetzt/überschrieben wird.
========================================================= */

.date-header-row,
.date-header-row:hover,
.date-header-row > td,
.date-header-row:hover > td,
#termine .date-header-row,
#termine .date-header-row:hover,
#termine .date-header-row > td,
#termine .date-header-row:hover > td,
#termine .termin-table tr.date-header-row,
#termine .termin-table tr.date-header-row:hover,
#termine .termin-table tr.date-header-row > td,
#termine .termin-table tr.date-header-row:hover > td {
  background: #eadfca !important;
  background-color: #eadfca !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}

.date-header-row > td,
#termine .date-header-row > td,
#termine .termin-table tr.date-header-row > td {
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  empty-cells: show !important;
}

.date-header-row .date-header-spacer,
#termine .date-header-row .date-header-spacer,
#termine .termin-table tr.date-header-row .date-header-spacer {
  display: block !important;
  width: 100% !important;
  height: 10px !important;
  background: #eadfca !important;
  background-color: #eadfca !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.month-header-row + .date-header-row .date-header-spacer,
#termine .month-header-row + .date-header-row .date-header-spacer,
#termine
  .termin-table
  .month-header-row
  + tr.date-header-row
  .date-header-spacer {
  height: 6px !important;
}

/* =========================================================
   FINAL-FIX 3: Ort-Spalte entfernt, Seminar vollständig anzeigen
========================================================= */

/* Die Ort-Spalte wird serverseitig aus termin.inc.html entfernt.
   Falls noch alte HTML-Zeilen im Cache liegen, wird sie zusätzlich ausgeblendet. */
.termine-grid.single .termin-cell-ort {
  display: none !important;
}

.termine-grid.single .termin-cell-type {
  min-width: 280px;
  max-width: 100%;
}

.termine-grid.single .termin-seminar-link {
  text-transform: none;
  letter-spacing: 0.03em;
  white-space: normal;
}

.termine-grid.single .termin-seminar-title,
.termine-grid.single .termin-badge-title {
  white-space: normal;
  text-transform: none;
  letter-spacing: 0.03em;
}

.termine-grid.single .termin-workshop-tag.no-display {
  display: none !important;
}

.termine-grid.single .termin-workshop-tag {
  white-space: normal;
}

@media (max-width: 720px) {
  .termine-grid.single .termin-cell-ort {
    display: none !important;
  }

  .termine-grid.single .termin-cell-type {
    min-width: 0;
  }
}

/* =========================================================
   FINAL-FIX 4: Seminarbezeichnung aus ##DESCRIPTION## anzeigen
   Grundlage: alter PHP-Source füllt ##DESCRIPTION## aus actitityDesc.
========================================================= */

.termine-grid.single .termin-cell-type {
  min-width: 360px;
  max-width: 100%;
  align-items: flex-start;
}

.termine-grid.single .termin-seminar-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 100%;
  white-space: normal;
  text-transform: none;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.termine-grid.single .termin-badge-prefix,
.termine-grid.single .termin-workshop-prefix {
  flex: 0 0 auto;
  white-space: nowrap;
}

.termine-grid.single .termin-seminar-title,
.termine-grid.single .termin-badge-title,
.termine-grid.single .termin-workshop-title {
  white-space: normal;
  text-transform: none;
  letter-spacing: 0.03em;
}

.termine-grid.single .termin-workshop-tag {
  display: inline-flex;
  align-items: flex-start;
  max-width: 100%;
  white-space: normal;
  text-transform: none;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.termin-workshop-tag {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-left: 0;
  padding: 0.62rem 0.72rem;
  border-radius: 8px;
  background: rgba(122, 92, 58, 0.1);
  border: 1px solid rgba(122, 92, 58, 0.22);
  border-left: 4px solid #7a5c3a;
  white-space: normal;
}

.termin-workshop-prefix {
  display: none !important;
}


.termin-workshop-title {
  flex: 1 1 auto;
  font-style: normal;
  color: #5d452b;
}

.termine-grid.single .termin-workshop-tag.no-display {
  display: none !important;
}

@media (max-width: 1100px) {
  .termine-grid.single .termin-cell-type {
    min-width: 280px;
  }
}

@media (max-width: 720px) {
  .termine-grid.single .termin-cell-type {
    min-width: 0;
    width: 100%;
  }

  .termine-grid.single .termin-seminar-link,
  .termine-grid.single .termin-workshop-tag {
    width: 100%;
  }
}

/* =========================================================
   FINAL-FIX 5: Seminarbezeichnung ohne Badge und ohne Wort „Seminar"
========================================================= */

.termine-grid.single .termin-cell-type {
  gap: 12px;
}



.termin-seminar-link,
.termine-grid.single .termin-seminar-link.termin-badge {
  display: inline-flex;
  align-items: flex-start;
  max-width: 100%;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #6d1a34;
  font-size: 20px;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: normal !important;
  line-height: 1.35;
  text-transform: none !important;
  text-decoration: none;
  filter: none !important;
  white-space: normal;
}

.termin-seminar-link:hover,
.termin-seminar-link:focus {
  background: transparent !important;
  color: var(--main-blue-color, var(--main-red-color)) !important;
  text-decoration: underline;
  filter: none !important;
}

.termine-grid.single .termin-badge-prefix {
  display: none !important;
}

.termine-grid.single .termin-seminar-title,
.termine-grid.single .termin-badge-title {
  display: inline;
  white-space: normal;
  color: inherit;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: normal !important;
  text-transform: none !important;
}

@media (max-width: 720px) {
  .termine-grid.single .termin-seminar-link,
  .termine-grid.single .termin-seminar-link.termin-badge {
    width: 100%;
  }
}

/* =========================================================
   Special-Badge in der Datumszelle, nur volle Terminseite
========================================================= */

.termine-grid.full .special-header-row {
  display: none !important;
}

.termine-grid.full .termin-cell-datum {
  white-space: normal;
}

.termine-grid.full .termin-cell-datum .termin-datum {
  display: inline-block;
}

.termine-grid.full .termin-special-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0.38rem auto 0;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: #7a5c3a;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
}

.termine-grid.single .termin-special-badge {
  display: none !important;
}

@media (max-width: 720px) {
  .termine-grid.full .termin-row.is-special .termin-cell-datum {
    align-items: center;
    gap: 10px;
  }

  .termine-grid.full .termin-special-badge {
    flex: 0 0 auto;
    margin: 0.38rem auto 0;
  }
}

/* =========================================================
   Specials nur auf der vollen Terminseite hervorheben
========================================================= */

.termine-grid.full .termin-row.is-special > .termin-cell {
  background: var(--termin-special-bg, #fff3df) !important;
}

.termine-grid.full .termin-row.is-special:hover > .termin-cell {
  background: var(--termin-special-bg-hover, #ffe8c7) !important;
}

.termine-grid.full .termin-row.is-special .termin-seminar-link {
  font-weight: 700;
}

@media (max-width: 720px) {
  .termine-grid.full .termin-row.is-special {
    background: var(--termin-special-bg, #fff3df) !important;
    border-color: rgba(122, 92, 58, 0.35);
  }

  .termine-grid.full .termin-row.is-special > .termin-cell {
    background: transparent !important;
  }
}

/* =========================================================
   SINGLE-GRID: Specials nicht farblich hervorheben
   Grundlage: Kursseiten laufen über .termine-grid.single.
========================================================= */

.termine-grid.single .termin-special-badge {
  display: none !important;
}

.termine-grid.single .termin-row.is-special,
.termine-grid.single .termin-row.is-special:hover {
  background: #fff !important;
}

.termine-grid.single .termin-row.is-special > .termin-cell,
.termine-grid.single .termin-row.is-special:hover > .termin-cell {
  background: transparent !important;
}

.termine-grid.single .termin-row.is-special.is-zebra {
  background: var(--termin-zebra) !important;
}

@media (max-width: 720px) {
  .termine-grid.single .termin-row.is-special,
  .termine-grid.single .termin-row.is-special:hover {
    background: #fff !important;
    border-color: var(--border) !important;
  }

  .termine-grid.single .termin-row.is-special > .termin-cell,
  .termine-grid.single .termin-row.is-special:hover > .termin-cell {
    background: transparent !important;
  }
}

/* =========================================================
   FINAL-FIX 6: Special-Badge nur bei FULL, bei SINGLE ausblenden
   Deckt beide Schreibweisen ab: .termine-grid und .termin-grid.
========================================================= */

#termine-grid.full .termin-cell-datum,
.termine-grid.full .termin-cell-datum,
.termin-grid.full .termin-cell-datum {
  white-space: normal !important;
}

#termine-grid.full .termin-cell-datum .termin-datum,
.termine-grid.full .termin-cell-datum .termin-datum,
.termin-grid.full .termin-cell-datum .termin-datum {
  display: block !important;
}

#termine-grid.full .termin-special-badge,
.termine-grid.full .termin-special-badge,
.termin-grid.full .termin-special-badge {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0.38rem auto 0;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: #7a5c3a;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
}

#termine-grid.single .termin-special-badge,
.termine-grid.single .termin-special-badge,
.termin-grid.single .termin-special-badge,
#termine .single .termin-special-badge,
.kurs-section .termin-special-badge {
  display: none !important;
  visibility: hidden !important;
}

#termine-grid.single .termin-row.is-special,
#termine-grid.single .termin-row.is-special:hover,
.termine-grid.single .termin-row.is-special,
.termine-grid.single .termin-row.is-special:hover,
.termin-grid.single .termin-row.is-special,
.termin-grid.single .termin-row.is-special:hover {
  background: #fff !important;
}

#termine-grid.single .termin-row.is-special > .termin-cell,
#termine-grid.single .termin-row.is-special:hover > .termin-cell,
.termine-grid.single .termin-row.is-special > .termin-cell,
.termine-grid.single .termin-row.is-special:hover > .termin-cell,
.termin-grid.single .termin-row.is-special > .termin-cell,
.termin-grid.single .termin-row.is-special:hover > .termin-cell {
  background: transparent !important;
}

#termine-grid.single .termin-row.is-special.is-zebra,
.termine-grid.single .termin-row.is-special.is-zebra,
.termin-grid.single .termin-row.is-special.is-zebra {
  background: var(--termin-zebra) !important;
}

@media (max-width: 720px) {
  #termine-grid.full .termin-special-badge,
  .termine-grid.full .termin-special-badge,
  .termin-grid.full .termin-special-badge {
    flex: 0 0 auto;
    margin: 0.38rem auto 0;
  }

  #termine-grid.single .termin-special-badge,
  .termine-grid.single .termin-special-badge,
  .termin-grid.single .termin-special-badge,
  #termine .single .termin-special-badge,
  .kurs-section .termin-special-badge {
    display: none !important;
    visibility: hidden !important;
  }
}

/* =========================================================
   Datums-Kopfzeile vor jeder Gruppe – nur volle Terminseite
   Fuellt die bisher leere .date-header-row mit dem Zeitraum.
   Single-Modus bleibt unveraendert (leerer Trennbalken).
========================================================= */

.termine-grid.full .date-header-row--date td {
  height: auto !important;
  padding: 0.65rem 1.5rem 0.4rem !important;
  line-height: 1.2 !important;
  font-size: inherit !important;
}

.termine-grid.full .month-header-row + .date-header-row--date td {
  height: auto !important;
}

.termine-grid.full .date-header-date {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
}

/* Sicherheitshalber: im Single-Modus nie eine Datums-Beschriftung zeigen. */
.termine-grid.single .date-header-date {
  display: none !important;
}

/* =========================================================
   Single-Modus haerten:
   - keine Datums-Kopfzeile (auf leeren Trenner zuruecksetzen)
   - keine Special-Faerbung (zur Sicherheit erneut neutralisiert)
========================================================= */

.termine-grid.single .date-header-row--date td {
  height: 10px !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.termine-grid.single .date-header-date {
  display: none !important;
}

.termine-grid.single .termin-row.is-special,
.termine-grid.single .termin-row.is-special:hover,
.termine-grid.single .termin-row.is-special > .termin-cell,
.termine-grid.single .termin-row.is-special:hover > .termin-cell {
  background: transparent !important;
}

.termine-grid.single .termin-row.is-special.is-zebra {
  background: var(--termin-zebra) !important;
}

/* =========================================================
   Trennzeile zwischen Datumsgruppen:
   - Single-Modus: komplett entfernen (kein .date-header-spacer,
     keine Hoehe, keine weisse/creme Flaeche)
   - Full-Modus: bleibt sichtbar (Datumszeile bzw. Spacer)
========================================================= */

html body #termine .termine-grid.single .termin-table tr.date-header-row,
html body #termine .termine-grid.single .termin-table tr.date-header-row > td {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

html
  body
  #termine
  .termine-grid.single
  .termin-table
  tr.date-header-row
  > td::before,
html
  body
  #termine
  .termine-grid.single
  .termin-table
  tr.date-header-row
  > td::after {
  display: none !important;
  content: none !important;
  height: 0 !important;
}

html
  body
  #termine
  .termine-grid.single
  .termin-table
  tr.date-header-row
  .date-header-spacer {
  display: none !important;
}

/* =========================================================
   Special-Zebra (nur Full-Modus):
   mehrere Specials wechseln zwischen #A7D9DB und #B9E8EB
========================================================= */

.termine-grid.full .termin-row.is-special.is-special-alt > .termin-cell {
  background: var(--termin-special-bg2, #b9e8eb) !important;
}

.termine-grid.full .termin-row.is-special.is-special-alt:hover > .termin-cell {
  background: var(--termin-special-bg-hover, #ffe8c7) !important;
}

@media (max-width: 720px) {
  .termine-grid.full .termin-row.is-special.is-special-alt {
    background: var(--termin-special-bg2, #b9e8eb) !important;
  }

  .termine-grid.full .termin-row.is-special.is-special-alt > .termin-cell {
    background: transparent !important;
  }
}

/* =========================================================
   FINAL-FIX 7: Special-Zebra nur im Full-Modus
   Nutzt die vorhandene .is-zebra-Klasse als zweite Special-Farbe.
   .is-special-alt bleibt als Fallback erhalten, falls sie serverseitig gesetzt wird.
========================================================= */

#termine-grid.full
  .termin-row.is-special:not(.is-zebra):not(.is-special-alt)
  > .termin-cell,
.termine-grid.full
  .termin-row.is-special:not(.is-zebra):not(.is-special-alt)
  > .termin-cell,
.termin-grid.full
  .termin-row.is-special:not(.is-zebra):not(.is-special-alt)
  > .termin-cell {
  background: var(--termin-special-bg, #a7d9db) !important;
}

#termine-grid.full .termin-row.is-special.is-zebra > .termin-cell,
#termine-grid.full .termin-row.is-special.is-special-alt > .termin-cell,
.termine-grid.full .termin-row.is-special.is-zebra > .termin-cell,
.termine-grid.full .termin-row.is-special.is-special-alt > .termin-cell,
.termin-grid.full .termin-row.is-special.is-zebra > .termin-cell,
.termin-grid.full .termin-row.is-special.is-special-alt > .termin-cell {
  background: var(--termin-special-bg2, #b9e8eb) !important;
}

#termine-grid.full .termin-row.is-special:hover > .termin-cell,
.termine-grid.full .termin-row.is-special:hover > .termin-cell,
.termin-grid.full .termin-row.is-special:hover > .termin-cell,
#termine-grid.full .termin-row.is-special.is-zebra:hover > .termin-cell,
#termine-grid.full .termin-row.is-special.is-special-alt:hover > .termin-cell,
.termine-grid.full .termin-row.is-special.is-zebra:hover > .termin-cell,
.termine-grid.full .termin-row.is-special.is-special-alt:hover > .termin-cell,
.termin-grid.full .termin-row.is-special.is-zebra:hover > .termin-cell,
.termin-grid.full .termin-row.is-special.is-special-alt:hover > .termin-cell {
  background: var(--termin-special-bg-hover, #ffe8c7) !important;
}

/* Single-Modus bleibt bewusst neutral: keine Special-Faerbung. */
#termine-grid.single .termin-row.is-special,
.termine-grid.single .termin-row.is-special,
.termin-grid.single .termin-row.is-special {
  background: #fff !important;
}

#termine-grid.single .termin-row.is-special.is-zebra,
.termine-grid.single .termin-row.is-special.is-zebra,
.termin-grid.single .termin-row.is-special.is-zebra {
  background: var(--termin-zebra) !important;
}

#termine-grid.single .termin-row.is-special > .termin-cell,
#termine-grid.single .termin-row.is-special:hover > .termin-cell,
.termine-grid.single .termin-row.is-special > .termin-cell,
.termine-grid.single .termin-row.is-special:hover > .termin-cell,
.termin-grid.single .termin-row.is-special > .termin-cell,
.termin-grid.single .termin-row.is-special:hover > .termin-cell {
  background: transparent !important;
}

@media (max-width: 720px) {
  #termine-grid.full .termin-row.is-special:not(.is-zebra):not(.is-special-alt),
  .termine-grid.full .termin-row.is-special:not(.is-zebra):not(.is-special-alt),
  .termin-grid.full .termin-row.is-special:not(.is-zebra):not(.is-special-alt) {
    background: var(--termin-special-bg, #a7d9db) !important;
  }

  #termine-grid.full .termin-row.is-special.is-zebra,
  #termine-grid.full .termin-row.is-special.is-special-alt,
  .termine-grid.full .termin-row.is-special.is-zebra,
  .termine-grid.full .termin-row.is-special.is-special-alt,
  .termin-grid.full .termin-row.is-special.is-zebra,
  .termin-grid.full .termin-row.is-special.is-special-alt {
    background: var(--termin-special-bg2, #b9e8eb) !important;
  }

  #termine-grid.full .termin-row.is-special > .termin-cell,
  .termine-grid.full .termin-row.is-special > .termin-cell,
  .termin-grid.full .termin-row.is-special > .termin-cell {
    background: transparent !important;
  }

  #termine-grid.single .termin-row.is-special,
  .termine-grid.single .termin-row.is-special,
  .termin-grid.single .termin-row.is-special {
    background: #fff !important;
    border-color: var(--border) !important;
  }

  #termine-grid.single .termin-row.is-special.is-zebra,
  .termine-grid.single .termin-row.is-special.is-zebra,
  .termin-grid.single .termin-row.is-special.is-zebra {
    background: #fff !important;
  }

  #termine-grid.single .termin-row.is-special > .termin-cell,
  .termine-grid.single .termin-row.is-special > .termin-cell,
  .termin-grid.single .termin-row.is-special > .termin-cell {
    background: transparent !important;
  }
}

/* =========================================================
   FINAL-FIX 8: 5px Abstand zwischen Tabellenzeilen
   margin-bottom wirkt bei echten <tr>-Elementen nicht zuverlässig.
   Deshalb wird der Abstand über border-spacing erzeugt.
========================================================= */

#termine-grid.full .termin-table,
.termine-grid.full .termin-table,
.termin-grid.full .termin-table {
  border-collapse: separate !important;
  border-spacing: 0 5px !important;
}

#termine-grid.full .termin-row,
.termine-grid.full .termin-row,
.termin-grid.full .termin-row {
  margin-bottom: 5px;
}

@media (max-width: 720px) {
  #termine-grid.full .termin-table,
  .termine-grid.full .termin-table,
  .termin-grid.full .termin-table {
    border-spacing: 0 !important;
  }

  #termine-grid.full .termin-row,
  .termine-grid.full .termin-row,
  .termin-grid.full .termin-row {
    margin-bottom: 5px !important;
  }
}

/* =========================================================
   FINAL-FIX 9: 5px Abstand auch im Single-Modus
   Der Abstand entsteht ueber border-spacing. Die Tabellenflaeche
   bleibt transparent, damit im Zwischenraum der Hintergrund von
   #termine sichtbar ist und nicht Weiss oder die Tabellenfarbe.
========================================================= */

html body #termine #termine-grid.full .termin-table,
html body #termine #termine-grid.single .termin-table,
html body #termine .termine-grid.full .termin-table,
html body #termine .termine-grid.single .termin-table,
html body #termine .termin-grid.full .termin-table,
html body #termine .termin-grid.single .termin-table {
  border-collapse: separate !important;
  border-spacing: 0 5px !important;
  background: transparent !important;
  background-color: transparent !important;
}

html body #termine #termine-grid.full .termin-row,
html body #termine #termine-grid.single .termin-row,
html body #termine .termine-grid.full .termin-row,
html body #termine .termine-grid.single .termin-row,
html body #termine .termin-grid.full .termin-row,
html body #termine .termin-grid.single .termin-row {
  margin-bottom: 5px;
}

/* Unsichtbare Datums-Trenner im Single-Modus duerfen keinen Zusatzabstand erzeugen. */
html body #termine #termine-grid.single .termin-table tr.date-header-row,
html body #termine .termine-grid.single .termin-table tr.date-header-row,
html body #termine .termin-grid.single .termin-table tr.date-header-row {
  display: none !important;
}

/* Linkfarbe fuer Termin-Links */
#termine .termin-link,
#termine a.termin-link,
.termin-link,
a.termin-link {
  color: #6d1a34 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

#termine .termin-link:hover,
#termine .termin-link:focus,
#termine a.termin-link:hover,
#termine a.termin-link:focus,
.termin-link:hover,
.termin-link:focus,
a.termin-link:hover,
a.termin-link:focus {
  color: #6d1a34 !important;
  text-decoration: underline !important;
}

@media (max-width: 720px) {
  html body #termine #termine-grid.full .termin-table,
  html body #termine #termine-grid.single .termin-table,
  html body #termine .termine-grid.full .termin-table,
  html body #termine .termine-grid.single .termin-table,
  html body #termine .termin-grid.full .termin-table,
  html body #termine .termin-grid.single .termin-table {
    border-spacing: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    width: 90%;
    margin: 0 auto;
  }


  html body #termine #termine-grid.full .termin-row,
  html body #termine #termine-grid.single .termin-row,
  html body #termine .termine-grid.full .termin-row,
  html body #termine .termine-grid.single .termin-row,
  html body #termine .termin-grid.full .termin-row,
  html body #termine .termin-grid.single .termin-row {
    margin-bottom: 10px !important;
  }

  .section-sidebar-left {
    display: none !important;
  }

  .layout {
    padding: 0px !important;
  }
}

/* =========================================================
   MOBILE JAHR-TABS 1.09
   Eigene Jahr-Auswahl, weil die linke Sidebar mobil ausgeblendet wird.
========================================================= */

.termin-year-tabs--mobile {
  display: none;
}

.year-tab-control {
  align-items: stretch;
}

.year-tab[role="tab"] {
  -webkit-tap-highlight-color: transparent;
}

.year-tab[role="tab"]:focus-visible {
  outline: 2px solid var(--main-blue-color);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  
  html body #termine .termin-table tbody.month-group,
  html body #termine .termin-table tr.date-header-row,
  html body #termine .termin-table tr.date-header-row:hover,
  html body #termine .termin-table tr.date-header-row > td,
  html body #termine .termin-table tr.date-header-row:hover > td {
    background: white !important;
  }
  
  
  .termin-year-tabs--mobile {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.35rem;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(40, 32, 26, 0.06);
    font-size: 20px;
    font-weight: 300;
  }


  .termin-year-tabs--mobile .year-tab {
    flex: 1 1 0;
    width: auto;
    min-height: 42px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.02em;
  }

  .termin-year-tabs--mobile .year-tab.active {
    background: var(--main-blue-color);
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  }
}

/* =========================================================
   Mobile: Datum mit Jahr + Avatare in der Datumszelle
   Version 1.13
========================================================= */

.termin-datum--mobile,
.termin-date-leader-mobile {
  display: none;
}

@media (max-width: 720px) {
  .termin-datum--desktop {
    display: none !important;
  }

  .termin-datum--mobile {
    display: inline-block;
    font-weight: 700;
  }

  .termin-cell-datum {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .termin-date-leader-mobile {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
  }

  .termin-cell-leader {
    display: none !important;
  }


  .termin-date-leader-mobile .image {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    width: auto;
    max-width: 80px;
    margin-left: 0;
    gap: 4px;
    float: left;
  }

  .termin-date-leader-mobile .img-user,
  .termin-date-leader-mobile .image img {
    display: block;
    width: 65px;
    height: 65px;
    min-width: 65px;
    min-height: 65px;
    max-width: none;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 2px solid var(--border);
  }

  .termin-date-leader-mobile .image + .image {
    margin-left: 4px;
  }

  .termin-date-leader-mobile .label {
    display: block !important;
    max-width: 80px;
    font-size: 0.6rem;
    line-height: 1.15;
    font-weight: 500;
    color: var(--muted);
    text-align: center;
    white-space: normal;
  }

  .termin-cell-type::before {
    display: none !important;
  }

  .termin-cell-type.has-workshop {
    gap: 8px;
  }

  .termin-cell-type.has-workshop .termin-seminar-link {
    margin-bottom: 2px;
  }
}

/* =========================================================
   Jahr im Datumsfeld – immer sichtbar, zweizeilig unter dem Zeitraum
   Beispiel:
       08.08 - 15.08
               2026
   Version 1.14
========================================================= */

.termin-datum {
  display: inline-block;
}

.termin-datum-year {
  display: block;
  text-align: center;
  margin-top: 2px;
  font-size: 0.82em;
  font-weight: 400;
  line-height: 1.1;
  color: var(--muted);
}

/* =========================================================
   Desktop (Kursseiten/single): Datumsspalte auf Inhaltsbreite
   schrumpfen, damit die Leitungsspalte mehr Platz bekommt und
   die Avatare nicht gestaucht werden.
   Version 1.14
========================================================= */

@media (min-width: 721px) {
  .termine-grid.single .termin-cell-datum {
    width: 1px;
    white-space: nowrap;
  }
}

/* =========================================================
   Abstand nach Datumswechsel innerhalb eines Monats
   Version 1.13
========================================================= */

html
  body
  #termine
  #termine-grid.full
  .termin-table
  tr.date-header-row--gap
  > td,
html
  body
  #termine
  .termine-grid.full
  .termin-table
  tr.date-header-row--gap
  > td {
  padding-top: 16px !important;
}

html
  body
  #termine
  #termine-grid.full
  .termin-table
  tr.date-header-row--gap
  .date-header-date,
html
  body
  #termine
  .termine-grid.full
  .termin-table
  tr.date-header-row--gap
  .date-header-date {
  margin-top: 6px;
}

@media (max-width: 720px) {
  html
    body
    #termine
    #termine-grid.full
    .termin-table
    tr.date-header-row--gap
    > td,
  html
    body
    #termine
    .termine-grid.full
    .termin-table
    tr.date-header-row--gap
    > td {
    padding-top: 20px !important;
  }
}

/* =========================================================
   MOBILE: Monats-Akkordion (Version 1.15)
   Nur volle Terminseite, <=720px.
   - Trigger: .month-header (Monats-Kopfzeile)
   - Body:    uebrige Zeilen der .month-group
   - Sichtbarkeit ueber .is-open; Desktop ignoriert .is-open.
   - Standard: alle zu. Mehrere gleichzeitig offen moeglich.
   - Optik "Variante A — Karte": Kopfzeile als weisse Karte,
     Bordeaux-Titel, Kupfer-Pill, Kupfer-Chevron; die harte
     schwarze Trennlinie ist ueberschrieben.
========================================================= */

/* Chevron auf dem Desktop ausblenden (dort kein Akkordion). */
.month-chevron {
  display: none;
}

@media (max-width: 720px) {
  /* Kopfzeile als anklickbarer Trigger */
  .month-group .month-header {
    cursor: pointer;
    gap: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .month-group .month-header:focus-visible {
    outline: 2px solid var(--main-red-color, #6d1a34);
    outline-offset: 3px;
    border-radius: 2px;
  }

  /* Chevron-Indikator (CSS-only, dependency-frei) */
  .month-chevron {
    display: block;
    margin-left: auto; /* nach rechts, da .month-line mobil ausgeblendet ist */
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-right: 2px;
    border-right: 2px solid #c17a52;
    border-bottom: 2px solid #c17a52;
    transform: rotate(45deg); /* zeigt nach unten = zugeklappt */
    transition: transform 0.25s ease;
  }

  .month-group.is-open .month-chevron {
    transform: rotate(-135deg); /* zeigt nach oben = aufgeklappt */
  }

  /* Body einklappen: alle Zeilen ausser der Kopfzeile verbergen,
     solange die Gruppe nicht .is-open ist. */
  .month-group:not(.is-open) .date-header-row,
  .month-group:not(.is-open) .termin-row {
    display: none !important;
  }

  /* --- Optik "Variante A — Karte" --- */

  /* Abstand zwischen den Monatskarten */
  .month-group {
    margin-bottom: 12px;
  }

  /* Monats-Kopfzeile = weisse, abgerundete Karte.
     Das !important ueberschreibt die harte schwarze Linie
     (border-bottom: 1px solid black !important) aus dem Desktop-Block. */

  .month-group .month-header-row td {
    background: #f2f2f2 !important;
    border: 1px solid #e4d8bf !important;
    border-radius: 12px;
    padding: 14px 16px !important;
  }

  /* Beim Aufklappen etwas Luft zwischen Kopf-Karte und Terminen */
  .month-group.is-open .month-header-row td {
    margin-bottom: 10px;
  }

  /* Doppelten Abstand aus der alten has-month-gap-Regel neutralisieren */
  .month-group.has-month-gap .month-header-row td {
    padding-top: 14px !important;
  }

  /* Monatsname in Bordeaux */


  .month-group .month-name {
		font-family: var(--sans);
    font-weight: normal !important;
    font-size: 18px !important;
    color: #6d1a34;
  }

  /* Termin-Anzahl als dezentes Kupfer-Pill, gemischte Schreibweise */
  .month-group .month-count {
    color: #a5613c;
    background: #f3e7d7;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }
}
