/*
 * File: cmp-alltime.css
 * Munich Musicians DB - Competition (CMP_) Alltime Charts (User 2026-09-05)
 * Typografie/Buttons kommen aus base.css/forms.css/theme.css - hier NUR Nicht-
 * Typografisches: Werkzeugleiste, Modus-Pillen (pub-toggle-Muster des Event Managers),
 * Tabelle (volle Breite, kompakte Schrift, Scroll-Wrapper), Act-Karte mit Foto.
 * Farben ausschliesslich ueber var(--mmdb-*).
 */

.cmp-alltime-page { max-width: 960px; margin: 0 auto; }
/* Zurueck-Knopf wie auf den Detailseiten (.artist-detail-page 20px oben, Nav 18px unten) */
.cmp-alltime-nav { margin: 20px 0 18px; }

/* Werkzeugleiste: Pillen links, Suche rechts; bricht auf schmalen Geraeten um */
.cmp-alltime-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 18px;
}
.cmp-alltime-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-alltime-page .pub-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border: 2px solid var(--mmdb-line);
  background: var(--mmdb-card);
  border-radius: 8px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--mmdb-ink-soft);
  text-decoration: none;
  transition: all 0.2s;
}
.cmp-alltime-page .pub-toggle-btn:hover { border-color: var(--mmdb-accent); color: var(--mmdb-accent-deep); }
.cmp-alltime-page .pub-toggle-btn.active {
  background: var(--mmdb-accent-fill); border-color: var(--mmdb-accent-fill); color: var(--mmdb-card);
}
.cmp-alltime-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cmp-alltime-search input[type="search"] { min-width: 200px; flex: 1 1 200px; }

.cmp-alltime-heading { margin: 0 0 10px; font-size: 1.05rem; }

/* Tabelle: volle Breite + dynamische Spalten + Scroll-Wrapper (Konvention) */
.cmp-alltime-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.cmp-alltime-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cmp-alltime-table th, .cmp-alltime-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--mmdb-line); vertical-align: middle;
}
.cmp-alltime-table thead th {
  background: var(--mmdb-card-sub); font-weight: bold; border-bottom: 2px solid var(--mmdb-line-input);
  white-space: nowrap;
}
.cmp-alltime-table tbody tr:hover td { background: var(--mmdb-card-hover); }
.cmp-alltime-table .col-pos, .cmp-alltime-table .col-place, .cmp-alltime-table .col-num {
  width: 1%; white-space: nowrap;
}
.cmp-alltime-table .col-pos { font-weight: bold; color: var(--mmdb-accent-deep); }
.cmp-alltime-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.cmp-alltime-table .col-num.is-active { font-weight: bold; }
.cmp-alltime-table .col-occ { color: var(--mmdb-ink-soft); }
.cmp-alltime-table .col-date { color: var(--mmdb-ink-soft); white-space: nowrap; width: 1%; }

/* Act-Karte: Foto + fetter Name (Muster der Slam-Listen) */
.cmp-alltime-act { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cmp-alltime-photo {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: var(--mmdb-card-sub); border: 1px solid var(--mmdb-line);
}
.cmp-alltime-photo-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.cmp-alltime-name { font-weight: 600; }

.cmp-alltime-help { margin: 8px 0 0; }

@media (max-width: 600px) {
  .cmp-alltime-page .pub-toggle-btn { padding: 7px 12px; font-size: 0.82rem; }
  .cmp-alltime-search { width: 100%; }
  .cmp-alltime-search input[type="search"] { min-width: 0; }
}

/* ====================================================================
 *  Detail eines Abends (User 2026-09-06)
 *  Das Podium ist die GETEILTE Komponente cmp-podium.css (dasselbe Markup wie
 *  auf der Event-Detailseite). Hier steht nur, was diese Seite zusaetzlich hat.
 * ==================================================================== */

/* Die ganze ZEILE ist die Karte (User 2026-09-06). JEDE Zelle traegt dafuer ihren
   eigenen Anker, der die Zelle ausfuellt - KEIN aufgespanntes ::after mehr:
   das haengt an "position: relative" auf dem <tr>, und das ist bei
   border-collapse:collapse browser-abhaengig (Safari ignoriert es). Wo es nicht
   greift, faellt der Bezugsrahmen auf den Viewport zurueck, jedes Overlay deckt
   die GANZE Seite ab und die letzte Zeile liegt obenauf: dann fuehrt jeder Klick
   irgendwo auf der Seite - auch auf die Wertungs-Pillen - ins Detail des UNTERSTEN
   Eintrags (User-Befund 2026-09-06). Zellen-Anker koennen ihre Zelle nicht
   verlassen; die Polsterung wandert dafuer in den Anker.
   Nur der Act-Anker traegt Text fuer Screenreader, die uebrigen sind
   aria-hidden + tabindex=-1: EIN Link je Zeile im Zugaenglichkeitsbaum. */
.cmp-alltime-table tbody td { padding: 0; }
.cmp-alltime-page .cmp-alltime-table tbody a.cmp-alltime-cell-link,
.cmp-alltime-page .cmp-alltime-table tbody .cmp-alltime-cell {
  display: block; padding: 8px 10px; color: inherit; text-decoration: none;
}
.cmp-alltime-page .cmp-alltime-table tbody a.cmp-alltime-act-card,
.cmp-alltime-page .cmp-alltime-table tbody div.cmp-alltime-act {
  display: flex; align-items: center; gap: 10px; min-width: 180px;
  padding: 8px 10px; color: inherit; text-decoration: none;
}
/* Ausrichtung der Zahlenspalten wandert mit der Polsterung in den Anker */
.cmp-alltime-table tbody .col-num a, .cmp-alltime-table tbody .col-num .cmp-alltime-cell { text-align: right; }
.cmp-alltime-table tbody .col-pos a, .cmp-alltime-table tbody .col-pos .cmp-alltime-cell { text-align: left; }

.cmp-alltime-table tbody tr:hover td { background: var(--mmdb-card-hover); }
.cmp-alltime-table tbody tr:hover .cmp-alltime-photo { border-color: var(--mmdb-accent); }
.cmp-alltime-table tbody tr:has(a) { cursor: pointer; }
/* Tastatur: der Fokus liegt auf dem Act-Anker, zeigen soll ihn die ZEILE */
.cmp-alltime-table tbody tr:has(a:focus-visible) td {
  background: var(--mmdb-card-hover);
  box-shadow: inset 0 0 0 2px var(--mmdb-accent);
}
.cmp-alltime-page .cmp-alltime-table tbody a:focus-visible { outline: none; }

/* Hinweis auf die abgeleiteten Werte eines Alt-Termins */
.cmp-atd-legacy { margin: 0 0 16px; }
.cmp-atd-page .cmp-alltime-table .col-pos { text-align: right; }
/* Zwei Alltime-Spalten (User 2026-09-06): die Spalte der AKTIVEN Wertung steht fett,
   wie die Zahlenspalten daneben - so ist auf einen Blick klar, welche gerade gilt. */
.cmp-alltime-table .col-pos.is-active { font-weight: bold; }
.cmp-alltime-table .col-pos:not(.is-active) { font-weight: normal; opacity: .75; }
