/* wgf-player-card.css — the rich WoW player-character CARD treatment for leaderboard rows
   (owner spec 2026-07-03: rows read as crafted character cards, not spreadsheet rows).
   Companion of wgf_player_card.py (the ONE render home): rank plates, the identity block,
   class+spec badges, the faction-lit character stat panel, the red-bold contextual rating,
   and the searched-result highlight. Loaded AFTER wgf-leaderboard.css / wgf-hall.css on the
   PvP + PvE ladder pages; extends the shared atoms only — no markup forks, no frameworks.
   All art referenced here is first-party (faction wash colours are the in-game faction hues;
   crest/portrait/spec images arrive via pvp_icons' existing self-hosted / render-CDN lanes). */

.wgf-pvp-wrap {
  --wgf-rating-red: #ff6257;
  /* The first-party TOOLTIP SURFACE family (owner 2026-07-04, Addendum 7 item 28): the
     muted-brown row/plate fill is BANNED - rows re-tone onto the near-black blue-tinted
     tooltip plate + thin light border. Values copied from .wgf-tooltip-surface / the
     --wgf-well tokens in wgf-chrome.css so THIS sheet stays standalone (no import). */
  --wgf-pc-plate: linear-gradient(180deg, rgba(12, 12, 30, .97), rgba(5, 5, 16, .97));
  --wgf-pc-scrim: linear-gradient(90deg, rgba(5, 5, 16, .72), rgba(8, 8, 22, .40) 45%, rgba(5, 5, 16, .64));
  --wgf-pc-border: #7a7a96;
  --wgf-pc-well: #0a0a0c;
  --wgf-pc-well-edge: #05050a;
}

