/*
 * Player ratings — the ranked list at the foot of the Statistics tab
 * (PlayerRatings.js). A `.stat-card` like every other card in the column, so
 * the material, the heading and the gap are that file's; only the rows are
 * this one's, and they borrow the substitutions card's row (match-lineup.css)
 * so a player reads the same way on both tabs.
 */

/* `.stat-card` sets its own display, which the UA's [hidden] cannot beat. */
.player-ratings[hidden] {
  display: none;
}

.player-ratings__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-ratings__item + .player-ratings__item {
  border-top: 1px solid var(--border);
}

.player-ratings__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding-block: var(--space-2);
  background: none;
  border: none;
  text-align: left;
}

/* The place, muted and tabular so one- and two-digit ranks set the faces
   beside them from one edge. */
.player-ratings__rank {
  flex: none;
  width: calc(18px * var(--scale));
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  text-align: right;
}

/* The commentary plate, which hangs its crest off the portrait's corner —
   `flex: none` keeps a long name from squeezing the overhang off the row. */
.player-ratings__face {
  flex: none;
  margin-right: var(--space-05);
}

.player-ratings__face .season-stats__club {
  bottom: calc(-3px * var(--scale));
  right: calc(-7px * var(--scale));
}

.player-ratings__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-05);
  min-width: 0;
}

.player-ratings__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.player-ratings__meta {
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

/* The rating chip: the substitutions card's own (`.match-squad__rating`) —
   solid tier fill, white figure — so a 7.4 is the same object on both tabs. */
.player-ratings__rating {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(32px * var(--scale));
  padding: var(--space-05) var(--space-1);
  border-radius: var(--radius-sm);
  color: var(--text-inverse);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.player-ratings__rating[data-tier="high"] {
  background: var(--rating-high-solid);
}

.player-ratings__rating[data-tier="mid"] {
  background: var(--rating-mid-solid);
}

.player-ratings__rating[data-tier="low"] {
  background: var(--rating-low-solid);
}
