/*
 * Time Calendar – Event-Übersicht (Kartenansicht)
 * ─────────────────────────────────────────────────────────────────
 * Erscheint unterhalb des [time_calendar] Shortcodes wenn
 * "Event-Übersicht anzeigen" in den Plugin-Einstellungen aktiv ist.
 *
 * Alle Farben über var(--tc-*) aus design-system.css.
 * ─────────────────────────────────────────────────────────────────
 */

/* ── Section Header ──────────────────────────────────────────────── */
.tc-event-overview {
  margin-top: 48px;
}

.tc-evlist-header {
  margin-bottom: 24px;
}

.tc-evlist-divider {
  border: none;
  border-top: 1px solid var(--tc-border);
  margin: 0 0 20px;
}

.tc-evlist-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--tc-primary);
  margin: 0;
  line-height: 1.25;
}

/* ── Grid ────────────────────────────────────────────────────────── */
.tc-evlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .tc-evlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tc-evlist-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Karte ───────────────────────────────────────────────────────── */
.tc-evlist-card {
  display: flex;
  flex-direction: column;
  background: var(--tc-bg);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--tc-text);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}

.tc-evlist-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tc-shadow-lg);
  text-decoration: none;
  color: var(--tc-text);
}

/* ── Farbstreifen oben ───────────────────────────────────────────── */
.tc-evlist-stripe {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}

/* ── Card Body ───────────────────────────────────────────────────── */
.tc-evlist-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* ── Kategorie-Badge ─────────────────────────────────────────────── */
.tc-evlist-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  width: fit-content;
}

/* ── Titel ───────────────────────────────────────────────────────── */
.tc-evlist-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tc-text);
  margin: 0;
  line-height: 1.35;
}

/* ── Kurzbeschreibung ────────────────────────────────────────────── */
.tc-evlist-card-desc {
  font-size: 13px;
  color: var(--tc-text-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Terminbereich (gemeinsam) ───────────────────────────────────── */
.tc-evlist-dates {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--tc-border);
}

/* ── Wiederkehrende Events: Wochentag-Badge ──────────────────────── */
.tc-evlist-dates--recurring .tc-evlist-recurring-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--tc-text-muted);
  line-height: 1.5;
}

/* ── Einmalige Events: Datumsliste ───────────────────────────────── */
.tc-evlist-date-inner {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.tc-dates-icon {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.55;
}

.tc-dates-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tc-evlist-date-row {
  font-size: 12px;
  color: var(--tc-text-muted);
  line-height: 1.5;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Optionaler Termin-Titel ─────────────────────────────────────── */
.tc-evlist-date-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-text);
  margin-top: 2px;
  line-height: 1.4;
}

/* ── Versteckte Extratermine ─────────────────────────────────────── */
.tc-date-extra {
  display: none;
}

.tc-evlist-dates.is-expanded .tc-date-extra {
  display: block;
}

/* ── „+ X weitere"-Button ────────────────────────────────────────── */
.tc-dates-more {
  display: inline-block;
  margin-top: 5px;
  margin-left: 19px;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--tc-primary);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}

.tc-dates-more:hover {
  text-decoration: underline;
}

.tc-evlist-dates.is-expanded .tc-dates-more {
  color: var(--tc-text-muted);
}

@media (max-width: 600px) {
  .tc-evlist-date-row {
    white-space: normal;
  }
}

/* ── Meta (Ort, Trainer) ─────────────────────────────────────────── */
.tc-evlist-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.tc-evlist-card-meta span {
  font-size: 12px;
  color: var(--tc-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
