/* ==========================================================================
   css/sc-schedule-card.css — the coach app's schedule wears the Coach
   Portal's schedule (SCH1, Oct 11 2026). Markup: js/sc-schedule-card.js.

   The LAYOUT and COMPONENTS are platform3/team/schedule.html's — the
   "Next game" plate (.nextg: a labelled strip, a home-left / away-right
   scorebug with crests and the kick time in the middle, actions under it)
   and the schedule row (.sg: when rail · crest · vs/at · meta). The COLOURS
   are the coach app's: charcoal + grass green, --gc-* tokens only, no volt,
   no raw hex, no !important. Every rule is scoped under .scs-card (or the
   two list-level classes) so it outranks the legacy card rules the gate
   hook classes still match (.mobile-schedule-card, .schedule-game-card*,
   .practice-card-v2) without touching css/theme.css.

   Type voice: Saira Condensed (display) for names and section labels,
   Rajdhani (--gc-font-body) for UI text, Orbitron for NUMERALS ONLY (the kick
   time's digits — never "Time TBD", never a label).
   Controls: 48px action keys in a joined bar. No pills and no filled chips:
   RSVP counts are dot + text, Live / Cancelled is a bar + label.
   ========================================================================== */

/* ── day header: the portal card's h5 voice, a solid green bar, no fade ── */
.scs-dayhead,
.mobile-schedule-date-header.scs-dayhead {
    display: flex;
    align-items: center;
    gap: var(--gc-space-2);
    margin: var(--gc-space-5) 0 var(--gc-space-2);
    padding: 0;
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gc-text-color-secondary);
}
.scs-dayhead::before {
    content: '';
    flex: none;
    width: 3px;
    height: 14px;
    background: var(--gc-accent-primary);
}
.scs-list > .scs-dayhead:first-child,
#mobileScheduleList > .scs-dayhead:first-child { margin-top: 0; }

/* the Settings list is a single column of rows (the portal's list), not the
   old 320px card grid */
.scs-list,
.schedule-games-list.scs-list {
    display: block;
    min-width: 0;
}

/* ── the card ─────────────────────────────────────────────────────────── */
.scs-card,
article.scs-card.mobile-schedule-card,
article.scs-card.schedule-game-card,
article.scs-card.practice-card-v2 {
    display: block;
    position: relative;
    min-width: 0;
    margin: 0 0 var(--gc-space-3);
    padding: 0;
    background: var(--gc-bg-elevated);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    box-shadow: none;
    overflow: hidden;
    cursor: default;
    transform: none;
    transition: none;
}
.scs-card.schedule-game-card:hover,
.scs-card.practice-card-v2:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--gc-border-subtle);
}

/* screen-reader text (the row's day, the next card's "vs …") */
.scs-card .scs-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── the row: when rail · crest · vs/at + meta · status ─────────────────── */
.scs-card .scs-row,
.scs-card .scs-row.schedule-game-card-header {
    display: grid;
    grid-template-columns: 72px 40px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--gc-space-3);
    min-height: 64px;
    padding: var(--gc-space-3) var(--gc-space-4);
    background: none;
    border: 0;
}
.scs-card .scs-when {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.scs-card .scs-time,
.scs-card .scs-time.schedule-game-time {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-family: var(--gc-font-body);
    font-size: inherit;
    letter-spacing: 0;
    color: var(--gc-text-color-primary);
    white-space: nowrap;
}
.scs-card .scs-num {
    font-family: 'Orbitron', var(--gc-font-body);
    font-weight: 800;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}
.scs-card .scs-time small {
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gc-text-color-secondary);
}
.scs-card .scs-word {
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
    white-space: normal;
    line-height: 1.15;
}

.scs-card .scs-crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--gc-radius-sm);
    background: var(--gc-bg-sunken);
    overflow: hidden;
}
.scs-card .scs-crest img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.scs-card .scs-crest.is-initials {
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--gc-text-color-secondary);
}
.scs-card .scs-crest.is-practice { color: var(--gc-status-info); }
.scs-card .scs-crest.is-practice svg { width: 20px; height: 20px; }

