/* PLAYERS panel (public_players.js): structure + the theme tokens of public_theme.css (loaded after it). Inert unless the
   script added body.gws-pl (never on direct instances). Placement classes: gws-pl-side (docked right column, --pl-w),
   gws-pl-below (in the page flow), gws-pl-strip (one line along the bottom of a small /embed frame). */
#gws_players { display: none; }
body.gws-pl #gws_players { display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; min-width: 0; color: var(--text);
  font: var(--fw-reg) 13px/1.35 var(--f-ui); -webkit-font-smoothing: antialiased; }
#gws_players > * { flex: none; }
#gws_players b { font-weight: var(--fw-med); }
#gws_players .pl-head { display: flex; align-items: baseline; gap: 8px; }
#gws_players .pl-title { font: var(--fw-med) 10px/1 var(--f-label); letter-spacing: var(--track-wide); color: var(--dim); }
/* now playing */
#gws_players .pl-now { position: relative; padding: 11px 12px 12px 14px; border-radius: var(--r); background: var(--panel); box-shadow: inset 3px 0 0 var(--line-hi), var(--shadow); }
#gws_players[data-state=live] .pl-now { box-shadow: inset 3px 0 0 var(--live), var(--shadow); }
#gws_players[data-state=you] .pl-now { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); background: var(--accent-wash); }
#gws_players[data-state=handover] .pl-now { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
#gws_players .pl-now.flip { animation: pl-flip .42s var(--ease-out) both; }
@keyframes pl-flip { from { opacity: 0; transform: translateY(8px); } }
#gws_players .pl-lab { display: flex; align-items: center; gap: 6px; font: var(--fw-med) 10px/1 var(--f-label); letter-spacing: var(--track-wide); color: var(--dim); }
#gws_players .pl-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 17px; padding: 0 6px; border-radius: 3px;
  font: var(--fw-bold) 9.5px/1 var(--f-label); letter-spacing: var(--track-wide); color: #fff; background: var(--faint); white-space: nowrap; }
#gws_players .pl-badge.live { background: var(--live); }
#gws_players .pl-badge.live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: gws-live var(--pulse-live) ease-in-out infinite; }
#gws_players .pl-badge.you { background: var(--accent); }
#gws_players .pl-badge.wait { background: var(--warn-bg); color: var(--warn-ink); box-shadow: 0 0 0 1px var(--warn-line); }
#gws_players .pl-name { margin: 7px 0 8px; font: var(--fw-med) 18px/1.15 var(--f-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
#gws_players .pl-name.pl-free { color: var(--ok); }
#gws_players .pl-time { display: flex; align-items: center; gap: 8px; font: var(--fw-reg) 11px/1 var(--f-label); color: var(--dim); white-space: nowrap; }
#gws_players .pl-time b { font: var(--fw-med) 13px/1 var(--f-label); font-variant-numeric: tabular-nums; color: var(--text); }
#gws_players .pl-bar { flex: 1; height: 3px; background: var(--bg-0); overflow: hidden; min-width: 30px; }
#gws_players .pl-bar i { display: block; height: 100%; background: var(--live); transform-origin: left; transition: transform 1s linear; }
#gws_players[data-state=you] .pl-bar i { background: var(--accent); }
#gws_players .pl-sub { color: var(--dim); font-size: 12px; }
/* you */
#gws_players .pl-you:empty { display: none; }
#gws_players .pl-you p { margin: 0; }
#gws_players .pl-me { font-size: 13px; color: var(--text); }
#gws_players[data-state=you] .pl-me b { color: var(--accent-2); }
#gws_players .pl-watch { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; margin-bottom: 8px !important; border-radius: var(--r);
  background: var(--live-wash); color: var(--text); box-shadow: inset 0 0 0 1px rgba(196, 35, 84, .18); }
#gws_players .pl-watch svg { flex: none; width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: var(--live); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#gws_players .pl-watch b { color: var(--live); }
#gws_players .pl-pos { font-size: 12.5px; color: var(--dim); }
#gws_players .pl-pos b { font: var(--fw-bold) 13px/1 var(--f-label); color: var(--accent-2); }
#gws_players .pl-eta { color: var(--text); white-space: nowrap; } #gws_players .pl-eta small { color: var(--faint); font-size: 10.5px; }
/* the line */
#gws_players .pl-qh { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line);
  font: var(--fw-med) 10px/1 var(--f-label); letter-spacing: var(--track-wide); color: var(--dim); }
#gws_players .pl-line { list-style: none; margin: -4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 0 1 auto; min-height: 0; overflow-y: auto; }
#gws_players .pl-line li { flex: none; display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 4px 8px; border-radius: 6px; box-sizing: border-box; line-height: 1.2; }
#gws_players .pl-line .pos { flex: none; min-width: 1.5em; text-align: right; font: var(--fw-reg) 11px/1 var(--f-label); color: var(--faint); font-variant-numeric: tabular-nums; }
#gws_players .pl-line .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#gws_players .pl-line li.me { background: var(--accent-wash); box-shadow: inset 2px 0 0 var(--accent); color: var(--accent-2); font-weight: var(--fw-med); }
#gws_players .pl-line li.me .pos { color: var(--accent); }
#gws_players .pl-line .tag { flex: none; padding: 3px 5px; border-radius: 3px; background: var(--accent); color: #fff; font: var(--fw-bold) 9px/1 var(--f-label); letter-spacing: var(--track-wide); }
#gws_players .pl-line li.new { animation: pl-in .34s var(--ease-out) both; }
@keyframes pl-in { from { opacity: 0; transform: translateX(12px); } }
#gws_players .pl-line li.gap { margin-top: 4px; }
#gws_players .pl-line li.more, #gws_players .pl-line li.empty { min-height: 22px; color: var(--faint); font-size: 12px; padding-left: 10px; }
#gws_players .pl-strip { display: none; }

