/* ==========================================================================
   COMBINE-FC — pitch-season.css
   LEAGUE SEASON: the header (club, team rating, PLAY THE SEASON), the live
   matchday reveal, the final table, the squad's numbers, the results list and
   the past-seasons log.

   Structural pattern ported from combine/css/combine-season.css — panel shell,
   big record numeral, result pill strip, award chips, a monospaced stat grid
   — in FC's own token language. What has no COMBINE counterpart at all is the
   LEAGUE TABLE: ten columns sorted on points, and three result colours instead
   of two, because a football match can be drawn.
   ========================================================================== */

#screen-season .container {
  padding-top: var(--s-4);
  padding-bottom: var(--s-8);
}

.fc-season {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.fc-season__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-text);
}

/* ------ A) empty gate ------ */
.fc-season__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-5);
}
.fc-season__empty-text {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  color: var(--c-text-2);
}

/* ------ B) header: club, rating, play button ------ */
.fc-season__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4);
}
.fc-season__head-left {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}
.fc-season__club {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  letter-spacing: 0.04em;
  color: var(--c-text);
}
.fc-season__format {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--c-text-3);
}
.fc-season__rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fc-season__rating-num {
  font-family: var(--font-display);
  font-size: var(--fs-stat-num);
  line-height: 1;
  color: var(--c-lime);
  font-variant-numeric: tabular-nums;
}
.fc-season__rating-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--c-text-3);
}
.fc-season__rating-detail {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--c-text-2);
  cursor: help;
}
/* .btn--xl is width:100% by default (pitch-base.css), which would drop the
   call to action onto its own row under the club name. Here it belongs beside
   the rating; the header's flex-wrap still gives it a full row on narrow
   screens, where a full-width button is the right shape. */
.fc-season__head .btn--xl {
  width: auto;
  min-width: 220px;
  padding: 16px var(--s-5);
  font-size: var(--fs-h3);
}

/* ------ C) live matchday reveal ------ */
.fc-season__live {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
}
.fc-season__live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.fc-season__live-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--c-text-3);
}
.fc-season__live-record {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.fc-season__live-pos {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  color: var(--c-lime-bright);
}

/* Result strip — three outcomes, three colours. */
.fc-season__form {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.fc-season__form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-inv);
  background: var(--c-panel-3);
}
.fc-season__form-pill.is-w { background: var(--c-result-w); }
.fc-season__form-pill.is-d { background: var(--c-result-d); }
.fc-season__form-pill.is-l { background: var(--c-result-l); }
.fc-season__form-pill.is-pending {
  background: var(--c-bar-track);
  border: var(--bw) solid var(--c-line);
}

/* ------ D) the league table ------ */
.fc-table-wrap {
  overflow-x: auto;
  padding-bottom: var(--s-1);
}
.fc-table {
  display: flex;
  flex-direction: column;
  min-width: 460px;
}
.fc-table__row {
  display: grid;
  grid-template-columns: 28px minmax(96px, 1fr) repeat(6, 28px) 36px 40px;
  align-items: center;
  gap: var(--s-1);
  padding: 5px var(--s-2);
  border-bottom: var(--bw) solid var(--c-line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.fc-table__row > :nth-child(2) {
  text-align: left;
}
.fc-table__row--head {
  color: var(--c-text-3);
  letter-spacing: 0.08em;
  border-bottom-color: var(--c-line-2);
}
.fc-table__club {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.fc-table__pts {
  font-weight: 700;
  color: var(--c-text);
}
/* The qualification and relegation lines are painted as a left edge, the way
   a real table marks them, rather than as a full row wash that would fight
   the highlight on the manager's own club. */
.fc-table__row.is-continental {
  box-shadow: inset 3px 0 0 0 var(--c-lime);
}
.fc-table__row.is-relegation {
  box-shadow: inset 3px 0 0 0 var(--c-result-l);
}
.fc-table__row.is-user {
  background: var(--c-chalk-a10);
  color: var(--c-text);
}
.fc-table__row.is-user .fc-table__club {
  color: var(--c-chalk-bright);
}
.fc-table__key {
  padding-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--c-text-3);
}

/* ------ E) finished season ------ */
.fc-season__results {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4);
}
.fc-season__record {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.fc-season__record-pos {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 1;
  color: var(--c-chalk-bright);
}
.fc-season__record-line {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.fc-season__record-sub {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--c-text-3);
}

.fc-season__banner {
  padding: var(--s-3) var(--s-4);
  border: var(--bw) solid var(--c-line-2);
  border-radius: var(--r-md);
  background: var(--c-panel-2);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: 0.1em;
  color: var(--c-text-2);
  text-align: center;
}
.fc-season__banner.is-champion {
  color: var(--c-tier-gold);
  border-color: color-mix(in srgb, var(--c-tier-gold) 55%, transparent);
  background: color-mix(in srgb, var(--c-tier-gold) 12%, var(--c-panel));
}
.fc-season__banner.is-good {
  color: var(--c-lime-bright);
  border-color: color-mix(in srgb, var(--c-lime) 45%, transparent);
  background: var(--c-lime-a10);
}
.fc-season__banner.is-bad {
  color: var(--c-result-l);
  border-color: color-mix(in srgb, var(--c-result-l) 45%, transparent);
  background: color-mix(in srgb, var(--c-result-l) 10%, transparent);
}

/* ------ F) honours ------ */
.fc-season__awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-2);
}
.fc-season__award {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border: var(--bw) solid var(--c-line-2);
  border-left: 3px solid var(--c-flood-bright);
  border-radius: var(--r-xs);
  background: var(--c-panel-2);
}
.fc-season__award.is-negative {
  border-left-color: var(--c-result-l);
}
.fc-season__award-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  color: var(--c-text-3);
}
.fc-season__award-name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: 0.02em;
  color: var(--c-text);
}
.fc-season__award-stat {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--c-flood-bright);
}
.fc-season__award.is-negative .fc-season__award-stat {
  color: var(--c-result-l);
}

