/* ============================================================
 * tc-hub  +  tc-hub-shortcuts
 * Hub-Shell pro System: rahmt einen Hero (tc-page-header--banner,
 * teilt das menubg-Asset) und darunter Sektionen. Statistiken,
 * Achievements und Organized Play nutzen bestehende Organismen
 * (tc-leaderboard, tc-ach-tile, tc-calendar) - der Hub baut sie
 * nicht neu. NEU ist nur der Schnellzugriff (tc-hub-shortcut):
 * Nav-Quicklinks; tc-gf-tile ist bewusst nicht wiederverwendet,
 * da gamification-spezifisch (XP/Level), nicht Nav.
 * Datei: css/components/hub.css
 * ============================================================ */

/* ---- Shell ---- */
.tc-hub {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-6);
  font-family: var(--tc-font-body);
}
.tc-hub__section {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-3);
}
.tc-hub__section-title {
  display: flex;
  align-items: center;
  gap: var(--tc-space-2);
  margin: 0;
  font-family: var(--tc-font-display);
  font-size: var(--tc-text-lg);
  color: var(--tc-text-strong);
}
/* (Alternativ koennen Sektions-Header tc-section-header nutzen.) */

/* ---- Schnellzugriff (Nav-Quicklinks) ---- */
.tc-hub-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--tc-space-3);
}
.tc-hub-shortcut {
  display: flex;
  align-items: center;
  gap: var(--tc-space-3);
  padding: var(--tc-space-4);
  background: var(--tc-bg-surface-1);
  border: 1px solid var(--tc-border-subtle);
  border-radius: var(--tc-radius-lg);
  color: var(--tc-text-default);
  text-decoration: none;
  transition: transform var(--tc-motion-fast) var(--tc-ease-out),
              border-color var(--tc-motion-fast) var(--tc-ease-out),
              background var(--tc-motion-fast) var(--tc-ease-out);
}
.tc-hub-shortcut:hover,
.tc-hub-shortcut:focus-visible {
  transform: translateY(-2px);
  border-color: var(--tc-border-strong);
  background: var(--tc-bg-surface-2);
  outline: none;
}
.tc-hub-shortcut:focus-visible { box-shadow: 0 0 0 2px var(--tc-accent); }
.tc-hub-shortcut__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  font-size: 1.6rem;
  background: var(--tc-bg-surface-3);
  border-radius: var(--tc-radius-md);
}
.tc-hub-shortcut__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tc-hub-shortcut__title {
  font-family: var(--tc-font-body);
  font-size: var(--tc-text-base);
  font-weight: var(--tc-weight-semibold);
  color: var(--tc-text-strong);
  overflow-wrap: break-word;
  hyphens: auto;
}
.tc-hub-shortcut__sub {
  font-size: var(--tc-text-xs);
  color: var(--tc-text-muted);
}
/* Primaerer Shortcut (z.B. "Weiterspielen") mit Akzent */
.tc-hub-shortcut--primary { border-color: var(--tc-accent); }
.tc-hub-shortcut--primary .tc-hub-shortcut__icon {
  background: var(--tc-accent);
  color: var(--tc-text-on-accent);
}

@media (prefers-reduced-motion: reduce) {
  .tc-hub-shortcut {
    transition: border-color var(--tc-motion-fast) var(--tc-ease-out),
                background var(--tc-motion-fast) var(--tc-ease-out);
  }
  .tc-hub-shortcut:hover,
  .tc-hub-shortcut:focus-visible { transform: none; }
}

/* ---- Statistik-Grid (Consumer-Wrapper fuer tc-stat-block im Hub) ---- */
.tc-hub__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--tc-space-3);
}

/* ---- Filter-Leiste (z.B. Historie: Ergebnis / Fraktion) ---- */
.tc-hub__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tc-space-2);
}
.tc-hub__filters-label {
  font-size: var(--tc-text-xs);
  color: var(--tc-text-muted);
  margin-right: var(--tc-space-1);
}
.tc-hub__filters .tc-button.is-active {
  border-color: var(--tc-accent);
  color: var(--tc-highlight);
}

/* ---- Vertikale Liste (z.B. Match-Historie) ---- */
.tc-hub__list {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-1);
}

/* ---- Fraktions-Bilanz: dezente Karte je Fraktion, Kopf = Gesamtbilanz,
        darunter je Saison eine ausgerichtete Zeile (Meine Bilanz).
        Wiederverwendbar fuer weitere System-Hubs (z.B. The Old World). ---- */
.tc-hub__records {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--tc-space-3);
  margin-top: var(--tc-space-2);
  font-family: var(--tc-font-body);
}
.tc-hub__record {
  background: var(--tc-bg-surface-1);
  border: 1px solid var(--tc-border-subtle);
  border-radius: var(--tc-radius-md);
  padding: var(--tc-space-3) var(--tc-space-4);
}
.tc-hub__record-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tc-space-3);
  padding-bottom: var(--tc-space-2);
  margin-bottom: var(--tc-space-2);
  border-bottom: 1px solid var(--tc-border-subtle);
}
.tc-hub__record-name {
  min-width: 0;
  font-size: var(--tc-text-sm);
  font-weight: var(--tc-weight-semibold);
  color: var(--tc-text-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-hub__record-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tc-space-3);
  padding: 3px 0;
}
.tc-hub__record-season {
  font-size: var(--tc-text-xs);
  color: var(--tc-text-muted);
  white-space: nowrap;
}
.tc-hub__record-wld {
  flex-shrink: 0;
  font-size: var(--tc-text-sm);
  color: var(--tc-text-default);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tc-hub__record-wld--total {
  color: var(--tc-text-strong);
  font-weight: var(--tc-weight-semibold);
}

/* ---- Zweispaltiges Hub-Layout (Desktop): volle Baender oben, darunter zwei Spalten ---- */
/* Direkte <section>-Kinder spannen ueber beide Spalten; .tc-hub__col fasst je eine Spalte. */
.tc-hub--cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tc-space-6);
  align-items: start;
}
.tc-hub--cols > .tc-hub__section {
  grid-column: 1 / -1;
}
.tc-hub__col {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-6);
  min-width: 0;
}
@media (max-width: 960px) {
  .tc-hub--cols {
    grid-template-columns: 1fr;
  }
}
