/* The Indigo Series Challenge (/baseball, indigo/ui.js): broadcast.css does the work (the challenge panel, scorebug,
   reels, pick pop-up, results and leaderboard are football's); this is the little that differs. Its color is indigo,
   where the 17–0 Challenge's is gold and the 151 Challenge's red. */
:root {
  --indigo: #8f9bff;
  --indigo-fill: #4f5bd5;
  --indigo-hover: #6470e6;
  --indigo-soft: rgba(143, 155, 255, 0.16);
  --indigo-line: rgba(143, 155, 255, 0.55);
}

/* the mode menu's cell */
.mode-indigo b { color: var(--indigo); }
.mode-indigo[aria-current="page"] { background: var(--indigo-fill); color: #fff; }
.mode-indigo[aria-current="page"] b { color: #fff; }
.mode-indigo[aria-current="page"] > span { color: #dfe3ff; }
@media (min-width: 1000px) and (min-height: 560px) {
  .mode-indigo[aria-current="page"] > span { color: inherit; }
}
/* (baseball's menu has three cells, so "Series" stays at every width, where football's "17–0" drops "Challenge") */
.title-block h1 .nindigo { color: var(--indigo); }

/* the panel in the challenge's color: the scorebug's round, the ticks, the call to place a pick, Choose a Pokémon */
body.game-indigo .bug-round { background: var(--indigo-fill); color: #fff; }
body.game-indigo .ticks { grid-template-columns: repeat(14, 1fr); }
body.game-indigo .ticks i.done { background: var(--indigo); }
body.game-indigo .ticks i.now { background: rgba(143, 155, 255, 0.4); }
body.game-indigo .squares { grid-template-columns: repeat(21, 1fr); gap: 2px; }
body.game-indigo .callout { border-color: var(--indigo-line); color: var(--indigo); }
body.game-indigo #dp-choose { background: var(--indigo-fill); color: #fff; }
body.game-indigo #dp-choose:hover:not(:disabled) { background: var(--indigo-hover); }
body.game-indigo .pick-card { border-color: var(--indigo-line); }
body.game-indigo .roll-card { --ring: var(--indigo); --ring-soft: var(--indigo-soft); --ring-glow: rgba(143, 155, 255, 0.25); }
.bests dd.perfect { color: var(--gold); }

/* the season being played: the scorebug (SEASON · the game · the record so far) and a bar */
.bug.sim { border-color: var(--indigo-line); }
.bug.sim .bug-final { background: var(--indigo-fill); color: #fff; }
.bug.sim .bug-name { overflow: hidden; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.sim-bar { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.sim-bar i { display: block; height: 100%; width: 4%; border-radius: 3px; background: var(--indigo); transition: width 0.25s ease-out; }
/* (the server's season: no count to follow, so the bar runs on its own until the reply comes) */
.sim-bar i.wait { width: 30% !important; animation: sim-wait 1.4s ease-in-out infinite alternate; }
@keyframes sim-wait { from { transform: translateX(-100%); } to { transform: translateX(330%); } }
@media (prefers-reduced-motion: reduce) {
  .sim-bar i.wait { animation: none; transform: none; }
  .sim-bar i { transition: none; }
}
body:not([data-dp="sim"]) .sim-bar { display: none; }
.bug.final.champs .bug-final { background: var(--gold); }
.bug.final:not(.champs) { border-color: var(--indigo-line); }
.bug.final:not(.champs) .bug-final { background: var(--indigo-fill); color: #fff; }

/* ======================================================================================== the season's details */
.ib-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2px 0 10px;
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--tag);
  font-family: var(--rc);
  text-transform: uppercase;
}
.ib-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--nav);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase; /* (buttons don't take it from the bar) */
  white-space: nowrap;
}
.ib-tabs button + button { border-left: 1px solid var(--tag-border); }
.ib-tabs button:hover { background: var(--hover); }
.ib-tabs button[aria-selected="true"] { background: var(--indigo-fill); color: #fff; }
.ib-tabs button:focus-visible { outline-offset: -3px; }
@media (max-width: 359px) {
  .ib-tabs button { font-size: 12.5px; }
}
.ib-panel { margin-bottom: 12px; }
.ib-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--subtle); }
.ib-sw { display: inline-block; flex: none; width: 10px; height: 10px; margin-right: 7px; border: 2px solid; border-radius: 3px; vertical-align: -1px; }
.ib-seed {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 3px;
  border-radius: 4px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--rc);
  font-size: 11.5px;
  font-weight: 800;
}

/* standings */
.ib-standings, .ib-line, .ib-bat, .ib-arm { width: 100%; border-collapse: collapse; font-family: var(--rc); font-variant-numeric: tabular-nums; }
.ib-standings th, .ib-standings td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ib-standings th { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--subtle); }
.ib-standings td { font-size: 15px; font-weight: 700; }
.ib-standings .club { width: 100%; text-align: left; }
.ib-standings td.club { display: flex; align-items: center; min-width: 0; text-transform: uppercase; }
.ib-standings td.club span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ib-standings .rk { color: var(--subtle); text-align: center; }
.ib-standings tr.me td { background: rgba(242, 194, 48, 0.08); color: var(--text); }
.ib-standings tr.me td.club span { color: var(--gold); }
.ib-standings tr.cut td { border-bottom: 2px dashed var(--indigo-line); }
.ib-standings .pos { color: var(--win); }
.ib-standings .neg { color: var(--red); }

/* the playoffs: a card per series */
#ib-playoffs { display: grid; gap: 8px; }
.ib-series { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-family: var(--rc); }
.ib-series.mine { border-color: rgba(242, 194, 48, 0.45); }
.ib-series-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; text-transform: uppercase; }
.ib-series-head b { font-size: 15px; font-weight: 800; color: var(--indigo); }
.ib-series-head span { overflow: hidden; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ib-series-team { display: flex; align-items: center; gap: 0; min-height: 28px; font-size: 16px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.ib-series-team .ib-seed { margin: 0 8px 0 0; }
.ib-series-team span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ib-series-team b { font-size: 20px; font-weight: 800; }
.ib-series-team.won { color: var(--text); }
.ib-series-games { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 13px; font-weight: 700; color: var(--subtle); }

/* box scores */
.ib-box-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ib-chip {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--ghost-border);
  border-radius: 5px;
  background: var(--tag);
  color: var(--muted);
  font-family: var(--rc);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}
.ib-chip:hover { color: var(--text); border-color: var(--hover-border); }
.ib-chip[aria-pressed="true"] { background: var(--indigo-fill); border-color: var(--indigo-fill); color: #fff; }
.ib-box-title { margin: 0 0 8px; font-family: var(--rc); font-size: 15px; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.ib-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.ib-line { margin-bottom: 12px; }
.ib-line th, .ib-line td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; font-weight: 700; }
.ib-line th { font-size: 12px; color: var(--subtle); }
.ib-line .club { text-align: left; }
.ib-line .rhe { font-weight: 800; color: var(--text); }
.ib-line th.rhe, .ib-line td.rhe:first-of-type { border-left: 1px solid var(--line); }
.ib-line tr.me td { color: var(--gold); }
.ib-side { margin-bottom: 14px; }
.ib-bat caption { padding: 0 0 4px; font-size: 14px; font-weight: 800; text-align: left; text-transform: uppercase; color: var(--text); }
.ib-side.me .ib-bat caption { color: var(--gold); }
.ib-bat th, .ib-bat td, .ib-arm th, .ib-arm td { min-width: 30px; padding: 4px 4px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
@media (max-width: 420px) {
  .ib-bat th, .ib-bat td, .ib-arm th, .ib-arm td { min-width: 25px; padding: 4px 3px; }
}
.ib-bat th, .ib-arm th { font-size: 11.5px; color: var(--subtle); text-transform: uppercase; }
.ib-bat .nm, .ib-arm .nm { width: 100%; max-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.ib-bat td.nm, .ib-arm td.nm { text-transform: uppercase; }
.ib-bat td.nm small, .ib-arm td.nm small { margin-left: 6px; font-size: 11.5px; color: var(--subtle); }
/* a shiny of the run's, by its name */
.ib-shy { margin-left: 4px; font-style: normal; color: #ffd34d; text-shadow: 0 0 6px rgba(255, 211, 77, 0.55); }
.ib-bat tr.tot td { color: var(--muted); }
.ib-arm { margin-top: 6px; }
.ib-box-notes { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* the season's games */
.ib-games { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.ib-games li {
  display: grid;
  grid-template-columns: 22px 16px 62px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  font-family: var(--rc);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.ib-games .wk { font-size: 12px; color: var(--subtle); }
.ib-games .res { font-weight: 800; }
.ib-games .win .res { color: var(--win); }
.ib-games .loss .res { color: var(--red); }
.ib-games .opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 600px) {
  .ib-games { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(11, auto); grid-auto-flow: column; gap: 4px 10px; }
}

/* the leaderboard: one board (no challenge tabs), a star by a champion's record */
.ib-board-name { display: flex; }
.ib-board-name span { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; line-height: 1; background: var(--indigo-fill); color: #fff; }
.ib-board-name b { font-size: 17px; font-weight: 800; }
.ib-board-name small { font-size: 10.5px; font-weight: 700; color: #dfe3ff; white-space: nowrap; }
.ib-cup { margin-right: 4px; font-size: 0.8em; font-style: normal; color: var(--gold); }
@media (min-width: 1000px) and (min-height: 560px) {
  .ib-board-name span { min-height: 50px; }
}