.scs-card .scs-id,
.scs-card .scs-id.schedule-game-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;      /* children fill the column so the ellipsis can engage */
    text-align: left;
    min-width: 0;
    padding: 0;
    background: none;
}
.scs-card .scs-opp {
    display: block;
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 17px;
    line-height: 1.15;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--gc-text-color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scs-card .scs-meta {
    display: block;
    margin-top: 2px;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* STATUS (Live / Cancelled): a bar + label, never a filled chip */
.scs-card .scs-status {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2);
    padding: 0;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
    background: none;
}
.scs-card .scs-status::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--gc-border-strong);
}
.scs-card.is-live .scs-status { color: var(--gc-status-errorText); }
.scs-card.is-live .scs-status::before { background: var(--gc-status-error); }
.scs-card.is-cancelled .scs-opp { color: var(--gc-text-color-muted); }

/* postponed: the pill (js/sc-postponed.js) takes the kick slot */
.scs-card .scs-when .sc-postponed-pill { align-self: flex-start; }
.scs-card.is-postponed .scs-crest img { opacity: 0.45; filter: grayscale(0.6); }

/* ── the Next game: the portal's .nextg in coach tokens ──────────────────── */
.scs-card.is-next { border-color: var(--gc-border-default); }
.scs-card .scs-flag {
    display: flex;
    align-items: center;
    gap: var(--gc-space-3);
    padding: var(--gc-space-3) var(--gc-space-4) 0;
}
.scs-card .scs-flag span {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2);
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gc-accent-text);
}
.scs-card .scs-flag span::before {
    content: '';
    width: 3px;
    height: 13px;
    background: var(--gc-accent-primary);
}
.scs-card .scs-flag em {
    margin-left: auto;
    min-width: 0;
    font-style: normal;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gc-text-color-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scs-card .scs-strip,
.scs-card .scs-strip.schedule-game-card-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px var(--gc-space-3);
    padding: var(--gc-space-2) var(--gc-space-4) var(--gc-space-3);
    background: none;
    border: 0;
}
.scs-card .scs-strip b,
.scs-card .scs-strip b.schedule-game-date {
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--gc-text-color-primary);
}
.scs-card .scs-strip span {
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
}
.scs-card .scs-strip .scs-status { margin-left: auto; }

.scs-card .scs-bug,
.scs-card .scs-bug.schedule-game-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: var(--gc-space-3);
    margin: 0 var(--gc-space-3);
    padding: var(--gc-space-3) var(--gc-space-4);
    background: var(--gc-bg-sunken);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-sm);
}
.scs-card .scs-plate {
    display: flex;
    align-items: center;
    gap: var(--gc-space-3);
    min-width: 0;
}
.scs-card .scs-plate.is-end { justify-content: flex-end; text-align: right; }
.scs-card .scs-plate .scs-crest {
    width: 48px;
    height: 48px;
    background: var(--gc-bg-elevated);
}
.scs-card .scs-plate .scs-crest img { width: 42px; height: 42px; }
.scs-card .scs-nm { display: block; min-width: 0; }
.scs-card .scs-nm i {
    display: block;
    font-style: normal;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
}
.scs-card .scs-nm b {
    display: block;
    font-family: var(--gc-font-display);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gc-text-color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scs-card .scs-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 var(--gc-space-3);
    border-left: 1px solid var(--gc-border-subtle);
    border-right: 1px solid var(--gc-border-subtle);
    text-align: center;
}
.scs-card .scs-mid .scs-num { font-size: 20px; }
.scs-card .scs-mid .scs-cap {
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
}
.scs-card.is-next .scs-details { padding-top: var(--gc-space-3); }

/* ── details ──────────────────────────────────────────────────────────── */
.scs-card .scs-details {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-1);
    padding: 0 var(--gc-space-4) var(--gc-space-3);
}
.scs-card .scs-detail,
.scs-card .scs-detail.sc-postponed-sub {
    display: flex;
    align-items: flex-start;
    gap: var(--gc-space-2);
    min-width: 0;
    margin: 0;
    font-family: var(--gc-font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    color: var(--gc-text-color-secondary);
}
.scs-card .scs-detail svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: var(--gc-text-color-muted);
}
.scs-card .scs-detail > span { min-width: 0; overflow-wrap: anywhere; }
.scs-card .scs-detail b { font-weight: 700; color: var(--gc-text-color-primary); }
.scs-card .scs-detail.is-note { color: var(--gc-text-color-muted); }
.scs-card button.scs-code.scs-detail {
    width: 100%;
    min-height: 44px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    color: var(--gc-text-color-secondary);
    cursor: pointer;
}
.scs-card .scs-code svg:last-child { margin-left: auto; }

