/* =====================================================================
   ClanWar -- Leaderboard feature add-ons
   Goes in: /cw/assets/feat-leaderboard.css   (loaded only by ranks.php)

   Adds styling for two extra leaderboard columns:
     1. Form      -- last up-to-5 CW results as small W/L/D pips
     2. HLstatsX Pts -- a SEPARATE, muted skill-points stat (NOT the rank;
                        the CW Rating column stays the ranking)

   Everything drives off the shared CSS custom properties defined in
   cw.css ( --cw-good / --cw-bad / --cw-fg-dim / --cw-border / ... ), so
   both the dark and light themes are supported automatically. Brand
   crimson is referenced via --cw-accent / --cw-accent-2 where used.
   ===================================================================== */

/* ---- Recent-form pips ------------------------------------------------ */
.cw-feat-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.cw-feat-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  user-select: none;
}

/* Win = green, Loss = red, Draw = grey -- tinted fill + matching text,
   the same translucent-chip language used by .cw-badge in cw.css. */
.cw-feat-pip-w {
  background: rgba(52, 211, 153, 0.14);
  color: var(--cw-good);
  border-color: rgba(52, 211, 153, 0.38);
}
.cw-feat-pip-l {
  background: rgba(248, 113, 113, 0.14);
  color: var(--cw-bad);
  border-color: rgba(248, 113, 113, 0.38);
}
.cw-feat-pip-d {
  background: color-mix(in srgb, var(--cw-fg-dim) 18%, transparent);
  color: var(--cw-fg-dim);
  border-color: color-mix(in srgb, var(--cw-fg-dim) 40%, transparent);
}

/* Empty state (player has no ranked matches yet). */
.cw-feat-form-empty {
  color: var(--cw-fg-dim);
  font-weight: 600;
}

.cw-feat-form-cell {
  white-space: nowrap;
}

/* ---- HLstatsX Pts (secondary, muted) -------------------------------- */
/* Deliberately understated so it never competes with the CW Rating
   column -- it is a connected-but-separate stat. */
.cw-feat-hlx-h {
  color: var(--cw-fg-dim);
  font-weight: 700;
  white-space: nowrap;
}

.cw-feat-hlx {
  color: var(--cw-fg-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A faint crimson hairline cue tying the column to the HLstatsX origin
   without shouting -- brand accent, low alpha. */
.cw-feat-hlx {
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--cw-accent) 22%, transparent);
}

.cw-feat-hlx-na {
  color: var(--cw-fg-dim);
}

/* ---- Responsive: drop the lower-priority extras on narrow tables ---- */
@media (max-width: 720px) {
  .cw-feat-hlx-h,
  .cw-feat-hlx { display: none; }
}
