/* one section style on every page, the same as the lists on Home and the Matches page: a title row, then the
   content on one card. Small cards inside a section (tiles, players, teams) sit on the tile colour. The coding
   screen keeps its own layout */

/* ---------------------------------------------------------------- every width: one card level */

.panel:not(.coder .panel, .level-side .panel) { padding: 0; background: var(--card); }
.panel:not(.coder .panel, .level-side .panel) > .panel-head { min-height: 0; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.panel:not(.coder .panel, .level-side .panel) > .panel-body { border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: none; }
.panel:not(.coder .panel, .level-side .panel) > .panel-body:only-child { border-radius: var(--radius-lg); }
/* sections that hold their cards directly (Top players, the Teams grid) */
.panel > .players-grid, .panel > .team-grid { padding: 12px 14px 14px; }
.panel .pcard, .panel .tcard { background: var(--tile); }
.panel a.tcard:hover { background: var(--tile-hover, var(--tile)); }

/* ---------------------------------------------------------------- phones: sections run edge to edge */

@media screen and (max-width: 760px) {
  .page, .page-cols, .dash, .team-page, .player-page, .pp-main, .pp-side, .match-page, .mp-body, .story-page, .story-main, .story-side-col { gap: 0; }

  /* the page headers too */
  .team-hero, .match-hero, .story-hero { margin: 0 -16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .team-hero, .story-hero { padding: 12px 16px 16px; }
  .match-hero { padding: 12px 16px 16px; }

  .panel:not(.coder .panel, .level-side .panel) { margin: 0 -16px; border-radius: 0; background: none; }
  .panel:not(.coder .panel, .level-side .panel) > .panel-head { padding: 16px 16px 8px; border-bottom: 0; }
  .panel:not(.coder .panel, .level-side .panel) > .panel-head .title { font-size: 18px; }
  .panel:not(.coder .panel, .level-side .panel) > :not(.panel-head) { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: var(--card); }
  .panel:not(.coder .panel, .level-side .panel) > .panel-body { padding: 12px 16px; }
  .panel:not(.coder .panel, .level-side .panel) > .panel-body:has(> .mlines.g) { padding: 0; }
  .panel > .players-grid, .panel > .team-grid { padding: 12px 16px; }
  /* a section with no title row (the story's text) starts a little lower */
  .panel:not(.coder .panel, .level-side .panel) > .panel-body:only-child { margin-top: 12px; }
}

/* a match counted from the tags an analyst sent: the mark, and for staff who sees it (the admin's switch) */
.mp-coded { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.coded-mark { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--tile); font-size: 12px; font-weight: 700; white-space: nowrap; }
.coded-mark .sh-mark { height: 9px; }
.coded-who { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 16%, var(--card)); color: var(--purple-ink); font-size: 11.5px; font-weight: 700; }
.coded-who.public { background: color-mix(in srgb, var(--win) 18%, var(--card)); color: var(--live); }
.coded-switch { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; cursor: pointer; }
.coded-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.coded-switch i { position: relative; width: 30px; height: 17px; border-radius: 999px; background: var(--box-line); transition: background 0.15s ease; }
.coded-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.coded-switch input:checked + i { background: var(--live); }
.coded-switch input:checked + i::after { transform: translateX(13px); }
.coded-switch input:focus-visible + i { outline: 2px solid var(--purple); outline-offset: 2px; }
.coded-switch small { color: var(--ink-3); font-size: 11px; }
@media screen and (max-width: 760px) {
  .coded-switch small { display: none; }
}

/* the Team Report's match list: a match counted from sent tags, and for staff whether it is public */
.rc-flag { display: inline-block; margin-top: 3px; margin-right: 4px; padding: 1px 7px; border-radius: 999px; background: var(--tile); color: var(--ink-2); font-size: 10.5px; font-style: normal; font-weight: 700; }
.rc-flag.staff { background: color-mix(in srgb, var(--purple) 16%, var(--card)); color: var(--purple-ink); }