/* ------ G) blocks + squad numbers ------ */
.fc-season__block {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.fc-season__block-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--c-text-3);
}

.fc-stats {
  display: flex;
  flex-direction: column;
  min-width: 520px;
}
.fc-stats__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(9, 40px);
  align-items: center;
  gap: var(--s-1);
  padding: 5px var(--s-2);
  border-bottom: var(--bw) solid var(--c-line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.fc-stats__row > :first-child {
  text-align: left;
}
.fc-stats__row--head {
  color: var(--c-text-3);
  letter-spacing: 0.08em;
  border-bottom-color: var(--c-line-2);
}
.fc-stats__name {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  min-width: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  overflow: hidden;
  white-space: nowrap;
}
.fc-stats__pos {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--c-text-3);
}
.fc-stats__role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--c-flood-bright);
}

/* ------ H) results list ------ */
.fc-season__fixtures {
  display: flex;
  flex-direction: column;
}
.fc-season__fixture {
  display: grid;
  grid-template-columns: 26px 18px minmax(100px, 1fr) 48px minmax(0, 1.3fr);
  align-items: center;
  gap: var(--s-2);
  padding: 4px var(--s-2);
  border-bottom: var(--bw) solid var(--c-line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}
.fc-season__fixture-md,
.fc-season__fixture-venue {
  color: var(--c-text-3);
}
.fc-season__fixture-opp {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.fc-season__fixture-score {
  font-weight: 700;
  text-align: center;
  border-radius: var(--r-xs);
  color: var(--c-text-inv);
}
.fc-season__fixture.is-w .fc-season__fixture-score { background: var(--c-result-w); }
.fc-season__fixture.is-d .fc-season__fixture-score { background: var(--c-result-d); }
.fc-season__fixture.is-l .fc-season__fixture-score { background: var(--c-result-l); }
.fc-season__fixture-scorers {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text-3);
}

/* ------ I) past seasons ------ */
.fc-season__history {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
/* Five columns with an 84px floor give these rows a ~400px minimum, which is
   wider than the panel on a phone. Scroll the LIST sideways inside the panel —
   the same treatment .fc-table-wrap gives the league table — instead of
   letting it push the whole page out. */
.fc-season__history-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: auto;
}
.fc-season__history-row {
  display: grid;
  min-width: 400px;
  grid-template-columns: minmax(84px, 1fr) 44px minmax(84px, 1fr) 64px minmax(84px, 1fr);
  align-items: center;
  gap: var(--s-2);
  padding: 5px var(--s-2);
  border-bottom: var(--bw) solid var(--c-line);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}
.fc-season__history-row.is-champion {
  color: var(--c-tier-gold);
}