/* ── RankBadge: the number on an engraved plate; top-3 glow gold ── */
.wgf-pc-rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 30px; padding: 0 .45rem;
  border: 1px solid var(--wgf-border-neutral);
  border-radius: 6px;
  background: linear-gradient(160deg, var(--wgf-panel-2), var(--wgf-panel-1) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 6px rgba(0, 0, 0, .4);
}
.wgf-pc-rank .rank-num { font-size: .92rem; }
.wgf-pc-rank--1, .wgf-pc-rank--2, .wgf-pc-rank--3 {
  border-color: rgba(var(--wgf-gold-rgb), .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 12px rgba(var(--wgf-gold-rgb), .18),
    0 2px 6px rgba(0, 0, 0, .4);
}

/* ── PlayerIdentityBlock: bigger headshot + breathing room; spec badge from _ROW_ART_CSS ── */
.wgf-pc-id { gap: .65rem; }
.wgf-pc-id .char-portrait { flex: 0 0 40px; width: 40px; height: 40px; }
.wgf-pc-id .char-name { font-size: .98rem; }

/* ── ClassSpecBadge: class icon + spec icon pair, frameless (owner 2026-07-03: fewer pill
   containers — the icons ARE the art; no plate, no border, text sits on the row) ── */
.wgf-pc-spec { padding: 0; border: 0; background: none; }
.wgf-pc-spec .wgf-pc-clsico { border-radius: 3px; opacity: .9; }
.wgf-pc-spec .wgf-lb-specname { text-shadow: var(--text-ink-outline); }

/* ── FactionStatPanel: the game's own PvP-queue faction art fills the whole cell — no pill,
   no border (owner 2026-07-03: "remove this pill container … entire blizzard assets, ultra hd,
   filling the background, where each square is"). Art = interface/pvpframe/pvpqueuebackground*
   (CASC-extracted, first-party), unique per faction, behind the data it displays. Owner
   2026-07-04 (item 28): the warm-brown scrim is BANNED - the scrim re-tones onto the tooltip
   near-black blue tint (--wgf-pc-scrim), the Tier-3 legibility floor; text carries the ink
   outline. .wgf-pc-surface is the art-backed-plate marker. ── */
.wgf-pc-faccell { text-align: left; padding: 0 !important; }
.wgf-pc-surface { border-radius: 5px; }
.wgf-pc-fac {
  display: flex; align-items: center; gap: .6rem;
  width: 100%; min-height: 52px; padding: .3rem .7rem;
  background: var(--wgf-pc-scrim), var(--wgf-pc-plate);
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(122, 122, 150, .30);
}
.wgf-pc-fac[data-faction="horde"] {
  background: var(--wgf-pc-scrim), url(/assets/pvp/faction/bg-horde.jpg) center / cover no-repeat;
}
.wgf-pc-fac[data-faction="alliance"] {
  background: var(--wgf-pc-scrim), url(/assets/pvp/faction/bg-alliance.jpg) center / cover no-repeat;
}
.wgf-pc-fac .wgf-pc-facname,
.wgf-pc-fac .wgf-pc-chip b,
.wgf-pc-fac .wgf-pc-chip small { text-shadow: var(--text-ink-outline); }
.wgf-pc-crest { display: inline-flex; flex: 0 0 auto; }
.wgf-pc-crest .wgf-pvp-crest {
  width: 26px; height: 26px; border-radius: 4px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.wgf-pc-crest--none {
  width: 26px; height: 26px; border-radius: 4px;
  border: 1px dashed var(--wgf-border-neutral); opacity: .5;
}
.wgf-pc-facid { display: inline-flex; flex-direction: column; line-height: 1.1; }
.wgf-pc-facname {
  font-family: var(--font-display); font-size: .6rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--wgf-muted);
}
.wgf-pc-facname--horde { color: #ff8391; }
.wgf-pc-facname--alliance { color: #7fb4ff; }
.wgf-pc-chips { display: inline-flex; gap: .7rem; }
.wgf-pc-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 30px; }
.wgf-pc-chip b {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: .88rem; line-height: 1.15; color: var(--wgf-text);
}
.wgf-pc-chip small {
  font-family: var(--font-display); font-size: .52rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--wgf-muted); margin-top: 1px;
}

/* ── ROW SURFACE: the muted-brown row is BANNED (owner 2026-07-04, Addendum 7 item 28).
   Every ladder row re-tones onto the tooltip surface family (near-black blue-tinted plate);
   the class colour survives ONLY as the subtle 3px LEFT-EDGE rail, never a brown fill. The
   higher specificity (+ .wgf-pvp-wrap) out-ranks BOTH the zebra rows (wgf-data-table) and the
   inline _ROW_ART_CSS class wash (both 0,2,0) without !important. ── */
.wgf-pvp-wrap .wgf-table__tr.wgf-mplus-row {
  background-color: transparent;
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--cc, transparent) 85%, transparent) 0 3px, transparent 3px),
    var(--wgf-pc-plate);
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(122, 122, 150, .16);
}
.wgf-pvp-wrap .wgf-table__tr.wgf-mplus-row:hover {
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--cc, transparent) 92%, transparent) 0 3px, transparent 3px),
    linear-gradient(180deg, rgba(22, 22, 44, .97), rgba(8, 8, 22, .97));
}

/* ART BEHIND THE WHOLE ROW (owner verdict 2): the two ALREADY-CACHED faction jpgs used by
   .wgf-pc-fac extend behind the ENTIRE PvP row so it reads as one art-backed plate ("horde
   crypticelf is easy to read, so should the rest"). The tooltip scrim (--wgf-pc-scrim) + the
   ink-outline on names/labels/chips carry legibility in every cell. No new, heavy, or per-row
   images. Only the PvP ladders put wgf-pvp-<faction> on the row; the M+ boards keep the art in
   the .wgf-pc-fac cell. ── */
