/* ParlayDesk team badge (2026-11-07): the rounded, team-colored abbreviation
   from /team-badges.js. Colors arrive per badge as --tb-bg / --tb-fg; size
   follows --tb-h (height) and --tb-w (min width), set by each surface on
   its own class (no default is declared here, so load order never
   matters). A faint inner ring keeps navy and black fills visible on the
   dark navy cards. */
.pd-tb {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--tb-h, 28px);
  min-width: var(--tb-w, 52px);
  padding: 0 7px;
  border-radius: 7px;
  background: var(--tb-bg, #334155);
  color: var(--tb-fg, #f1f5f9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-size: calc(var(--tb-h, 28px) * .54);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: normal;
  text-transform: uppercase;
  user-select: none;
}
/* A four-letter code (NBA UTAH) keeps the same badge width. */
.pd-tb--4 { letter-spacing: -.01em; font-size: calc(var(--tb-h, 28px) * .46); }
/* Unknown / placeholder side: the neutral slate fill, a slightly stronger ring. */
.pd-tb--unknown { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }

/* Expansion (2026-11-08): the compact badge for matchup headers outside
   Schedule. It sits inside a line of text, so it is sized by its own class
   (not by --tb-h) and keeps the line's height. */
.pd-tb--sm {
  --tb-h: 18px;
  --tb-w: 32px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: .03em;
  vertical-align: 1px;
  /* Drawn at 18px but never taller than the text line it sits in, so a
     header keeps its height (line boxes use the margin box). */
  margin-block: -3px;
}
.pd-tb--sm.pd-tb--4 { font-size: 9px; letter-spacing: 0; }
/* A decorative badge prints its code from the attribute: no text node, so
   the surface's text is exactly what it was. */
.pd-tb[data-tb-label]::before { content: attr(data-tb-label); }
/* Before a printed team name (no space character is added to the text). */
.pd-tb--lead { margin-right: .4em; }
/* Badge + the name's first word never split across lines. */
.pd-tb-keep { white-space: nowrap; }

/* The muted identifier for dense player rows: the surface's own code tag,
   unchanged, with a thin team-color edge before the code. */
.pd-tb-tick::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: .95em;
  margin-right: .38em;
  border-radius: 2px;
  background: var(--tb-tick, transparent);
  vertical-align: -.1em;
}

/* Matchup spacing polish (2026-11-08). team-badges.js matchup() wraps a
   name label as .pd-mu > .pd-mu-codes ([AWY] @ [HOM], drawn by CSS, no
   text) + .pd-mu-names (the label). Default (desktop): names line only, as
   before. Compact (phones; the Builder slip, a narrow column at every
   width): the colored codes are the primary matchup and the full names a
   quieter second line without repeating their badges. */
.pd-mu-codes { display: none; }
.pd-mu-at::before { content: "@"; }
@media (max-width: 640px) {
  .pd-mu { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
  .pd-mu-codes { display: inline-flex; align-items: center; gap: 6px; }
  .pd-mu-at { font-size: 12px; font-weight: 600; color: var(--muted, #94a3b8); }
  .pd-mu-names { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--muted, #94a3b8); }
  .pd-mu-names .pd-tb { display: none; }
  /* The codes line already gives the order (away @ home), so the score
     reads "78 – 81" without repeating the codes; they stay in the text for
     screen readers (visually hidden, not removed). */
  .pdc-game-text:has(.pd-mu) .pdc-score-team { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
#builderTrackerBody .pd-mu { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
#builderTrackerBody .pd-mu-codes { display: inline-flex; align-items: center; gap: 6px; }
#builderTrackerBody .pd-mu-at { font-size: 12px; font-weight: 600; color: var(--muted, #94a3b8); }
#builderTrackerBody .pd-mu-names { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--muted, #94a3b8); }
#builderTrackerBody .pd-mu-names .pd-tb { display: none; }
#builderTrackerBody .group-left:has(.pd-mu) .pdc-score-team { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (forced-colors: active) {
  .pd-tb { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .pd-tb-tick::before { background: CanvasText; }
}

/* ── Jersey tile (2026-11-15): ONE component for the app's Game Center
   (gameCenterHub.js jerseyTile) and the public Game Center pages
   (lib/publicPages/pageKit.js jerseyTile) — the Player Page 2.0 number
   tile, small: enamel team fill, "#N" over the team code. Colours come in
   as --team / --team-fg / --team-edge / --team-rim (PDTeamBadge). ── */
.pd-jt {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-sizing: border-box; width: 44px; height: 44px; border-radius: 11px;
  background:
    radial-gradient(130% 70% at 14% 0%, rgba(255,255,255,.20) 0%, rgba(255,255,255,.06) 38%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,.14) 100%),
    var(--team, #334155);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), inset 0 -1.5px 0 rgba(0,0,0,.2),
    inset 0 0 0 1.5px var(--team-rim, color-mix(in srgb, var(--team-edge, #64748b) 55%, transparent)),
    0 1px 2px rgba(2,6,23,.4), 0 3px 8px rgba(2,6,23,.35);
  color: var(--team-fg, #e2e8f0); line-height: 1; text-decoration: none;
}
.pd-jt--none { background: rgba(148,163,184,.14); box-shadow: inset 0 0 0 1px rgba(148,163,184,.3); color: #cbd5e1; }
.pd-jt-num { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pd-jt-num--init { font-size: 14px; letter-spacing: .02em; }
.pd-jt-hash { font-size: .7em; opacity: .8; margin-right: 1px; }
.pd-jt-team { font-size: 8.5px; font-weight: 800; letter-spacing: .12em; opacity: .8; }
.pd-jt--sm { width: 40px; height: 40px; border-radius: 10px; }
@media (forced-colors: active) { .pd-jt { border: 1px solid CanvasText; } }
