/* Players and Compare Players (Public Data). Shared pieces are in publicstats.css. */

/* the list */
.pl-board th, .pl-board td { white-space: nowrap; }
.pl-board .ps-who > span { white-space: normal; }
#board .ps-who { gap: 10px; }
/* a phone: a name stays on one line (cut with ... when it is long) instead of being broken letter by letter in a narrow column, and the table
   drops its least useful column so the rest fits without scrolling sideways */
@media (max-width: 640px) {
    .pl-board th, .pl-board td { padding-inline: 5px; }
    .pl-board .ps-who { gap: 8px; }
    .pl-board .ps-bar { display: none; }
    .pl-board .ps-who > span:not(.ps-avatar) { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
    .pl-board .ps-avatar { width: 28px; height: 28px; }
    .pl-board .ps-c { width: auto; }
    .pl-board th:nth-child(5), .pl-board td:nth-child(5) { display: none; }
}
.pl-note { margin: 10px 0 0; font-size: 12px; text-align: center; }
.pl-how { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.pl-how a { color: var(--primary); }

/* one player (dialog) */
/* the header (and the close button inside it) stays at the top of the popup while the profile scrolls; it spans the
   body's padding so nothing shows above it */
.pl-head { position: sticky; top: -22px; z-index: 3; display: flex; align-items: center; gap: 18px; margin: -22px -24px 0; padding: 22px 64px 12px 24px;
    background: var(--bg-2); border-bottom: 1px solid var(--border); }
.pl-head + .ps-tiles { margin-top: 16px; }
.pl-head-text { min-width: 0; flex: 1; }
.pl-name { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 30px; font-weight: 400; line-height: 1.1; }
.pl-head-text p { margin: 2px 0 0; font-size: 13px; }
.pl-team { margin-top: 8px; }
.pl-head-actions select { padding: 7px 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); color-scheme: dark; font-size: 13px; max-width: 220px; }
.pl-none { margin: 20px 0 0; text-align: center; }
.pl-brawlers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.pl-brawler { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; padding: 8px 10px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.pl-brawler:hover { border-color: var(--primary); }
.pl-brawler .ps-brawler { grid-row: 1 / 4; }
.pl-brawler-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-brawler small { font-size: 11px; }
.pl-brawler .ps-rate { justify-content: flex-start; font-size: 12px; }
.pl-brawler .ps-rate b { min-width: 0; }
.pl-brawler .ps-bar { width: 40px; }
.pl-recent { display: flex; flex-direction: column; gap: 6px; }
.pl-set { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13px; }
.pl-set .ps-brawler { width: 26px; height: 26px; }
.pl-set-when { min-width: 44px; font-size: 12px; }
.pl-set-map { font-weight: 600; }
.pl-set-vs { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-foot { margin: 12px 0 0; font-size: 12px; }
.pl-foot a { color: var(--primary); }

/* compare */
.cp-pick { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 12px; margin-bottom: 20px; }
.cp-pick .fld { display: flex; flex-direction: column; gap: 4px; }
.cp-pick .fld > span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cp-pick select { padding: 7px 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color-scheme: dark; font-size: 13px; min-width: 190px; max-width: 260px; }
.cp-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 20px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.cp-vs { font-family: var(--font-display); font-size: 26px; color: var(--text-muted); }
.cp-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 150px; }
.cp-odds { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; font-size: 11px; text-align: center; }
.cp-odds-bar { display: flex; width: 100%; height: 26px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.cp-odds-bar i { display: flex; align-items: center; justify-content: center; min-width: 38px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--primary-ink); }
.cp-odds-a { background: var(--primary); }
.cp-odds-b { background: var(--blue); }
.cp-head-rating strong { font-family: var(--font-display); font-size: 30px; font-weight: 400; }
.cp-head-rating span { display: block; font-size: 12px; color: var(--text-muted); }
.pl-rating { font-weight: 800; }
.cp-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.cp-head-link { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.cp-head-link h2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 26px; font-weight: 400; overflow-wrap: anywhere; }
.cp-head-win strong { font-family: var(--font-display); font-size: 34px; font-weight: 400; }
.cp-head-win span { display: block; font-size: 12px; color: var(--text-muted); }

.cp-stats { display: flex; flex-direction: column; gap: 10px; }
.cp-stat { display: grid; grid-template-columns: 70px minmax(0, 1fr) 150px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.cp-stat-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-stat-v:first-child { text-align: right; }
.cp-stat-v.is-best { color: var(--primary); }
.cp-stat-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; color: var(--text-muted); }
.cp-stat-bar { display: flex; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cp-stat-bar--a { justify-content: flex-end; }
.cp-stat-bar i { display: block; height: 100%; border-radius: 99px; background: var(--text-muted); }
.cp-stat-bar--a i.is-best { background: var(--primary); }
.cp-stat-bar--b i.is-best { background: var(--blue); }
.cp-stat-v.is-best:last-child { color: var(--blue); }

.cp-meet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cp-meet-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.cp-meet-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cp-h2h { display: flex; align-items: baseline; gap: 10px; }
.cp-h2h b { font-family: var(--font-display); font-size: 32px; font-weight: 400; }
.cp-h2h span { font-size: 12px; color: var(--text-dim); }
.cp-sub { margin: 16px 0 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cp-results { display: flex; flex-direction: column; gap: 6px; }
.cp-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; }
.cp-result.is-a { border-left-color: var(--primary); }
.cp-result.is-b { border-left-color: var(--blue); }
.cp-result-who { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.cp-result .ps-brawler { width: 26px; height: 26px; }

.cp-pools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cp-pool h4 { margin-bottom: 8px; font-size: 14px; }
.cp-pool-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.cp-pool-row.is-shared { background: var(--primary-soft); border-color: rgba(174, 232, 117, 0.25); }
.cp-pool-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-pill { display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 6px; font-weight: 800; text-align: center; color: #fff; }
.cp-pill-n { font-size: 11px; }
.cp-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }

@media (max-width: 560px) {
    .cp-pick { flex-direction: column; align-items: stretch; }
    .cp-pick select { width: 100%; max-width: none; }
    .cp-pick .btn { align-self: center; }
}
@media (max-width: 720px) {
    .cp-top { grid-template-columns: minmax(0, 1fr); }
    .cp-vs { text-align: center; }
    .cp-stat { grid-template-columns: 52px minmax(0, 1fr) 96px minmax(0, 1fr) 52px; gap: 6px; }
    .cp-stat-label { font-size: 10px; }
    .cp-pools, .cp-meet { grid-template-columns: minmax(0, 1fr); }
    .pl-head { flex-direction: column; align-items: flex-start; position: static; border-bottom: 0; }
}
