/* Shared Players widget — leaderboard (meta) and per-hero (hero explorer).
   Collapses to a bar with the top 3 (gold/silver/bronze); expands to a thin,
   scrollable, clickable list. Prefixed .pw- to avoid clashes. */
.pw-wrap{background:rgba(255,255,255,0.05);border-radius:12px;overflow:hidden;text-align:left}
/* tappable bar (also holds the search box when expanded) */
.pw-bar{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;user-select:none;transition:background 0.15s}
.pw-bar:hover{background:rgba(255,255,255,0.07)}
.pw-bar.pw-open{border-bottom:1px solid rgba(255,255,255,0.08)}
.pw-title{font-size:0.98em;color:#ddd;font-weight:700;white-space:nowrap}
.pw-sub{font-size:0.74em;color:#777}
.pw-sub.pw-cta{color:#a5b4fc;font-weight:600;font-size:0.8em}
.pw-bar:hover .pw-cta{color:#c7d2fe}
.pw-chev{margin-left:auto;color:#888;font-size:0.8em}
.pw-bar.pw-open .pw-chev{margin-left:8px}
.pw-search{margin-left:auto;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:7px;padding:5px 10px;color:#eee;font-size:0.8em;width:200px;cursor:text}
.pw-search::placeholder{color:#666}
.pw-search:focus{outline:none;border-color:#60a5fa}
/* list */
.pw-list{display:flex;flex-direction:column;padding:4px 6px 8px}
.pw-list.pw-scroll{max-height:380px;overflow-y:auto}
.pw-list::-webkit-scrollbar{width:7px}
.pw-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);border-radius:4px}
/* thin row — column grid set per mode */
.pw-row{display:grid;gap:8px;align-items:center;padding:5px 8px;border-radius:6px;font-size:0.82em;
    text-decoration:none;color:inherit;border-bottom:1px solid rgba(255,255,255,0.05)}
.pw-mode-leaderboard .pw-row{grid-template-columns:34px 1fr 104px 76px 64px 50px 48px 48px 54px}
.pw-mode-hero .pw-row{grid-template-columns:30px 1fr 64px 50px 46px 46px 46px}
.pw-row.pw-colhead{position:sticky;top:0;background:#15152b;color:#888;font-size:0.7em;font-weight:bold;cursor:default;border-bottom:1px solid rgba(255,255,255,0.12)}
.pw-row.pw-colhead span{white-space:nowrap}
/* column alignment — applies to both header and data rows so they line up */
.pw-mode-leaderboard .pw-row > :nth-child(n+5){text-align:right}
.pw-mode-hero .pw-row > :nth-child(n+4){text-align:right}
.pw-row:not(.pw-colhead):hover{background:rgba(96,165,250,0.12)}
.pw-rank{color:#888;font-size:0.85em;text-align:center;font-variant-numeric:tabular-nums}
/* medals */
.pw-rank.m1{color:#0f0f23;background:#fcd34d;border-radius:6px;font-weight:700}
.pw-rank.m2{color:#0f0f23;background:#cbd5e1;border-radius:6px;font-weight:700}
.pw-rank.m3{color:#0f0f23;background:#d8a866;border-radius:6px;font-weight:700}
.pw-name{color:#818cf8;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-row:not(.pw-colhead):hover .pw-name{text-decoration:underline}
.pw-region{color:#888;font-size:0.82em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-mmr{color:#fcd34d;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
.pw-wr{text-align:right;font-variant-numeric:tabular-nums}
.pw-wr.high{color:#4ade80}.pw-wr.mid{color:#fbbf24}.pw-wr.low{color:#f87171}
.pw-games{color:#ccc;text-align:right;font-variant-numeric:tabular-nums}
/* top-played hero icons */
.pw-heroes{display:flex;gap:4px;align-items:center;overflow:hidden}
.pw-hero{width:24px;height:24px;border-radius:5px;object-fit:cover;background:rgba(255,255,255,0.06);flex:0 0 auto}
.pw-empty{padding:16px;text-align:center;color:#666;font-size:0.85em}
/* disclaimer note under the bar */
.pw-note{padding:7px 16px;font-size:0.74em;color:#8a8aa0;font-style:italic;border-bottom:1px solid rgba(255,255,255,0.06)}
/* allow the "Most Played Heroes" header to wrap instead of overflowing */
.pw-h-heroes{white-space:normal !important;line-height:1.1}
/* Big variant — used as the Player Analyzer landing leaderboard */
.pw-big{max-width:860px;margin:0 auto}
.pw-big .pw-bar{padding:14px 18px}
.pw-big .pw-title{font-size:1.1em}
.pw-bar.pw-static{cursor:default}
.pw-bar.pw-static:hover{background:transparent}
.pw-big .pw-list.pw-scroll{max-height:64vh}
/* tight left cluster (rank · name · heroes) then a flexible gap, then the
   right-aligned stats cluster (region → games) */
.pw-big.pw-mode-leaderboard .pw-row{grid-template-columns:38px minmax(90px,170px) 116px 1fr 60px 48px 44px 44px 52px;
    font-size:0.88em;padding:8px 14px}
.pw-big.pw-mode-leaderboard .pw-row > :nth-child(4){text-align:right}
.pw-big .pw-row.pw-colhead{font-size:0.72em;letter-spacing:0.02em}
.pw-big .pw-hero{width:28px;height:28px;border-radius:6px}
.pw-big .pw-rank{font-size:0.9em}
@media (max-width:900px){
    .pw-mode-leaderboard .pw-row{grid-template-columns:26px 1fr 78px 56px 46px}
    .pw-big.pw-mode-leaderboard .pw-row{grid-template-columns:30px 1fr 92px 64px 50px}
    .pw-mode-hero .pw-row{grid-template-columns:26px 1fr 44px 40px}
    .pw-region,.pw-col-hide{display:none}
    /* leaderboard: hide region(4), 1st(7), 2nd(8), games(9) — keep #, name, heroes, MMR, WR */
    .pw-mode-leaderboard .pw-row > :nth-child(7),
    .pw-mode-leaderboard .pw-row > :nth-child(8),
    .pw-mode-leaderboard .pw-row > :nth-child(9),
    /* hero: hide FP/SP columns (5th/6th/7th data cells) */
    .pw-mode-hero .pw-row > :nth-child(5),
    .pw-mode-hero .pw-row > :nth-child(6),
    .pw-mode-hero .pw-row > :nth-child(7){display:none}
    .pw-hero{width:20px;height:20px}
    .pw-big .pw-hero{width:24px;height:24px}
    .pw-search{width:140px}
}