/* ---- docked column (right edge, full height): the page lives to its left ---- */
body.gws-pl-side #gws_players { position: fixed; top: 0; right: 0; bottom: 0; width: var(--pl-w); z-index: 46; padding: 14px 14px 12px;
  background: var(--panel); box-shadow: -1px 0 0 var(--line); overflow: hidden; }
body.gws-pl-side main { margin-right: var(--pl-w) !important; }
body.gws-pl-side #gws_land { right: var(--pl-w); }
body.gws-simple.gws-pl-side #gws_land .wrap { width: min(1120px, calc(92vw - var(--pl-w))); }
body.gws-simple.gws-pl-side .gws-toast, body.gws-pl-side #toasts { right: calc(var(--pl-w) + 16px); }
body.gws-simple.gws-pl-side .gws-toast:not(.on) { transform: translateX(calc(100% + 56px + var(--pl-w))); }   /* parked off-screen, behind the column */
body.gws-simple.gws-theater.gws-pl-side #gws_spec { max-width: calc(96vw - var(--pl-w)); }
body.gws-simple.gws-pl-side .gws-intro .foot { right: calc(var(--pl-w) + 16px); }
body.gws-simple.gws-pl-side #gws_stage > .lbox { right: var(--pl-w); }
body.gws-simple.gws-pl-side #gws_dd { left: calc(50% - var(--pl-w) / 2); width: min(1480px, calc(97vw - var(--pl-w))); }
@media (min-width: 900px) and (min-height: 480px) { body.gws-simple.gws-pick.gws-pl-side #gws_ov #th_chips { width: min(980px, calc(90vw - var(--pl-w))); } }
@media (max-height: 520px) {      /* short frames: a tighter column */
  body.gws-pl-side #gws_players { gap: 7px; padding: 10px 10px 8px; }
  body.gws-pl-side #gws_players .pl-now { padding: 8px 10px 9px 12px; } body.gws-pl-side #gws_players .pl-name { margin: 5px 0 6px; font-size: 16px; }
  body.gws-pl-side #gws_players .pl-line li { min-height: 23px; padding: 3px 8px; } body.gws-pl-side #gws_players .pl-watch { padding: 7px 8px; }
}
/* the HUD top band has less room beside the column: the compact band of public_theme.css (max-width: 1239px), by width left */
body.gws-bandc #gws_top button.act kbd { display: none; }
body.gws-bandc #gws_top button.act { padding: 0 10px; }
body.gws-bandc #gws_top .pill { font-size: 0; gap: 0; padding: 0 9px; }
body.gws-bandc #gws_top .chip-task .lab { display: none; }
body.gws-bandc #gws_top select { max-width: 20vw; }
body.gws-bandc #gws_top .actions { gap: 4px; }

/* ---- in the page flow, below the views (full page < 1100 px; on the landing under START) ---- */
body.gws-pl-below #gws_players { position: relative; width: 100%; max-width: 640px; margin: 14px auto 8px; padding: 12px 14px 10px; justify-self: center;
  background: var(--panel); box-shadow: var(--shadow); border-radius: var(--r); }
body.gws-pl-below #gws_land #gws_players { margin-top: 26px; text-align: left; }

/* ---- one line along the bottom of a small /embed frame ---- */
body.gws-pl-strip #gws_players { position: fixed; left: 0; right: 0; bottom: 0; height: 22px; z-index: 40; padding: 0 8px; gap: 0; flex-direction: row; align-items: center;
  background: var(--panel); box-shadow: 0 -1px 0 var(--line); }
body.gws-pl-strip #gws_players > :not(.pl-strip) { display: none; }
body.gws-pl-strip #gws_players .pl-strip { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: var(--fw-reg) 10.5px/22px var(--f-label); color: var(--dim); }
#gws_players .pl-strip b { color: var(--text); } #gws_players .pl-strip b.y { color: var(--accent-2); }
#gws_players .pl-strip i.d { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--live); vertical-align: 1px;
  animation: gws-live var(--pulse-live) ease-in-out infinite; }
body.gws-pl-strip.gws-theater main { height: calc(100vh - 22px) !important; }
@media (max-height: 240px) {      /* tiny frame (the website on a phone, 348 x 195): the picker keeps START above the strip */
  body.gws-simple.gws-pl-strip.gws-pick #gws_ov .hint p.mdesc { display: none; }
  body.gws-simple.gws-pl-strip.gws-pick #gws_ov .hint { padding-top: 22px; }
}
