/* ParlayDesk — styles the Game Center shares between the app (/apps,
   loaded right after styles.css) and the public Game Center pages
   (unified Game Center architecture, 2026-11-16). Moved here unchanged
   from apps/styles.css and apps/research.css so both experiences render
   the Teams directory, empty states, the PRO pill and screen-reader text
   from ONE definition. Game Center's own look is /apps/gameCenterHub.css
   (also loaded by both). */

.pd-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.schedule-empty{
  opacity: .6;
  padding: 20px 0;
}


/* Schedule → Teams (NHL, signed-in discovery 2026-11-09): the public
   Schedule's Teams card as an in-app directory. Card language of the
   Schedule cards; team colour only in the badge; ParlayDesk blue for
   search focus and hover. */
.schedule-teams-item[hidden],
.schedule-teams-none[hidden]{ display: none; }
.schedule-teams-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.schedule-teams-count{
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.schedule-teams-search{
  position: relative;
  max-width: 420px;
  margin: 0 0 16px;
}
.schedule-teams-search-icon{
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.schedule-teams-input{
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 12px;
  background: rgba(2,6,23,.55);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* ≥16px: no iOS zoom on focus */
}
.schedule-teams-input::placeholder{ color: #7a889e; }
.schedule-teams-input:focus{
  outline: none;
  border-color: rgba(96,165,250,.7);
  box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}
.schedule-teams-list{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 1100px) {
  .schedule-teams-list{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .schedule-teams-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
/* Phones: one column, like the Schedule cards — full names on one line. */
@media (max-width: 640px) {
  .schedule-teams-list{ grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
.schedule-team-link{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  box-sizing: border-box;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.schedule-team-badge{
  --tb-h: 28px;
  --tb-w: 52px;
}
.schedule-team-name{
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: break-word;
  transition: color 150ms ease;
}
.schedule-team-arrow{
  flex: none;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  transition: color 150ms ease, transform 150ms ease;
}
.schedule-team-link:hover{
  border-color: rgba(96,165,250,.55);
  background-color: rgba(59,130,246,.08);
}
.schedule-team-link:hover .schedule-team-name,
.schedule-team-link:focus-visible .schedule-team-name,
.schedule-team-link:hover .schedule-team-arrow,
.schedule-team-link:focus-visible .schedule-team-arrow{ color: #93c5fd; }
.schedule-team-link:hover .schedule-team-arrow,
.schedule-team-link:focus-visible .schedule-team-arrow{ transform: translateX(2px); }
.schedule-team-link:focus-visible{
  outline: 2px solid var(--accent2, #60a5fa);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .schedule-team-link{ min-height: 48px; padding: 8px 12px; gap: 12px; }
  .schedule-team-badge{ --tb-h: 26px; --tb-w: 50px; }
  .schedule-team-name{ font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .schedule-team-link, .schedule-team-name, .schedule-team-arrow{ transition: none; }
}

/* The outlined gold PRO pill (Research, Game Center). */
.rp-pro {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border: 1px solid rgba(245, 180, 0, 0.45);
  border-radius: 999px;
  color: #f5b400;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: 3px;
}

/* ── Schedule (moved unchanged from apps/styles.css, 2026-11-16) ── */
.pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.pill.live { background: rgba(34,197,94,0.2); color:#4ade80; }
.pill.upcoming { background: rgba(59,130,246,0.2); color:#93c5fd; }
.pill.final { background: rgba(148,163,184,0.2); color:#e5e7eb; }
.pill.dead { background: rgba(239,68,68,0.2); color:#f87171; }


/* ---------- Schedule page ----------
   Approved Schedule & Results design (2026-11-07): compact matchup cards in
   a grid (3 / 2 / 1 columns), each team on its own row behind its
   team-colored badge (/team-badges.css), status on top, actions below a
   divider. One structure for live, upcoming and final cards. */
.schedule-section{
  margin-bottom: 24px;
}
.schedule-section-title{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .65;
  margin: 0 0 10px;
}
.schedule-section-sub{
  font-weight: 600;
}
.schedule-date-group{
  margin-bottom: 26px;
}
.schedule-date-group-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 12px;
}
.schedule-date-group-title{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
  opacity: .9;
}
.schedule-date-group-count{
  flex: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.schedule-card-list{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px) {
  .schedule-card-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .schedule-card-list{ grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
.schedule-card{
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.schedule-card--live{
  border-color: rgba(34,197,94,.4);
  background: linear-gradient(180deg, rgba(34,197,94,.08), rgba(34,197,94,.03));
}
/* Head: time + status pill (upcoming), LIVE + clock, FINAL. */
.schedule-card-status{
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}
.schedule-card-time{
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.schedule-card-state{
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(148,163,184,.14);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.schedule-card-state--warn{ background: rgba(251,191,36,.14); color: #fde68a; }
.schedule-card-status .pill{
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.schedule-card-clock{
  font-size: 13px;
  font-weight: 600;
  opacity: .85;
}
/* An MLB doubleheader's "Game 2" (gc-scoring, 2026-11-16). */
.schedule-card-dh{
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}
/* Teams: badge · name (★) ……… score. */
.schedule-card-teams{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.schedule-card-team{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
/* Min widths fit the widest code (CHW, MEM) so every name lines up. */
.schedule-card-badge{
  --tb-h: 30px;
  --tb-w: 60px;
}
/* The name wraps inside its own box; the team's ★ never drops to a line of
   its own and sits level with the name's last line. */
.schedule-card-team-name{
  display: flex;
  align-items: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.schedule-card-team-name .pd-fav-btn{ flex: none; margin-top: -5px; margin-bottom: -5px; }
/* Team name → the team's page (2026-11-13). Same text and colour as before;
   the link shows on hover / focus. The badge link adds no box of its own. */
.schedule-card-team-link{
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
/* Hover = colour change only, like the public pages (owner, 2026-11-15). */
.schedule-card-team-link{ transition: color 150ms; }
.schedule-card-team-link:hover{ color: #93c5fd; }
.schedule-card-team-link:focus-visible{ outline: 2px solid #60a5fa; outline-offset: 2px; color: #93c5fd; }
.schedule-card-badge-link{ display: contents; color: inherit; }
.schedule-card-badge-link:hover + .schedule-card-team-name .schedule-card-team-link{ color: #93c5fd; }
.schedule-card-team-score{
  flex: none;
  margin-left: auto;
  min-width: 24px;
  text-align: right;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
/* Results: the winner reads strongest; the other side is quieter. */
.schedule-card--final .schedule-card-team{
  color: var(--muted);
  font-weight: 500;
}
.schedule-card--final .schedule-card-team.is-winner{
  color: var(--text);
  font-weight: 700;
}
/* Actions: Game Center → on the left, Build Parlay on the right. */
.schedule-card-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.16);
}
.schedule-view-btn{
  box-sizing: border-box;
  text-decoration: none;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: -6px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #60a5fa;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.schedule-view-arrow{ transition: transform 150ms ease; }
.schedule-view-btn:hover{ color: #93c5fd; }
.schedule-view-btn:hover .schedule-view-arrow{ transform: translateX(2px); }
/* One box for both forms (2026-11-16 polish): signed in it is a <button>,
   signed out an <a> to sign-in. An <a> is inline, so without display it
   ignored min-height and its label sat high in a shorter pill; inline-flex
   centres the label and gives every card the same footer height. */
.schedule-build-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: none;
  text-decoration: none;
  line-height: 1.2;
  margin-left: auto;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(96,165,250,.5);
  border-radius: 999px;
  background: rgba(30,58,138,.55);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.schedule-build-btn:hover{
  color: #fff;
  text-decoration: none;
  background: rgba(37,99,235,.55);
  border-color: rgba(147,197,253,.65);
}
.schedule-view-btn:focus-visible,
.schedule-build-btn:focus-visible{
  outline: 2px solid var(--accent2, #60a5fa);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .schedule-view-arrow{ transition: none; }
}
.schedule-tabs{
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}
.schedule-tabs .stats-toggle-btn{
  height: 34px;
}
.schedule-tabs .stats-toggle-btn:focus-visible{
  outline: 2px solid var(--accent2, #60a5fa);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .schedule-card{ padding: 14px 14px 12px; gap: 12px; }
  .schedule-card-team{ font-size: 15.5px; gap: 10px; }
  .schedule-card-badge{ --tb-h: 28px; --tb-w: 57px; }
  .schedule-card-team-score{ font-size: 20px; }
  .schedule-build-btn{ min-height: 40px; }
  .schedule-view-btn{ min-height: 40px; }
}
/* Narrow phones: Game Center → and Build Parlay still share one row,
   inside the card's padding, each a full-height target. */
@media (max-width: 374px) {
  .schedule-card-team{ font-size: 15px; }
  .schedule-card-badge{ --tb-h: 26px; --tb-w: 54px; }
  .schedule-view-btn{ font-size: 14px; gap: 4px; }
  .schedule-build-btn{ padding: 0 13px; font-size: 13.5px; }
}
.schedule-results-error p{
  margin: 0 0 10px;
}
/* Schedule search: no match (2026-11-11). Full opacity (the button stays
   readable); the query line, a hint, Clear search. */
.schedule-empty.schedule-search-empty{ opacity: 1; color: var(--muted); }
.schedule-search-empty p{ margin: 0 0 4px; }
.schedule-search-empty p:first-child{ color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.schedule-search-empty .schedule-search-hint{ margin-bottom: 12px; font-size: 13px; }
.schedule-search-empty .schedule-view-btn,
.schedule-results-error .schedule-view-btn{
  margin-left: 0;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text);
}

/* ===============================
   STATS VIEW MODE TOGGLE
   =============================== */

.stats-toggle-btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--muted);

  cursor: pointer;
  transition: all .18s ease;
}

.stats-toggle-btn:hover {
  background: rgba(255,255,255,.08);
}

.stats-toggle-btn.active {
  background: rgba(59,130,246,.22);
  border-color: rgba(59,130,246,.45);
  color: #fff;
}

/* Favorites ★ on Schedule cards (v1.7, /pd-favorites.css owns the control). */
.schedule-card .pd-fav-btn { margin-left: 2px; }
/* A full slate is dozens of empty ☆, so on Schedule only an unsaved star is
   quiet: with a mouse it shows on that team's hover or keyboard focus; on
   touch it stays visible but dimmed. Opacity only — the button keeps its
   space (no shift) and stays in the tab order. A saved ★ always shows. */
.schedule-card .pd-fav-btn[data-fav-on="false"] { opacity: .6; transition: color 120ms ease, background-color 120ms ease, transform 120ms ease, opacity 120ms ease; }
@media (hover: hover) and (pointer: fine) {
  .schedule-card .pd-fav-btn[data-fav-on="false"] { opacity: 0; }
  .schedule-card-team:hover .pd-fav-btn[data-fav-on="false"],
  .schedule-card .pd-fav-btn[data-fav-on="false"]:focus-visible { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .schedule-card .pd-fav-btn[data-fav-on="false"] { transition: none; }
}
/* The away and home rows sit 10px apart, so the shared 40px touch
   extension would overlap the other row's star; here it only widens the
   target (40 × 28). */
@media (pointer: coarse) {
  .schedule-card .pd-fav-btn::after { inset: 0 -6px; }
}


/* ---------- Schedule: game opened from Favorites (?game=) ---------- */
.schedule-card--focus{
  border-color: rgba(96,165,250,.6);
  box-shadow: 0 0 0 2px rgba(96,165,250,.22);
}
.schedule-card--focus:focus{ outline: none; }
.schedule-card--focus:focus-visible{ outline: 2px solid var(--accent2, #60a5fa); outline-offset: 2px; }

.schedule-tabs .stats-toggle-btn[hidden]{ display: none; }
/* Headerless (2026-11-15 rollout; moved from app.html 2026-11-16 so the
   public schedule renders it identically): the heading stays for assistive
   tech, visually hidden. */
#scheduleView .schedule-head {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}
