/* =============================================================
   ParlayDesk — NHL player page, Public Pages 2.0 (2026-11-09, BETA)
   The companion of public-team.css: a presentation layer over
   /public-pages.css, loaded by the NHL player page only and scoped to
   .pp-player2, so no other page changes. The current team's colours
   arrive on the wrapper as --team (badge fill), --team-fg (badge text)
   and --team-edge (a version that shows on the navy cards), from
   public/team-badges.js; a player without a team keeps ParlayDesk blue.
   No logos, crests or photos: the player is a jersey-number tile.
   docs/PUBLIC_PAGES.md
   ============================================================= */

.pp-player2 {
  --team: #1d4ed8;
  --team-fg: #ffffff;
  --team-edge: #60a5fa;
  --pp-row-hover: rgba(255,255,255,.055);
}

/* ── Hero ────────────────────────────────────────────────────── */
.pp-player2 .pp-phero {
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px);
  gap: 22px;
  padding: 24px 24px 24px 26px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--pp-surface-2), var(--pp-surface));
  background:
    radial-gradient(90% 160% at 0% 0%, color-mix(in srgb, var(--team-edge) 15%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--pp-surface-2), var(--pp-surface));
}
/* The team's colour as a thin edge across the top of the hero. */
.pp-player2 .pp-phero::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--team-edge);
}
/* Jersey-number tile in the team's colours, the team code beneath. */
.pp-player2 .pp-pmark {
  width: 96px; height: 96px; border-radius: 20px; gap: 4px;
  background: var(--team); border: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 8px 24px rgba(2,6,23,.45);
  /* A navy or black fill (EDM, WPG, LAK) keeps an edge on the navy hero. */
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--team-edge) 55%, transparent), 0 8px 24px rgba(2,6,23,.45);
}
.pp-player2 .pp-pmark .pp-mark-num { font-size: 38px; color: var(--team-fg); }
.pp-player2 .pp-pmark .pp-mark-team { font-size: 10.5px; letter-spacing: .16em; color: var(--team-fg); opacity: .78; }
.pp-player2 .pp-name { margin: 4px 0 10px; font-size: 36px; }
.pp-player2 .pp-fact { align-items: center; padding: 5px 10px; border-radius: 8px; }
/* Team chip: the team's badge and name, linked to the team page. */
.pp-player2 .pp-pteam { gap: 8px; padding: 4px 10px 4px 4px; text-decoration: none; }
.pp-player2 a.pp-pteam { transition: background 150ms, border-color 150ms; }
.pp-player2 a.pp-pteam:hover { background: var(--pp-row-hover); border-color: color-mix(in srgb, var(--team-edge) 45%, transparent); }
.pp-player2 a.pp-pteam:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.pp-pteam-badge { --tb-h: 22px; --tb-w: 40px; padding: 0 5px; border-radius: 6px; }
.pp-pteam-name { min-width: 0; }

/* Analyze in Research (2026-11-09): the hero's primary action, under the
   chips. ParlayDesk blue; the chart icon leads, the arrow nudges on hover.
   Signed out, the "Free account" tag says what it takes. */
.pp-pact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; }
.pp-player2 .pp-pact-btn { gap: 8px; min-height: 40px; padding: 0 14px 0 12px; font-size: 14px; box-shadow: 0 6px 18px rgba(37,99,235,.28); }
.pp-player2 .pp-pact-btn svg { flex: none; width: 16px; height: 16px; }
.pp-player2 .pp-pact-btn svg:last-child { width: 14px; height: 14px; transition: transform 150ms; }
.pp-player2 .pp-pact-btn:hover svg:last-child,
.pp-player2 .pp-pact-btn:focus-visible svg:last-child { transform: translateX(2px); }
.pp-player2 .pp-pact-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }

/* Next game: a contained panel, opponent badge beside the matchup.
   Sized to its content (2026-11-10): it used to stretch to the hero's full
   height, a tall mostly-empty panel beside a two-line matchup. It now sits
   centred against the player's identity, as tall as its two lines. */