/* ── RSVP (markup from js/settings.js buildRsvpSummaryHtml, unchanged) ─── */
.scs-card .rsvp-coach-placeholder:empty { display: none; }
.scs-card .rsvp-coach-summary {
    margin: 0;
    padding: 0 var(--gc-space-4);
    border-top: 1px solid var(--gc-border-subtle);
}
.scs-card .rsvp-coach-counts {
    min-height: 44px;
    padding: var(--gc-space-1) 0;
    font-family: var(--gc-font-body);
}
/* ⛔ NO PILL TAGS (Carlos, Oct 10: "vibe-coded, I hate it"; conductor review
   Oct 11): the counts are plain text, each led by a small coloured dot —
   "● 3 going  ● 1 maybe  ● 11 no response". */
.scs-card .rsvp-coach-counts { gap: var(--gc-space-4); }
.scs-card .rsvp-coach-count,
.scs-card .rsvp-coach-count.going,
.scs-card .rsvp-coach-count.maybe,
.scs-card .rsvp-coach-count.not-going,
.scs-card .rsvp-coach-count.no-response {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border-radius: 0;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: none;
    color: var(--gc-text-color-secondary);
}
.scs-card .rsvp-coach-count::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gc-border-strong);
}
.scs-card .rsvp-coach-count.going::before { background: var(--gc-accent-primary); }
.scs-card .rsvp-coach-count.maybe::before { background: var(--gc-status-warning); }
.scs-card .rsvp-coach-count.not-going::before { background: var(--gc-text-color-muted); }
.scs-card .rsvp-coach-count.no-response { color: var(--gc-text-color-muted); font-weight: 600; }

/* ── actions: one joined bar of 48px keys (no pills) ─────────────────── */
.scs-card .scs-acts {
    display: flex;
    border-top: 1px solid var(--gc-border-subtle);
}
.scs-card .scs-btn {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: var(--gc-space-2);
    min-width: 0;
    min-height: 48px;
    padding: 0 var(--gc-space-2);
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gc-text-color-secondary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.scs-card .scs-btn + .scs-btn { border-left: 1px solid var(--gc-border-subtle); }
.scs-card .scs-btn svg { flex: none; width: 16px; height: 16px; }
.scs-card .scs-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scs-card .scs-btn:hover { background: var(--gc-bg-hover); color: var(--gc-text-color-primary); }
.scs-card .scs-btn:active { background: var(--gc-bg-active); }
.scs-card .scs-btn:focus-visible { outline: 2px solid var(--gc-border-focus); outline-offset: -2px; }
.scs-card .scs-btn.is-danger { color: var(--gc-status-errorText); }
.scs-card .scs-btn.is-hot {
    background: var(--gc-accent-primary);
    color: var(--gc-text-on-accent);
}
.scs-card .scs-btn.is-hot:hover { background: var(--gc-accent-hover); color: var(--gc-text-on-accent); }

/* Settings only: what kind of game this is, as a label (no pill) */
.scs-card .scs-foot {
    display: flex;
    align-items: center;
    padding: var(--gc-space-2) var(--gc-space-4);
    border-top: 1px solid var(--gc-border-subtle);
}
.scs-card .scs-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2);
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gc-text-color-muted);
}
.scs-card .scs-tag::before {
    content: '';
    width: 3px;
    height: 11px;
    background: var(--gc-border-strong);
}

/* the add buttons under the Settings lists: 48px, square-cornered */
.schedule-add-more-btn.scs-add {
    min-height: 48px;
    margin-top: var(--gc-space-2);
    border-radius: var(--gc-radius-sm);
    font-family: var(--gc-font-body);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* the phone tab's All / Games / Practices switcher: ONE joined segmented
   control (Carlos, Aug 9: mutually-exclusive views are never a pill row) */
.mobile-schedule-container .mobile-schedule-filters {
    gap: 0;
    overflow: visible;
    border: 1px solid var(--gc-border-default);
    border-radius: 4px;
}
.mobile-schedule-container .mobile-schedule-filters .mobile-schedule-filter {
    flex: 1 1 0;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--gc-space-2);
    border: 0;
    border-radius: 0;
    background: none;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
}
.mobile-schedule-container .mobile-schedule-filters .mobile-schedule-filter + .mobile-schedule-filter { border-left: 1px solid var(--gc-border-subtle); }
.mobile-schedule-container .mobile-schedule-filters .mobile-schedule-filter.active {
    background: var(--gc-bg-active);
    color: var(--gc-text-color-primary);
    border-color: var(--gc-border-subtle);
    box-shadow: inset 0 -3px 0 var(--gc-accent-primary);
}

