/* Coach profile (pages/coach/*). Every block is a player-page or
   team-page component (player-info-grid, player-season-banner,
   next-match-card, last5-card, player-percentile-card, player-match-list,
   player-career-group, player-stats-*, player-similar-players) — this
   file only holds the coverage footnote, the season picker's size and
   the links into the profile from other screens. Tokens only. */
@layer components {
  /* Coverage / method footnote under a card's content. */
  .coach-note {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--color-text-muted);
  }

  /* Dentro de una tarjeta sin padding: el mismo margen lateral que su
     cabecera, para que la nota se alinee con el título. */
  .coach-note--card {
    margin: 0;
    padding: 0 14px 12px;
  }

  .coach-note--inline {
    margin: 0 0 0 4px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  /* Season picker: the team crest + the season, small (button and options). */
  .coach-season-filter .player-stats-filter__label {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .coach-season-filter .select-modal-option-label {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  /* «En cifras»: the crest of his bench before the «desde / hasta» month,
     on one line. */
  .coach-info-grid__bench {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .coach-info-grid__crest {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  /* The rank modal: his team's row — its value counts his matches only. */
  .squad-row.coach-rank-row--his {
    background: color-mix(in srgb, var(--color-accent) 10%, transparent);
    border-radius: var(--radius-sm, 8px);
  }

  /* The per-match sheet: the whole row leads to the match, and the link
     must not break the player row's grid. */
  .stat-match-row__link {
    display: contents;
    color: inherit;
    text-decoration: none;
  }

  /* Trayectoria: a season row with matches is a button (it opens them) that
     keeps the row's grid and looks — no chevron: the competition name needs
     the room. */
  .player-career-group__row.coach-career-row--drill {
    width: 100%;
    margin: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid rgb(255 255 255 / 4%);
    text-align: left;
    font: inherit;
    font-size: 12px;
    color: inherit;
    cursor: pointer;
  }

  .player-career-group__row.coach-career-row--drill:hover {
    background: rgb(255 255 255 / 3%);
  }

  .player-career-group__row.coach-career-row--drill:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
  }

  /* Trayectoria columns: TEMP · Competición (+ how it ended) · PJ · G-E-P ·
     DG. W-D-L in one column leaves room for the goal difference. */
  .coach-career .player-career-group__row {
    grid-template-columns: 0.55fr 2.9fr 0.45fr 1fr 0.55fr;
  }

  .coach-career-row__comp-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }

  .coach-career-row__comp-line {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }

  .coach-career-row__note {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    color: var(--color-text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coach-career-row__wdl {
    white-space: nowrap;
  }

  /* Its sheet is one competition: the header names it, so each match row
     drops the repeated competition label and keeps the date. */
  .player-career-tab .stat-matches-modal .player-match-row__comp {
    display: none;
  }

  .player-career-tab .stat-matches-modal .player-match-row__top {
    justify-content: flex-start;
  }

  /* A card title led by the competition crest (radar). */
  .coach-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .coach-card-title__logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
  }

  /* Competition crest before a stats row label. */
  .coach-stats-row__logo {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    object-fit: contain;
    vertical-align: -3px;
  }

  /* Links into the profile: match lineups, team overview and squad, the
     History tab's coach card. */
  a.coach-name--link {
    display: block;
    text-decoration: none;
  }

  a.info-value--link {
    color: var(--color-accent);
    text-decoration: none;
  }

  a.squad-coach__name--link {
    color: inherit;
    text-decoration: none;
  }

  a.team-coaches__name--link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
  }

  a.team-coaches__name--link svg {
    color: var(--color-text-muted);
  }

  a.coach-name--link:hover,
  a.info-value--link:hover,
  a.squad-coach__name--link:hover,
  a.team-coaches__name--link:hover {
    text-decoration: underline;
  }
}
