/* ============================================================
   SportsHeart — Modern Team / Game Cards (shared)
   ------------------------------------------------------------
   Loaded AFTER each sport's style.css on teams.html + team.html
   so it refreshes the cards rendered by teams.js without touching
   the sport stylesheets (keeps a single source of truth).

   The JS sets inline backgrounds (team gradients / team colours),
   so this file focuses on shape, spacing, typography, borders and
   motion — never on overriding the team-colour background.
   ============================================================ */

:root {
  --tc-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --tc-radius: 18px;
  --tc-border: rgba(255, 255, 255, 0.12);
  --tc-border-strong: rgba(255, 255, 255, 0.24);
  --tc-text-dim: rgba(255, 255, 255, 0.62);
  --tc-text-dimmer: rgba(255, 255, 255, 0.45);
  --tc-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  --tc-shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ── Containers ─────────────────────────────────────────────── */
.games-container,
.teams-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}

.teams-hint {
  text-align: center;
  font-family: var(--tc-font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary, #b8b8b8);
  margin: 4px 0 18px;
}

/* ── Game card base ─────────────────────────────────────────── */
.game-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 22px 16px;
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow);
  font-family: var(--tc-font);
  color: #fff;
  text-align: center;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tc-shadow-hover);
  border-color: var(--tc-border-strong);
}

.game-card.live {
  border-left-width: 4px;
  border-left-color: var(--live, #dc2626);
}

/* Context / series line */
.game-headline {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* Three equal-width columns: away | info | home */
.game-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.game-content > * {
  flex: 1 1 0;
  min-width: 0;
}

/* Team column */
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.card-team-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.card-team-logo-nhl {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.card-team-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.card-team-name-loss {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.6);
}

.card-team-record {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tc-text-dim);
}

/* Score display (score prominent, logo overlaid bottom-right) */
.card-score-cell {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-score {
  font-size: 3.25rem;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.card-score-loss {
  font-size: 3.25rem;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.6);
}
.card-score-logo {
  position: absolute;
  right: -18px;
  bottom: 2px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.card-score-logo-nhl {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 55px;
  height: 55px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.card-team-score {
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Center info */
.game-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.game-info .line {
  width: 44%;
  height: 1px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.25);
}
.game-status {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.game-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.game-period {
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tc-text-dim);
}

/* ── No-game card ───────────────────────────────────────────── */
.no-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px 20px;
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow);
}
.no-game-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

/* ── Team wrapper cards (teams.html) ────────────────────────── */
.team-card,
.team-section {
  position: relative;
  width: 440px;
  max-width: 100%;
  margin-bottom: 0;
  padding: 22px;
  border-radius: var(--tc-radius);
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.team-card:hover,
.team-section:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-hover);
  border-color: var(--tc-border-strong);
}

/* Soft darkening overlay so light team colours stay readable.
   Sits behind the card content (children are lifted above it). */
.team-card::before,
.team-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  z-index: 0;
}
.team-card > *,
.team-section > * {
  position: relative;
  z-index: 1;
}

.team-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
.team-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
}
.team-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}
.team-games {
  width: 100%;
}
.no-games {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  font-family: var(--tc-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .team-card,
  .team-section {
    width: 100%;
  }
}