.wgf-pvp-wrap .wgf-table__tr.wgf-mplus-row.wgf-pvp-horde {
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--cc, transparent) 85%, transparent) 0 3px, transparent 3px),
    var(--wgf-pc-scrim),
    url(/assets/pvp/faction/bg-horde.jpg);
  background-size: auto, cover, cover;
  background-position: left, center, center;
  background-repeat: no-repeat;
}
.wgf-pvp-wrap .wgf-table__tr.wgf-mplus-row.wgf-pvp-alliance {
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--cc, transparent) 85%, transparent) 0 3px, transparent 3px),
    var(--wgf-pc-scrim),
    url(/assets/pvp/faction/bg-alliance.jpg);
  background-size: auto, cover, cover;
  background-position: left, center, center;
  background-repeat: no-repeat;
}
/* On an art-backed PvP row the faction cell defers to the row art — ONE plate, not two boxes. */
.wgf-pvp-wrap .wgf-pvp-horde .wgf-pc-fac,
.wgf-pvp-wrap .wgf-pvp-alliance .wgf-pc-fac { background: none; box-shadow: none; }

/* ── GearSnapshot: HONEST inset well slots (owner verdict 4: not broken black boxes). The
   profile crawler back-fills item icons; until then each slot is a quiet recessed well, the
   same near-black inset family as the AH data wells (--wgf-well / --wgf-well-edge). ── */
.wgf-pc-gear { display: inline-flex; gap: .28rem; align-items: center; }
.wgf-pc-gearslot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 4px;
  background: var(--wgf-pc-well);
  box-shadow: inset 0 0 0 1px var(--wgf-pc-well-edge), inset 0 1px 3px rgba(0, 0, 0, .55);
}
.wgf-pc-gearslot--empty { opacity: .8; }
.wgf-pc-gearslot img { width: 24px; height: 24px; border-radius: 3px; display: block; }

/* ── RatingStatBlock: the page's contextual rating — ALWAYS red bold (owner word-of-law).
   The client tier medal (pvp_common._tier_badge) + the red rating align cleanly at row
   height (owner verdict 3). ── */
.wgf-pc-rating {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: .35rem;
}
.wgf-pc-rating .wgf-pvp-tier { flex: 0 0 auto; display: inline-flex; align-items: center; }
.wgf-pc-rating .wgf-pvp-tier img { display: block; }
.wgf-pc-rating b {
  color: var(--wgf-rating-red) !important;
  font-weight: 800; font-size: 1.08rem;
  text-shadow: 0 0 12px rgba(255, 90, 78, .28), 0 1px 2px rgba(0, 0, 0, .8);
}
.wgf-pc-rating-cap {
  font-family: var(--font-display); font-size: .52rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--wgf-muted); margin-left: .3rem;
}

/* ── Missing-data placeholder: quiet, honest, never fake ── */
.wgf-pc-nostat { color: var(--wgf-muted); opacity: .55; font-weight: 400; }

/* ── SearchMatchHighlight: the searched substring + the matched row ── */
.wgf-pc-mark, mark.wgf-pc-mark {
  background: rgba(var(--wgf-gold-rgb), .24); color: inherit;
  border-radius: 3px; padding: 0 .06em;
  box-shadow: 0 0 0 1px rgba(var(--wgf-gold-rgb), .3);
}
.wgf-table__tr.wgf-pc-hit {
  outline: 1px solid rgba(var(--wgf-gold-rgb), .5); outline-offset: -1px;
}
.wgf-table__tr.wgf-pc-hit td:first-child { position: relative; }

/* Win% as a plain coloured number (the fill bar is gone — banned) */
.wgf-lb-wrnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Typography convergence (owner 2026-07-03: "too many fonts on this display") ──
   ONE face on ladder rows — the client's own Friz Quadrata — carrying names, spec labels,
   faction text and every number, exactly as the game renders a leaderboard panel. This
   deliberately overrides the mono/display/serif mix the shared atoms set per-element. */
.wgf-pvp-wrap .wgf-table th,
.wgf-pvp-wrap .wgf-table td,
.wgf-pvp-wrap .wgf-table td b,
.wgf-pvp-wrap .wgf-table td small,
.wgf-pvp-wrap .wgf-table td span,
.wgf-pvp-wrap .wgf-table td a {
  font-family: var(--font-game);
}

/* ── Mobile (≤680px): the stacked-card view keeps the panel readable ── */
@media (max-width: 680px) {
  .wgf-pc-fac { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .wgf-pc-chips { margin-left: auto; }
  .wgf-pc-rank { min-width: 34px; height: 26px; }
}