.pp-player2 .pp-pnext {
  align-self: center; justify-content: flex-start; gap: 8px;
  padding: 12px 14px; border-left: 0; border-radius: 12px;
  background: rgba(2,6,23,.35); border: 1px solid var(--pp-line);
}
.pp-pnext-row { display: grid; grid-template-columns: 20px auto minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.pp-player2 .pp-pnext .pp-pnext-at { justify-self: end; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-pnext-badge { --tb-h: 32px; --tb-w: 54px; }
.pp-pnext-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pp-player2 .pp-pnext .pp-next-match { font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.pp-player2 .pp-pnext .pp-next-when { font-size: 13px; }

/* ── Cards ───────────────────────────────────────────────────── */
.pp-player2 .pp-grid { gap: 16px; margin-top: 16px; }
.pp-player2 .pp-col { gap: 16px; }
.pp-player2 .pp-card { padding: 18px 20px 20px; border-radius: 14px; }
.pp-player2 .pp-card-head { margin-bottom: 12px; }

/* Season: compact tiles; PTS and SOG (goalies SV%) emphasised. */
.pp-player2 .pp-tiles { gap: 8px; }
.pp-player2 .pp-tile { padding: 12px 6px 10px; border-radius: 10px; gap: 5px; }
.pp-player2 .pp-tile dd { font-size: 26px; }

/* Recent games: a compact stat table. The game cell is vs / @, the
   opponent's badge, name and date (the team page's result rows); the
   whole row opens the game page through the cell's link. */
.pp-player2 .pp-table-wrap { margin: 0 -4px; }
.pp-player2 .pp-plog thead th { padding-top: 0; padding-bottom: 8px; }
.pp-player2 .pp-plog th, .pp-player2 .pp-plog td { padding-left: 8px; padding-right: 8px; }
.pp-player2 .pp-plog tbody th, .pp-player2 .pp-plog tbody td { padding-top: 9px; padding-bottom: 9px; }
.pp-player2 .pp-plog .pp-game { width: auto; }
.pp-player2 .pp-plog .pp-num { width: 58px; }
/* The game cell is the link's containing block (2026-11-11). It used to be
   the row (tr { position: relative }), but a browser that doesn't make a
   table row a containing block (iPhone Safari, as reported) stretched every
   row's ::after over the whole page, with the last row on top: tapping
   "Analyze in Research" opened that row's game. A cell is a containing
   block everywhere; the row's other cells follow the link through
   /public-pages.js (gameLogRows). */
.pp-player2 .pp-plog tbody th.pp-game { position: relative; }
.pp-player2 .pp-plog tbody tr:has(a.pp-pg) { cursor: pointer; }
/* Only rows that open a game page take the hover (and its 150ms fade). */
.pp-player2 .pp-plog tbody tr > * { transition: background 150ms; }
.pp-player2 .pp-plog tbody tr:has(a.pp-pg):hover > * { background: var(--pp-row-hover); }
.pp-player2 .pp-plog tbody tr > :first-child { border-radius: 9px 0 0 9px; }
.pp-player2 .pp-plog tbody tr > :last-child { border-radius: 0 9px 9px 0; }
.pp-player2 .pp-plog tbody .pp-num { font-size: 16px; font-weight: 700; }
.pp-player2 .pp-plog tbody .pp-num.is-key { font-weight: 800; }

.pp-pg {
  display: grid; grid-template-columns: 20px auto minmax(0, 1fr); align-items: center; gap: 10px;
  min-width: 0; color: inherit; text-decoration: none;
}
/* The link covers its cell (the cell is position: relative). */
.pp-player2 a.pp-pg::after { content: ''; position: absolute; inset: 0; }
.pp-player2 a.pp-pg:focus-visible { outline: none; }
.pp-player2 a.pp-pg:focus-visible::after { outline: 2px solid var(--accent2); outline-offset: -2px; border-radius: 9px; }
.pp-player2 .pp-pg-at { justify-self: end; font-size: 13px; }
.pp-pg-badge { --tb-h: 26px; --tb-w: 50px; }
.pp-pg-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.pp-pg-text--neutral { grid-column: 2 / -1; }
.pp-pg-name, .pp-pg-match { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.pp-player2 a.pp-pg .pp-pg-name { transition: color 150ms; }
.pp-player2 .pp-pg .pp-date { margin-top: 0; }
.pp-player2 a.pp-pg:hover .pp-pg-name, .pp-player2 tr:hover a.pp-pg .pp-pg-name, .pp-player2 a.pp-pg:focus-visible .pp-pg-name { color: #93c5fd; }

/* Result: W / L as the team page's pill. */
.pp-player2 .pp-plog tbody .pp-res { font-size: 14px; font-weight: 700; color: var(--text); }
.pp-player2 .pp-plog .pp-res-o {
  min-width: 22px; height: 21px; padding: 0 5px; margin-right: 4px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: 1px;
  font-size: 11.5px; letter-spacing: .02em;
}
.pp-player2 .pp-plog .pp-res-o.is-w { color: #bbf7d0; background: rgba(34,197,94,.16); box-shadow: inset 0 0 0 1px rgba(74,222,128,.3); }
.pp-player2 .pp-plog .pp-res-o.is-l { color: #fecaca; background: rgba(239,68,68,.14); box-shadow: inset 0 0 0 1px rgba(248,113,113,.3); }
/* NFL tie (unified four-sport pages, 2026-11-11): neutral. */
.pp-player2 .pp-plog .pp-res-o.is-t { color: var(--text); background: rgba(148,163,184,.14); box-shadow: inset 0 0 0 1px rgba(148,163,184,.3); }
/* More than one stat line (an MLB two-way player, an NFL quarterback's
   passing and rushing): each line is labelled inside the card. */
.pp-player2 .pp-statline + .pp-statline { margin-top: 18px; }
.pp-player2 .pp-statline > .pp-k { margin-bottom: 8px; }
.pp-player2 .pp-plog .pp-res-x {
  margin-left: 2px; padding: 1px 5px; border-radius: 5px; font-size: 10px; color: var(--muted);
  background: rgba(255,255,255,.05); border: 1px solid var(--pp-line);
}

/* ── On ParlayDesk: links under the recent games, two columns on wide
   screens so the main column stays level with the side column. ───── */
.pp-player2 .pp-tlinks { padding: 14px 14px 12px; }
.pp-player2 .pp-tlinks > .pp-k { margin: 0 4px 8px; }
.pp-tlinks-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.pp-tlinks-list > li:only-child { grid-column: 1 / -1; }
.pp-player2 .pp-tlink {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 8px 7px 10px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  transition: background 150ms;
}
.pp-player2 .pp-tlink:hover { background: var(--pp-row-hover); }
.pp-player2 .pp-tlink:focus-visible { outline: 2px solid var(--accent2); outline-offset: 1px; }
.pp-tlink-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pp-tlink-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.pp-tlink-sub { font-size: 12px; color: var(--muted); }
.pp-tlink-badge { --tb-h: 18px; --tb-w: 34px; padding: 0 4px; border-radius: 5px; }
.pp-player2 .pp-tlink > svg { flex: none; width: 15px; height: 15px; color: #64748b; }
.pp-player2 .pp-tlink:hover > svg { color: var(--accent2); }
.pp-player2 .pp-locked { gap: 10px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pp-player2 .pp-phero { grid-template-columns: auto minmax(0, 1fr); }
  /* Below the identity: as wide as its content (up to the hero's width),
     never a full-width empty strip. */
  .pp-player2 .pp-pnext { grid-column: 1 / -1; justify-self: start; width: min(100%, 360px); padding: 10px 12px; border-top: 1px solid var(--pp-line); }
}
@media (max-width: 640px) {
  .pp-player2 .pp-phero { gap: 14px; padding: 18px 16px 16px; border-radius: 16px; }
  .pp-player2 .pp-pmark { width: 72px; height: 72px; border-radius: 16px; gap: 2px; }
  .pp-player2 .pp-pmark .pp-mark-num { font-size: 27px; }
  .pp-player2 .pp-pmark .pp-mark-team { font-size: 9px; letter-spacing: .14em; }
  .pp-player2 .pp-name { margin: 2px 0 8px; font-size: 27px; }
  .pp-player2 .pp-facts { gap: 6px; }
  .pp-pact { margin-top: 12px; }
  .pp-player2 .pp-pact-btn { min-height: 44px; }
  .pp-player2 .pp-grid, .pp-player2 .pp-col { gap: 12px; }
  .pp-player2 .pp-grid { margin-top: 12px; }
  .pp-player2 .pp-card { padding: 14px 14px 16px; border-radius: 13px; }
  .pp-player2 .pp-tile { padding: 10px 2px 8px; }
  .pp-player2 .pp-tile dd { font-size: 22px; }
  .pp-pnext-row { grid-template-columns: 18px auto minmax(0, 1fr); gap: 8px; }
  .pp-player2 .pp-pnext { width: 100%; }
  .pp-player2 .pp-pnext .pp-pnext-at { font-size: 12.5px; }
  /* Phones: the stat columns keep their width; the opponent is its badge
     (the full name stays in the link for assistive tech), the date beside it. */
  .pp-player2 .pp-plog th, .pp-player2 .pp-plog td { padding-left: 4px; padding-right: 4px; }
  .pp-player2 .pp-plog--4 .pp-num { width: 12%; }
  .pp-player2 .pp-plog--3 .pp-num { width: 14%; }
  .pp-tlinks-list { grid-template-columns: minmax(0, 1fr); }
  .pp-player2 .pp-plog tbody .pp-num { font-size: 15px; }
  .pp-player2 .pp-plog tbody .pp-res { font-size: 13px; white-space: normal; }
  /* Three-digit scores (NBA "119–114") with an OT chip: the cell wraps
     between the score and the chip, never inside either. */
  .pp-player2 .pp-plog .pp-res-s, .pp-player2 .pp-plog .pp-res-x { white-space: nowrap; }
  /* Long values (MLB "198.1" IP, NFL "18/22" FG): a step smaller. */
  .pp-player2 .pp-tile.is-long dd { font-size: 19px; letter-spacing: -.02em; }
  .pp-player2 .pp-plog tbody td.pp-num { overflow-wrap: normal; }
  /* Phones: the date sits under the badge, never broken. */
  .pp-pg { grid-template-columns: 16px auto; gap: 1px 6px; }
  .pp-player2 .pp-pg-at { grid-row: 1 / span 2; font-size: 12px; }
  .pp-pg-text { grid-column: 2; }
  .pp-pg-text--neutral { grid-column: 1 / -1; }
  .pp-player2 .pp-pg .pp-date { white-space: nowrap; }
  .pp-pg-badge { --tb-h: 22px; --tb-w: 42px; padding: 0 4px; }
  .pp-pg-name {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .pp-pg-match { font-size: 13.5px; }
}
@media (max-width: 380px) {
  /* Narrow phones: the tile sits above the name, so the name has the width. */
  .pp-player2 .pp-phero { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pp-player2 .pp-pmark { flex-direction: row; gap: 8px; width: auto; height: auto; padding: 8px 12px; justify-self: start; border-radius: 12px; }
  .pp-player2 .pp-pmark .pp-mark-num { font-size: 20px; }
  .pp-player2 .pp-name { font-size: 24px; }
  .pp-pnext-badge { --tb-h: 26px; --tb-w: 46px; padding: 0 5px; }
  .pp-player2 .pp-plog th, .pp-player2 .pp-plog td { padding-left: 3px; padding-right: 3px; }
  .pp-player2 .pp-plog tbody .pp-num { font-size: 14px; }
  .pp-player2 .pp-plog tbody .pp-res { font-size: 12px; }
  .pp-player2 .pp-plog .pp-res-o { min-width: 18px; height: 19px; padding: 0 4px; margin-right: 2px; font-size: 10.5px; }
  .pp-player2 .pp-plog .pp-res-x { padding: 0 3px; font-size: 9.5px; }
  .pp-player2 .pp-tile.is-long dd { font-size: 16px; }
  .pp-player2 .pp-plog tbody .pp-num { letter-spacing: -.02em; }
  .pp-pg { grid-template-columns: 14px auto; gap: 1px 4px; }
  .pp-pg-badge { --tb-h: 20px; --tb-w: 36px; }
  .pp-player2 .pp-pg .pp-date { font-size: 11px; }
}

/* ── Phone typography (2026-11-10 mobile refinement, BETA) ─────────
   The name stays the H1. Up to 480px the compact tile sits above it (the
   narrow-phone layout, now from 480px), so the name has the hero's full
   width; sizes step down only enough to keep common names on one line. */
@media (max-width: 480px) {
  .pp-player2 .pp-phero { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pp-player2 .pp-pmark { flex-direction: row; gap: 8px; width: auto; height: auto; padding: 8px 12px; justify-self: start; border-radius: 12px; }
  .pp-player2 .pp-pmark .pp-mark-num { font-size: 20px; }
  .pp-player2 .pp-name { font-size: 25px; letter-spacing: -.02em; }
}
@media (max-width: 380px) {
  .pp-player2 .pp-phero { padding-left: 14px; padding-right: 14px; }
  .pp-player2 .pp-name { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-player2 .pp-tlink, .pp-player2 a.pp-pteam, .pp-player2 .pp-plog tbody tr > *, .pp-player2 a.pp-pg .pp-pg-name, .pp-player2 .pp-pact-btn svg { transition: none; }
}
@media (forced-colors: active) {
  .pp-player2 .pp-pmark { border: 1px solid CanvasText; }
  .pp-player2 .pp-phero::before { display: none; }
}
