/* Team + manager page specifics. Shared pieces live in football.css; this
   file only uses the theme tokens, so it needs no dark-mode overrides. */

.fbt-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 6px;
}
.fbt-count { font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 4px; }
.fb-section-title.fbt-spaced, .fbt-spaced { margin-top: 28px; }
.fbt-page .fb-table td.fb-team-cell .fb-team { max-width: 100%; }
.fbt-ext { font-size: 0.7em; color: var(--muted); margin-left: 3px; }
.fbt-up { color: #2f7d4a; font-weight: 700; }
.fbt-down { color: #b2453c; font-weight: 700; }
.fbt-updated { text-align: center; border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 28px; }

/* Hero side: form strip + season picker */
.fbt-hero-side { gap: 20px; align-items: flex-end; }
.fbt-hero-form .fb-form-chip { width: 24px; height: 24px; font-size: 0.74rem; }
.fbt-season { display: block; }

/* Match cards (next / last) */
.fbt-match-card .fb-card-title { margin-bottom: 8px; }
.fbt-match-comp { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text-soft); }
.fbt-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.fbt-match:hover .fbt-match-side span { text-decoration: underline; }
.fbt-match-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 0;
}
.fbt-match-side span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fbt-match-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fbt-match-score { font-size: 1.6rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fbt-match-time { font-size: 1.15rem; white-space: nowrap; }
.fbt-match-center small { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }

/* Recent form list */
.fbt-form-list { list-style: none; margin: 0; padding: 0; }
.fbt-form-list li {
  display: grid;
  grid-template-columns: 20px 18px minmax(0, 1fr) auto 52px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.fbt-form-list li:last-child { border-bottom: none; }
.fbt-form-venue { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-align: center; }
.fbt-form-comp { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.fbt-form-score { font-weight: 700; color: var(--text); text-align: right; text-decoration: none; font-variant-numeric: tabular-nums; }
a.fbt-form-score:hover { text-decoration: underline; }

/* Top players */
.fbt-top-players { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* Manager card */
.fbt-manager-head { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; margin-bottom: 12px; }
.fbt-manager-head strong { display: block; font-size: 1.05rem; }
.fbt-manager-head small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.fbt-manager-head:hover strong { text-decoration: underline; }
.fb-kpis.fbt-manager-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fbt-manager-kpis .fb-kpi-value { font-size: 1.15rem; }

/* Standings */
.fbt-table-block + .fbt-table-block { margin-top: 30px; }
.fbt-table-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 4px 16px; }
.fbt-table-head .fb-section-title { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; }
.fbt-table-head .fb-chips { margin-bottom: 12px; }
.fbt-standings td.fb-qual { padding-left: 8px; }
.fbt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.fbt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Squad */
.fbt-squad-controls { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.fbt-search { min-width: 220px; }
.fbt-squad-coach {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin: 4px 0 22px;
  background: var(--surface-raised); border-radius: 4px;
}
.fbt-squad-coach .fbt-label { margin: 0; }
.fbt-squad-coach .fbt-manager-head { margin: 0; gap: 8px; }
.fbt-squad-group { margin-bottom: 26px; }
.fbt-squad-group[hidden], .fbt-squad tr[hidden] { display: none; }
.fbt-player { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.fbt-player small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 1px; }
.fbt-player-name { color: var(--text); font-weight: 600; text-decoration: none; }
.fbt-player-name:hover { text-decoration: underline; }
.fbt-rating {
  display: inline-block; min-width: 40px; padding: 2px 6px; border-radius: 3px;
  background: var(--surface-raised); color: var(--text); font-weight: 700; text-align: center;
}
.fbt-squad { table-layout: fixed; min-width: 560px; }
.fbt-squad th:nth-child(1) { width: 44px; }
.fbt-squad th:nth-child(3) { width: 20%; }
.fbt-squad th:nth-child(4) { width: 56px; }
.fbt-squad th:nth-child(5) { width: 76px; }
.fbt-squad th:nth-child(6), .fbt-squad th:nth-child(7) { width: 44px; }
.fbt-squad th:nth-child(8) { width: 84px; }
.fbt-squad td { overflow: hidden; text-overflow: ellipsis; }
.fbt-rating.is-high { background: #2f7d4a; color: #fff; }
.fbt-rating.is-low { background: #b2453c; color: #fff; }

/* Stats */
.fb-kpis.fbt-team-ranks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fbt-rank { display: block; margin-top: 6px; font-size: 0.75rem; font-weight: 700; color: var(--text-soft); }
.fbt-leader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.fbt-inline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Manager page */
.fbt-page .fb-table td.fbt-nowrap { white-space: nowrap; }
.fbm-career-dates { white-space: nowrap; color: var(--muted); }
.fbm-trophy-team { margin-bottom: 18px; }
.fbm-trophy-team h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 8px; color: var(--text); }
.fbm-trophies { list-style: none; margin: 0; padding: 0; }
.fbm-trophies li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.fbm-trophies li:last-child { border-bottom: none; }
.fbm-trophies small { color: var(--muted); display: block; font-size: 0.78rem; }
.fbm-trophy-count { font-weight: 700; color: var(--text); white-space: nowrap; }
.fbm-kpis .fb-kpi-value { font-size: 1.7rem; }

@media (max-width: 900px) {
  .fbt-top-players { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .fbt-hide-sm { display: none; }
  .fbt-hero-side { width: 100%; justify-content: space-between; }
  .fbt-form-list li { grid-template-columns: 20px 16px minmax(0, 1fr) 46px; }
  .fbt-form-comp { display: none; }
  .fbt-search { min-width: 0; width: 100%; }
  .fbt-match-score { font-size: 1.3rem; }
}