/* ── phones: the bug stacks each plate (crest over name) so a long school
      name keeps its words; the rail narrows ───────────────────────────── */
@media (max-width: 480px) {
    .scs-card .scs-row,
    .scs-card .scs-row.schedule-game-card-header {
        grid-template-columns: 64px 36px minmax(0, 1fr) auto;
        column-gap: var(--gc-space-2);
        padding: var(--gc-space-3);
    }
    .scs-card .scs-crest { width: 36px; height: 36px; }
    .scs-card .scs-crest img { width: 30px; height: 30px; }
    .scs-card .scs-num { font-size: 15px; }
    .scs-card .scs-opp { font-size: 16px; }
    .scs-card .scs-details { padding: 0 var(--gc-space-3) var(--gc-space-3); }
    .scs-card .scs-flag,
    .scs-card .scs-strip { padding-left: var(--gc-space-3); padding-right: var(--gc-space-3); }
    .scs-card .scs-bug,
    .scs-card .scs-bug.schedule-game-card-body {
        margin: 0 var(--gc-space-2);
        padding: var(--gc-space-3) var(--gc-space-2);
        column-gap: var(--gc-space-2);
    }
    .scs-card .scs-plate,
    .scs-card .scs-plate.is-end {
        flex-direction: column;
        justify-content: flex-start;
        gap: var(--gc-space-1);
        text-align: center;
    }
    .scs-card .scs-plate.is-end .scs-crest { order: -1; }
    .scs-card .scs-plate .scs-crest { width: 44px; height: 44px; }
    .scs-card .scs-plate .scs-crest img { width: 38px; height: 38px; }
    .scs-card .scs-nm { width: 100%; }
    .scs-card .scs-nm b {
        font-size: 15px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow-wrap: anywhere;
    }
    .scs-card .scs-mid { padding: 0 var(--gc-space-2); }
    .scs-card .scs-mid .scs-num { font-size: 18px; }
    .scs-card .scs-btn { font-size: 12px; letter-spacing: 0.5px; gap: 6px; }
    .scs-card .rsvp-coach-summary { padding: 0 var(--gc-space-3); }
}

/* a postponed row's rail carries the POSTPONED badge, wider than a kick time */
.scs-card.is-postponed .scs-row,
.scs-card.is-postponed .scs-row.schedule-game-card-header {
    grid-template-columns: max-content 40px minmax(0, 1fr) auto;
}
@media (max-width: 480px) {
    .scs-card.is-postponed .scs-row,
    .scs-card.is-postponed .scs-row.schedule-game-card-header {
        grid-template-columns: max-content 36px minmax(0, 1fr) auto;
    }
}

/* css/settings-upgrade.css sizes EVERY #settingsModal button (padding 10px
   18px, 15px type) at ID specificity; inside the iPad Settings list the
   card's keys keep their own box. */
#settingsModal .scs-card .scs-btn { padding: 0 var(--gc-space-2); font-size: 13px; }
#settingsModal .scs-card button.scs-code { padding: 0; font-size: 14px; }

/* ⛔ THE + NEVER SITS ON A CONTROL (conductor review, Oct 11). The FAB group
   is fixed 118px (+ safe area) above the viewport bottom and 56px tall; the
   phone tab panel ends 90px (+ the same safe area) above it, so the FAB's top
   is 84px above the panel's bottom edge. The list keeps that much plus a
   24px gap below its last card, so scrolled to the end every key, the RSVP
   line and Directions clear the +. (Gate: test-coach-schedule-portal-look.js
   hit-tests every control's centre at the bottom of the scroll.) */
.mobile-schedule-container {
    padding-bottom: calc(118px + 56px - 90px + var(--gc-space-6) + env(safe-area-inset-bottom, 0px));
}
