/* Events · ADTV Tanzschule Hoffmann
   Nur Aufbau. Farben über die Farbbrücke (core/assets/farben.css, --th-*),
   Schrift und Knöpfe von Astra (wp-element-button). Alles, was Stefan im
   Editor einstellt (Farbe, Größe, Abstand), überschreibt diese Werte. */

.tsh-ev-datum {
  margin: 0 0 .35em;
  color: var(--th-red, #bb0a30);
  font-size: .8em;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.4;
}

.tsh-ev-ort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 1em;
}
.tsh-ev-ort__name { font-weight: 800; color: var(--th-text, #1a0008); }
.tsh-ev-ort__adresse { color: var(--th-muted, #75757c); }
.tsh-ev-ort__route { flex-basis: 100%; }
@media (min-width: 600px) {
  .tsh-ev-ort__route { flex-basis: auto; margin-left: auto; }
}

.tsh-ev-kalender {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.5em 0;
}
/* Knöpfe wie core/button — dessen CSS lädt WordPress hier nicht mit */
.tsh-ev-kalender .wp-block-button__link,
.tsh-ev-ort__route .wp-block-button__link { display: inline-block; text-align: center; text-decoration: none; }

/* Status-Badge */
.tsh-ev-status { margin: 0 0 .5em; line-height: 1; }
.tsh-ev-status__badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--th-r-badge, 4px);
  font-size: .75em;
  font-weight: 800;
  letter-spacing: .02em;
}
.tsh-ev-status--warn .tsh-ev-status__badge { background: var(--th-warn-bg); color: var(--th-warn-fg); }
.tsh-ev-status--voll .tsh-ev-status__badge { background: var(--th-full-bg); color: var(--th-full-fg); }

/* Eintritt */
.tsh-ev-preis { margin: 0 0 1em; }
.tsh-ev-preis__label { display: block; font-weight: 800; color: var(--th-text, #1a0008); }
.tsh-ev-preis--zeile .tsh-ev-preis__label,
.tsh-ev-preis--ab .tsh-ev-preis__label { display: inline; margin-right: .4em; }
.tsh-ev-preis__liste { margin: .2em 0 0; padding: 0; list-style: none; }
.tsh-ev-preis__hinweis { display: block; color: var(--th-muted, #75757c); font-size: .9em; }

/* Hinweis auf vergangenen Event-Seiten */
.tsh-ev-vorbei {
  margin: 0 0 1.5em;
  padding: 14px 18px;
  border-left: 3px solid var(--th-red, #bb0a30);
  border-radius: var(--th-r-btn, 6px);
  background: var(--th-bg, #fafafc);
  color: var(--th-text-muted, #3a3a3a);
}
.tsh-ev-vorbei a { font-weight: 800; }

/* Datums-Kachel (Block Event-Datum „Kachel" und Eventkalender) */
.tsh-ev-kachel time,
.tsh-evk__kachel {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 6px 4px;
  border-radius: var(--th-r-btn, 6px);
  background: var(--th-bg, #fafafc);
  color: var(--th-text, #1a0008);
  line-height: 1.1;
  text-align: center;
}
.tsh-ev-kachel span,
.tsh-evk__kachel span { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--th-muted, #75757c); }
.tsh-ev-kachel strong,
.tsh-evk__kachel strong { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }

/* Event-Navigation */
.tsh-ev-nav { margin: 0 0 1.5em; }
.tsh-ev-nav--zurueck a { font-weight: 800; text-decoration: none; }
.tsh-ev-nav--blaettern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--th-border, #e4e4e9);
}
.tsh-ev-nav--blaettern a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.tsh-ev-nav__nachher { text-align: right; grid-column: 2; }
.tsh-ev-nav__datum { font-size: .8em; color: var(--th-muted, #75757c); }
.tsh-ev-nav__titel { font-weight: 800; }

/* ================================================================
   Eventkalender (Block tsh/eventkalender) — mobile first.
   Breiten über Container-Queries: richtet sich nach der Spalte, in der
   der Block steht, nicht nach dem Bildschirm.
   ================================================================ */
.tsh-evk {
  container-type: inline-size;
  --evk-rand: var(--th-border, #e4e4e9);
  --evk-akzent: var(--th-red, #bb0a30);
  --evk-akzent-text: var(--th-bg, #fafafc);
  scroll-margin-top: 96px;
}
.tsh-evk *, .tsh-evk *::before, .tsh-evk *::after { box-sizing: border-box; }
.tsh-evk ul, .tsh-evk ol { margin: 0; padding: 0; list-style: none; }
.tsh-evk__icon { flex-shrink: 0; }

/* Suche + Ansicht. Handy: Suchfeld oben, darunter „Event suchen" | Liste/Monat.
   Ab Tablet-Breite alles in einer Zeile. Das Formular ist „display: contents",
   damit Feld und Knopf direkt im Raster der Werkzeugleiste stehen. */
.tsh-evk__werkzeuge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "feld feld" "knopf ansicht";
  gap: 8px;
  margin: 0 0 12px;
}
.tsh-evk__werkzeuge:not(:has(.tsh-evk__ansicht)) { grid-template-areas: "feld feld" "knopf knopf"; }
.tsh-evk__suche { display: contents; }
.tsh-evk__suchfeld { grid-area: feld; position: relative; display: flex; align-items: center; min-width: 0; }
.tsh-evk__suchfeld .tsh-evk__icon { position: absolute; left: 14px; color: var(--th-muted, #75757c); pointer-events: none; }
.tsh-evk__suchfeld input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 12px 0 44px;
  border: 1px solid var(--evk-rand);
  border-radius: var(--th-r-btn, 6px);
  background: var(--th-surface, #fff);
  color: var(--th-text, #1a0008);
  font: inherit;
  font-size: 16px; /* kein Zoom auf dem iPhone */
  line-height: 1.2;
}
.tsh-evk .tsh-evk__suchknopf {
  grid-area: knopf;
  height: 48px;
  margin: 0;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}
.tsh-evk__ansicht {
  grid-area: ansicht;
  display: flex;
  box-sizing: border-box;
  height: 48px;
  padding: 3px;
  border: 1px solid var(--evk-rand);
  border-radius: var(--th-r-btn, 6px);
  background: var(--th-bg, #fafafc);
}
.tsh-evk__ansicht a {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 4px;
  color: var(--th-text, #1a0008);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.tsh-evk__ansicht a:hover { color: var(--evk-akzent); }
.tsh-evk__ansicht a[aria-current="page"] { background: var(--th-surface, #fff); color: var(--evk-akzent); box-shadow: 0 1px 3px rgba(26, 0, 8, .12); }
.tsh-evk input:focus-visible, .tsh-evk button:focus-visible, .tsh-evk a:focus-visible, .tsh-evk summary:focus-visible {
  outline: 2px solid var(--evk-akzent);
  outline-offset: 2px;
}
/* Während der Kalender per AJAX nachlädt */
.tsh-evk[aria-busy="true"] .tsh-evk__liste,
.tsh-evk[aria-busy="true"] .tsh-evk__raster { opacity: .45; transition: opacity .2s .15s; }

/* Chips: wischbar, mit Ausblendung am rechten Rand */
.tsh-evk__chips {
  margin: 0 -16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
.tsh-evk__chips::-webkit-scrollbar { display: none; }
.tsh-evk__chips ul { display: flex; gap: 8px; width: max-content; padding: 2px 32px 2px 16px; }
.tsh-evk__chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--evk-rand);
  border-radius: var(--th-r-pill, 99px);
  background: var(--th-surface, #fff);
  color: var(--th-text, #1a0008);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tsh-evk__chip:hover { border-color: var(--evk-akzent); color: var(--evk-akzent); }
.tsh-evk__chip[aria-current="true"],
.tsh-evk__chip[aria-current="true"]:hover { border-color: var(--evk-akzent); background: var(--evk-akzent); color: var(--evk-akzent-text); }

/* Monatskalender (Ansicht „Monat") */
.tsh-evk__monat { margin: 8px 0 16px; padding: 12px; border: 1px solid var(--evk-rand); border-radius: var(--th-r-card, 12px); background: var(--th-surface, #fff); }
.tsh-evk__monat-kopf { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.tsh-evk__monat-kopf h2 { margin: 0; font-size: 18px; }
.tsh-evk__monat-nav { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--th-text, #1a0008); }
.tsh-evk__monat-nav:hover { background: var(--th-bg, #fafafc); }
.tsh-evk__monat-nav.is-aus { opacity: .25; }
.tsh-evk__raster { width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; }
.tsh-evk__raster th { padding: 4px 0; border: 0; background: none; color: var(--th-muted, #75757c); font-size: 12px; font-weight: 800; text-align: center; }
.tsh-evk__tag { position: relative; height: 48px; padding: 2px; border: 0; background: none; text-align: center; vertical-align: top; }
.tsh-evk__tag-zahl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--th-text, #1a0008);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
a.tsh-evk__tag-zahl:hover { background: var(--th-bg, #fafafc); }
.tsh-evk__tag.is-nachbar .tsh-evk__tag-zahl,
.tsh-evk__tag.is-vorbei .tsh-evk__tag-zahl { color: var(--th-muted, #75757c); font-weight: 400; }
.tsh-evk__tag.is-heute .tsh-evk__tag-zahl { box-shadow: inset 0 0 0 2px var(--evk-akzent); }
.tsh-evk__tag.is-gewaehlt .tsh-evk__tag-zahl { background: var(--evk-akzent); color: var(--evk-akzent-text); }
/* Handy: Punkt (bzw. Stern bei „Tipp") statt Titel */
.tsh-evk__tag-events { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); }
.tsh-evk__tag-events li { display: none; }
.tsh-evk__tag.hat-events .tsh-evk__tag-events::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--evk-akzent);
}
.tsh-evk__tag.hat-tipp .tsh-evk__tag-events::before { width: 9px; height: 9px; border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.tsh-evk__tag.is-vorbei .tsh-evk__tag-events::before { opacity: .4; }

/* Hinweis „gefiltert" */
.tsh-evk__info { margin: 8px 0 16px; color: var(--th-text-muted, #3a3a3a); font-size: .9em; }
.tsh-evk__info a { font-weight: 800; white-space: nowrap; }

/* Liste */
.tsh-evk__trenner { display: flex; align-items: center; gap: 12px; margin: 28px 0 4px; }
.tsh-evk__trenner:first-child { margin-top: 8px; }
.tsh-evk__trenner h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--th-muted, #75757c); white-space: nowrap; }
.tsh-evk__trenner::after { content: ""; flex: 1; height: 1px; background: var(--evk-rand); }
.tsh-evk__eintrag { border-bottom: 1px solid var(--evk-rand); }
.tsh-evk__event {
  --evk-kachel: 56px;
  --evk-luecke: 16px;
  position: relative;
  display: grid;
  grid-template-columns: var(--evk-kachel) minmax(0, 1fr);
  grid-template-areas: "kachel text";
  gap: 12px var(--evk-luecke);
  padding: 20px 0;
}
.tsh-evk__kachel { grid-area: kachel; align-self: start; }
.tsh-evk__text { grid-area: text; min-width: 0; }
.tsh-evk__bild { grid-area: bild; }
.tsh-evk__bild img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--th-r-img, 8px); }
/* Handy, Bilder groß (Standard, wie Tribe): Flyer über dem Text, Datum bleibt links */
.tsh-evk__event.hat-bild { grid-template-areas: "kachel bild" "kachel text"; }
/* Tipp: Akzentbalken zwischen Datum und Inhalt über die ganze Höhe (wie „Hervorgehoben") */
.tsh-evk__eintrag.is-tipp .tsh-evk__event::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: calc(var(--evk-kachel) + var(--evk-luecke) / 2 - 1.5px);
  width: 3px;
  border-radius: 2px;
  background: var(--evk-akzent);
}
/* Karte: sichtbar Label → Datum/Uhrzeit → Titel → Auszug → Preis · Ort.
   Doppelte Klasse schlägt Astras Abstände für p/h3 im Inhalt. */
.tsh-evk .tsh-evk__text { display: flex; flex-direction: column; align-items: flex-start; }
.tsh-evk .tsh-evk__text > * { margin: 0; }
.tsh-evk .tsh-evk__marken { order: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tsh-evk .tsh-evk__zeit { order: 2; margin-bottom: 4px; color: var(--evk-akzent); font-size: 14px; font-weight: 800; line-height: 1.4; }
.tsh-evk .tsh-evk__titel { order: 3; margin-bottom: 6px; font-size: 20px; line-height: 1.25; }
.tsh-evk .tsh-evk__auszug { order: 4; display: none; margin-bottom: 8px; color: var(--th-text-muted, #3a3a3a); font-size: 16px; line-height: 1.6; }
.tsh-evk.tsh-evk--auszug-mobil .tsh-evk__auszug { display: block; } /* Block-Einstellung „auch auf dem Handy" */
.tsh-evk .tsh-evk__meta { order: 5; color: var(--th-muted, #75757c); font-size: 15px; line-height: 1.5; }
.tsh-evk .tsh-evk__preis { color: var(--th-text, #1a0008); font-weight: 800; }
.tsh-evk__marke { display: inline-block; padding: 3px 8px; border-radius: var(--th-r-badge, 4px); font-size: 12px; font-weight: 800; line-height: 1.3; }
.tsh-evk__marke--warn { background: var(--th-warn-bg); color: var(--th-warn-fg); }
.tsh-evk__marke--voll { background: var(--th-full-bg); color: var(--th-full-fg); }
.tsh-evk__marke--tipp { background: var(--evk-akzent); color: var(--evk-akzent-text); }
.tsh-evk__titel a { color: var(--th-text, #1a0008); text-decoration: none; }
.tsh-evk__titel a::after { content: ""; position: absolute; inset: 0; }
.tsh-evk__event:hover .tsh-evk__titel a { color: var(--evk-akzent); }
.tsh-evk__meta span + span::before { content: " · "; }
.tsh-evk__eintrag.is-abgesagt .tsh-evk__titel a { text-decoration: line-through; color: var(--th-muted, #75757c); }

.tsh-evk__weiter { margin: 32px 0 0; text-align: center; }
.tsh-evk__weiter .wp-element-button { display: inline-block; text-decoration: none; }
.tsh-evk__leer { margin: 24px 0; padding: 24px; border-radius: var(--th-r-card, 12px); background: var(--th-bg, #fafafc); text-align: center; }
.tsh-evk__leer p { margin: 0 0 8px; }
.tsh-evk__zuletzt { margin: 32px 0 0; font-size: 20px; }

/* Fuß: vergangene Events + Abo */
.tsh-evk__fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 0; }
.tsh-evk__archiv { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; text-decoration: none; }
.tsh-evk__abo { position: relative; }
.tsh-evk__abo summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--evk-akzent);
  border-radius: var(--th-r-btn, 6px);
  color: var(--evk-akzent);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}
.tsh-evk__abo summary::-webkit-details-marker { display: none; }
.tsh-evk__abo[open] summary { background: var(--evk-akzent); color: var(--evk-akzent-text); }
.tsh-evk__abo-inhalt {
  margin: 8px 0 0;
  padding: 12px 8px 8px;
  border: 1px solid var(--evk-rand);
  border-radius: var(--th-r-card, 12px);
  background: var(--th-surface, #fff);
  box-shadow: 0 10px 34px rgba(26, 0, 8, .08);
}
.tsh-evk__abo-inhalt p { margin: 0 8px 8px; color: var(--th-text-muted, #3a3a3a); font-size: 14px; line-height: 1.5; }
.tsh-evk__abo li a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: var(--th-r-btn, 6px); font-weight: 700; text-decoration: none; }
.tsh-evk__abo li a:hover { background: var(--th-bg, #fafafc); }

/* Ab Tablet-Breite der Spalte: Tribe-artige Zeile — Kachel | Text | Bild rechts */
@container (min-width: 640px) {
  .tsh-evk__chips { margin-left: 0; margin-right: 0; }
  .tsh-evk__chips ul { padding-left: 0; }
  .tsh-evk__trenner + .tsh-evk__eintrag .tsh-evk__event { padding-top: 20px; }
  .tsh-evk__werkzeuge { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "feld knopf ansicht"; }
  .tsh-evk__werkzeuge:not(:has(.tsh-evk__ansicht)) { grid-template-areas: "feld knopf knopf"; }
  .tsh-evk__event { --evk-kachel: 64px; --evk-luecke: 24px; gap: 0 var(--evk-luecke); padding: 28px 0; }
  .tsh-evk__event.hat-bild { grid-template-columns: var(--evk-kachel) minmax(0, 1fr) clamp(220px, 36%, 340px); grid-template-areas: "kachel text bild"; }
  .tsh-evk__eintrag.is-tipp .tsh-evk__event::before { top: 28px; bottom: 28px; }
  .tsh-evk__kachel { min-width: 64px; }
  .tsh-evk .tsh-evk__titel { font-size: 22px; }
  .tsh-evk .tsh-evk__auszug { display: block; }
  .tsh-evk__abo-inhalt { position: absolute; z-index: 5; right: 0; top: 100%; width: 300px; }
  /* Monatskalender groß: Titel statt Punkte */
  .tsh-evk__monat { padding: 20px; }
  .tsh-evk__tag { height: 104px; padding: 4px; border: 1px solid var(--evk-rand); text-align: left; }
  .tsh-evk__tag-zahl { width: 32px; height: 32px; font-size: 14px; }
  .tsh-evk__tag-events { position: static; transform: none; margin-top: 2px; }
  .tsh-evk__tag.hat-events .tsh-evk__tag-events::before { display: none; }
  .tsh-evk__tag-events li { display: block; overflow: hidden; font-size: 12px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
  .tsh-evk__tag-events li + li { margin-top: 2px; }
  .tsh-evk__tag-events a { color: var(--th-text, #1a0008); text-decoration: none; }
  .tsh-evk__tag-events a:hover { color: var(--evk-akzent); }
  .tsh-evk__tag.is-vorbei .tsh-evk__tag-events { opacity: .5; }
  .tsh-evk__mehr { color: var(--th-muted, #75757c); }
}
