/* **The lane slots, in the order somebody listed them.** Only what they
   stated is drawn, so the cell holds between one and five — but it reserves
   the width of five, so nothing after it moves from row to row and the
   figures on the right still line up. Neutral ink only: mint and coral mean
   won and lost everywhere else, and a role somebody asked for has won nothing.

   The glyphs are Riot's own lane icons, drawn as masks rather than images so
   the ink stays the app's and the three states below keep saying what they
   say. Riot's files are two-tone gold, and that two-tone survives into the
   mask as partial alpha — which is the only thing telling top from bottom,
   since to Riot they are one square mirrored. */

.role-prefs {
  display: inline-flex;
  gap: 2px;
  /* Five slots and the four gaps between them, so a one-role row is as wide
     as a five-role one and the column under it does not jump. */
  min-width: calc((5 * 19px) + (4 * 2px));
}

.role-prefs__slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-xs);
  line-height: 1;
}

/* The glyph itself is `currentColor` poured through the lane's mask, so a
   slot's state colours its icon with nothing per-lane to restate. */
.role-prefs__glyph {
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.role-prefs__glyph--top {
  -webkit-mask-image: url("/assets/positions/top-901fb3c0.png");
  mask-image: url("/assets/positions/top-901fb3c0.png");
}

.role-prefs__glyph--jungle {
  -webkit-mask-image: url("/assets/positions/jungle-3d358af2.png");
  mask-image: url("/assets/positions/jungle-3d358af2.png");
}

.role-prefs__glyph--mid {
  -webkit-mask-image: url("/assets/positions/mid-9ac38bd4.png");
  mask-image: url("/assets/positions/mid-9ac38bd4.png");
}

.role-prefs__glyph--adc {
  -webkit-mask-image: url("/assets/positions/adc-1d251bb6.png");
  mask-image: url("/assets/positions/adc-1d251bb6.png");
}

.role-prefs__glyph--support {
  -webkit-mask-image: url("/assets/positions/support-95f4520a.png");
  mask-image: url("/assets/positions/support-95f4520a.png");
}

/* What they want. The only filled slot, because there is only one main. */
.role-prefs__slot--main {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--text-inverse);
}

/* What they will fill. Stated, so it carries a real border. */
.role-prefs__slot--willing {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

/* Never answered. All five are open, which is how the shuffle treats them, but
   nothing is claimed — so they are outlined in a hairline rather than filled,
   and no slot is the main. */
.role-prefs__slot--any {
  border-color: var(--border-default);
  color: var(--text-tertiary);
}

/* A roster row's cell: left-aligned under its label, unlike the figures on the
   right-hand end of the row, because it sits beside the name. */
.rank-cell--roles {
  align-items: flex-start;
}

/* ------------------------------------------------------------------ the key

   One line over the list somebody is picking from. The lanes are learnable on
   sight — that is the whole reason for using Riot's own glyphs — but which
   fill means what is not, so it is said once per board rather than on every
   row. */
.role-prefs-key {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-tertiary);
}

.role-prefs-key__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}
