/* Scouting Report (under Preparation): one team on a page. The tables, brawler chips and match rows are Head 2 Head's
   (styles/headtohead.css, loaded first); this file is the page around them. */

.sc-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px var(--pad) 96px;
}

.sc-page .page-head { margin-bottom: 12px; }
.sc-page .page-title { font-size: clamp(30px, 4vw, 44px); }

/* the team picker */
.sc-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.sc-bar .fld { display: flex; min-width: 260px; }
.sc-bar .fld span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sc-bar select {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 8px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color-scheme: dark;
    font: 700 14px var(--font-body);
}
.sc-bar .btn, .sc-bar .export-actions { height: 40px; box-sizing: border-box; }
.sc-bar .btn { display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; margin: 0; }
.sc-bar .export-actions { margin: 0; flex-wrap: nowrap; }

.sc-empty { text-align: center; padding: 40px 0; }

/* the report: stacked cards */
.sc-report { display: flex; flex-direction: column; gap: 16px; }

/* On a narrow screen the maps / players / bans wrappers dissolve and the cards stack in the order below. On a wide one (see the end of this
   file) the maps table sits beside the players and the bans, so more of the report is in view at the same time. */
.sc-split, .sc-stack { display: contents; }
#players { order: 1; }
#maps { order: 2; }
.sc-cols { order: 3; }
#bans { order: 4; }
#recent { order: 5; }
.sc-report > .h2h-credit { order: 6; }

.sc-card {
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 0;
}
.sc-card h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--text); }
.sc-note { margin: -4px 0 10px; font-size: 12px; text-align: center; }
.sc-none { margin: 6px 0; text-align: center; font-size: 13px; }

/* who they are and how they are doing */
.sc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.sc-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sc-logo { width: 84px; height: 84px; object-fit: contain; }
.sc-name { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; }
.sc-meta { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }
.sc-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.sc-tile { display: flex; flex-direction: column; min-width: 130px; padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sc-tile strong { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--primary); }
.sc-tile span { margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sc-tile small { font-size: 12px; color: var(--text-dim); }
.sc-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sc-form-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sc-form-chips { display: flex; gap: 6px; }
.sc-chip { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.sc-chip--win { background: rgba(174, 232, 117, 0.18); color: var(--primary); }
.sc-chip--loss { background: rgba(255, 122, 122, 0.16); color: #ff7a7a; }

/* how the sets ended: 2-0, 2-1 (won) and 1-2, 0-2 (lost), each with how many */
.sc-score { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.sc-score b { font-weight: 800; }
.sc-score small { font-size: 11.5px; font-weight: 700; opacity: 0.85; }
.sc-score--win { background: rgba(174, 232, 117, 0.18); color: var(--primary); }
.sc-score--loss { background: rgba(255, 122, 122, 0.16); color: #ff7a7a; }

/* the players */
.sc-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.sc-player { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.sc-photo { flex-shrink: 0; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; object-position: top center; background: var(--surface-3); }
.sc-photo--none { display: block; }
.sc-player-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sc-player-body b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-rank { align-self: flex-start; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--rank, #8f98a9) 22%, transparent); color: var(--rank, var(--text-dim)); font-size: 11.5px; font-weight: 800; }
.sc-rank--none { --rank: #8f98a9; font-weight: 600; }
.sc-fav, .sc-mappicks { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-fav-item { display: inline-flex; align-items: center; gap: 3px; }
.sc-fav-item small { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.sc-pstat { font-size: 12px; color: var(--text-dim); }
.sc-pstat b { font-weight: 800; }
/* a favourite with its picks and, under them, its win rate */
.sc-fav--stats { gap: 6px 8px; }
.sc-fav--stats .sc-fav-item { flex-direction: column; align-items: center; gap: 1px; }
.sc-fav--stats small { line-height: 1.15; }
.sc-player .h2h-brawler { width: 36px; height: 26px; }
.sc-mappicks .h2h-brawler { width: 40px; height: 28px; }

/* the maps, with the game modes (one tile each, in the colour of the mode) above them */
.sc-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.sc-mode { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 12px 5px; background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--mode); border-radius: var(--radius-sm); }
.sc-mode small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mode); }
.sc-mode b { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.sc-mode span { font-size: 11px; color: var(--text-dim); }
.sc-maptable { width: 100%; }
.sc-maptable th.sc-th-picks { text-align: left; }
.sc-maptable td { height: 44px; }
.sc-mapcell { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sc-mapcell > span { display: flex; flex-direction: column; line-height: 1.2; }
.sc-mapcell b { font-size: 13px; }
.sc-mapcell small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.sc-mapthumb { height: 36px; width: auto; border-radius: 6px; }
.sc-tag { padding: 1px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.sc-tag--best { background: rgba(174, 232, 117, 0.18); color: var(--primary); }
.sc-tag--worst { background: rgba(255, 122, 122, 0.16); color: #ff7a7a; }

/* four tables side by side (the first, with a column for each player, a little wider) */
.sc-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sc-cols .sc-card { overflow-x: auto; scrollbar-width: thin; }

/* the bans */
.sc-seg { display: flex; justify-content: center; width: fit-content; max-width: 100%; margin: 0 auto 10px; padding: 3px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); }
.sc-seg-btn { padding: 5px 14px; border: 0; border-radius: 99px; background: none; color: var(--text-dim); font: 700 12px var(--font-body); cursor: pointer; white-space: nowrap; }
.sc-seg-btn:hover { color: var(--text); }
.sc-seg-btn[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); }
.sc-bans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sc-banbox h4 { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--text-dim); }

/* the recent matches: a row each, with the map at the end */
.sc-matches { width: fit-content; max-width: 100%; margin: 0 auto; }
.sc-match-map { margin-left: 8px; font-size: 12px; color: var(--text-dim); white-space: nowrap; }

@media (min-width: 1200px) {
    .sc-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; order: 1; }
    .sc-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
    #players, #maps, #bans { order: 0; }
    .sc-cols { order: 2; }
    #recent { order: 3; }
    .sc-report > .h2h-credit { order: 4; }
    /* beside the maps the players are one card under the other (not a grid), and the bans' two lists share a narrower card */
    .sc-stack .sc-players { grid-template-columns: minmax(0, 1fr); }
    .sc-stack .sc-bans { gap: 14px; }
}

/* (Four tables side by side need ~1300px: at 1101-1290px the duo tables (~255px) and, with four players, the Most picked table (~359px) were cut off by their cards.) */
@media (max-width: 1300px) {
    .sc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* (Two cards side by side only from 821px: below that each has under ~330px, and the Most picked table with four player columns (~355px) was cut off
   by its card's edge. A narrower tablet gets the single column.) */
@media (max-width: 820px) {
    .sc-cols { grid-template-columns: minmax(0, 1fr); }
}

/* the cards' tables and match rows fit each card's own width (the rules are in headtohead.css, @container) */
@supports (width: 1cqw) {
    @media (max-width: 1100px) {
        .sc-card { container-type: inline-size; }
    }
}

@media (max-width: 700px) {
    .sc-page { padding-top: 18px; }
    .sc-cols, .sc-bans { grid-template-columns: minmax(0, 1fr); }
    .sc-card { padding: 14px; overflow-x: auto; }
    .sc-bar .fld { min-width: 0; flex: 1 1 100%; }
}
