/**
 * The United States page: /sports/ (HUB SCOPES step 4). Markup: includes/seo-sports-hub-us.php.
 * Builds on sports.css (the .cct-sports-sb-* game card and crest, .cct-sports-hl-games, the rating footnote) and
 * uses its own .cct-us-* names for everything else, so it stands without sports-hub.css's layout rules.
 * Same literal palette as the other sports pages. The approved mockup (scratchpad/sports-hub-mockup.html, view "us")
 * is the visual spec.
 */

.cct-us-band {
    /* Title left, scope toggle right; the toggle wraps under the title on a narrow screen (Justin 11-02). */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #F8FAFC;
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0 0 18px;
}

.cct-us-title {
    margin: 0;
    font-size: 30px;
    font-weight: 750;
    line-height: 1.12;
    color: #fff;
}


/* ---- sections ---- */
.cct-us-section {
    margin: 0 0 34px;
}

.cct-us-section > header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0 0 12px;
}

.cct-us-h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: #1A1A2E;
}

.cct-us-note {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
}

.cct-us-more {
    font-size: 13.5px;
    color: #046BD2;
    text-decoration: none;
}

/* ---- game cards (the shared .cct-sports-sb-card, in a grid) ---- */
.cct-us-games {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

.cct-us-games .cct-sports-sb-card {
    margin: 0;
    padding: 8px 12px;
    min-width: 0;
    position: relative;
    overflow: hidden;   /* the ball is clipped by the card, never widens it */
}

/* Header (11-02): league left, date/time right, EACH ONE LINE on every card. The league gives way first (ellipsis, a last
   resort); the date never wraps. Overrides sports.css's wrap rule for this page only (league pages keep theirs). */
.cct-us-games .cct-sports-sb-top {
    font-size: 10.5px;
    margin-bottom: 4px;
    flex-wrap: nowrap;
    align-items: baseline;
    position: relative;
    z-index: 1;
}

.cct-us-lg {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cct-us-when {
    flex: none;
    white-space: nowrap;
    margin-left: auto;
}

/* The sport ball: the scoreboard card's watermark glyphs (sportIcons, scoreboard-component.js) at its 14% opacity, centred
   behind the text. The text sits above it (z-index), so contrast is the card's own. */
.cct-us-game[data-ball]::after {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 46px;
    line-height: 1;
    opacity: 0.14;
    pointer-events: none;
    z-index: 0;
}
.cct-us-game[data-ball="football"]::after { content: "\1F3C8"; }
.cct-us-game[data-ball="basketball"]::after { content: "\1F3C0"; }
.cct-us-game[data-ball="baseball"]::after { content: "\26BE"; }
.cct-us-game[data-ball="hockey"]::after { content: "\1F3D2"; }
.cct-us-game[data-ball="soccer"]::after { content: "\26BD"; }
.cct-us-game[data-ball="lacrosse"]::after { content: "\1F94D"; }
.cct-us-game[data-ball="volleyball"]::after { content: "\1F3D0"; }
.cct-us-game[data-ball="softball"]::after { content: "\1F94E"; }

.cct-us-games .cct-sports-sb-team {
    align-items: center;
    padding: 2px 0;
    position: relative;
    z-index: 1;
}

.cct-us-games .cct-sports-sb-name {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.cct-us-games .cct-sports-sb-name {
    flex: 1 1 auto;
    overflow: hidden;
}

.cct-us-games .cct-sports-sb-name a {
    min-width: 0;
    overflow: hidden;   /* the linked name ellipsizes inside the row, never pushes the score */
    display: flex;
}

.cct-us-nm {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cct-us-games .cct-sports-sb-score {
    flex: none;
}

/* A final's score links out to its box score: still the score, with a dotted underline (the team page's pattern). */
.cct-sports-sb-score a {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

/* ---- top cards: a big league's 10 (two across), the rest's 3 (a denser grid) ---- */
.cct-us-tops {
    display: grid;
    gap: 12px;
}

.cct-us-tops-big {
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.cct-us-tops-more {
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));   /* 11-05: 260 gave FOUR across at 1180 and cut 'Vancouver Whitecap...'; 300 gives three */
    gap: 10px;
}

.cct-us-tops-big + .cct-us-tops-more {
    margin-top: 12px;
}

.cct-us-top {
    min-width: 0;
    background: #fff;
    border: 1px solid #E8E6EF;
    border-radius: 8px;
    overflow: hidden;
}

.cct-us-top h3 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A2E;
    background: #F8FAFC;
    border-bottom: 1px solid #E8E6EF;
}

.cct-us-top h3 a,
.cct-us-top h3 span {
    font-size: 12.5px;
    font-weight: 400;
    white-space: nowrap;
}

.cct-us-top h3 a {
    color: #046BD2;
    text-decoration: none;
}

.cct-us-top h3 span {
    color: #8E8EA0;
}

.cct-us-top ol {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.cct-us-top li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto 28px;
    gap: 6px;
    align-items: center;
    padding: 3px 12px;
    font-size: 13px;
}

.cct-us-top3 li {
    grid-template-columns: 22px minmax(0, 1fr) auto 28px;
}

.cct-us-rk {
    color: #8E8EA0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cct-us-tn {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1A1A2E;
}

.cct-us-tn a {
    color: inherit;
    text-decoration: none;
}

.cct-us-tn a:hover {
    text-decoration: underline;
}

.cct-us-rec {
    color: #454560;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* The 0-100 Power Rating as a number (SAUD-1103, Justin 11-03: replaced a bar that read the same length down a top 10).
   Its colour is the shared rating ramp, inline from PHP (cct_sports_hub_town_rating_color); this is the fallback. */
.cct-us-rt {
    color: #1A1A2E;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ---- the ladder ---- */
.cct-us-ladder {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
}

.cct-us-rung {
    min-width: 0;
    background: #fff;
    border: 1px solid #E8E6EF;
    border-radius: 8px;
    padding: 10px 12px;
}

.cct-us-rung h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.cct-us-rung p {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.55;
    color: #454560;
}

.cct-us-rung a {
    color: #046BD2;
    text-decoration: none;
}

.cct-us-rung a:hover,
.cct-us-more:hover {
    text-decoration: underline;
}

.cct-us-minor {
    color: #6B7280;
    font-size: 12.5px;
}

.cct-us-footnote {
    max-width: 72ch;
    margin: 0 0 24px;
    font-size: 12px;
    color: #8E8EA0;
}

.cct-us-top a:focus-visible,
.cct-us-rung a:focus-visible,
.cct-us-more:focus-visible {
    outline: 2px solid #046BD2;
    outline-offset: 2px;
}

/* ---- phones: one column, cards stack, nothing scrolls sideways ---- */
@media (max-width: 640px) {
    .cct-us-band {
        padding: 16px 16px;
    }

    .cct-us-title {
        font-size: 25px;
    }

    .cct-us-games {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cct-us-games .cct-sports-sb-card {
        padding: 8px 9px;
    }

    /* Two cards a row leaves ~80 px per header item: league on one line, date under it, on EVERY card (same height). */
    .cct-us-games .cct-sports-sb-top {
        flex-direction: column;
        gap: 1px;
    }

    .cct-us-when {
        margin-left: 0;
    }

    .cct-us-game[data-ball]::after {
        font-size: 38px;
    }

    .cct-us-tops-big,
    .cct-us-tops-more,
    .cct-us-ladder {
        grid-template-columns: minmax(0, 1fr);
    }

    .cct-us-h2 {
        font-size: 19px;
    }
}


/* ---- Champions strip (SAUD-1102g, 11-02): one small card per league champion decided in the last 30 days ---- */
.cct-us-champs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.cct-us-champ {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 10px 12px;
}

.cct-us-champ-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cct-us-champ-team {
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cct-us-champ-team a {
    color: inherit;
}

.cct-us-champ-how {
    font-size: 13px;
    color: #475569;
}

/* Hub audit 11-05, phone fixes. BP2: one game card per row under 480 px (names were cut in two-up tiles). BP10: "T-10" stays on one line. */
@media (max-width: 480px) {
    .cct-us-games { grid-template-columns: minmax(0, 1fr); }
}
.cct-us-rk { white-space: nowrap; }
.cct-us-top li { grid-template-columns: 34px minmax(0, 1fr) auto 28px; }
