/* ============================================
   LineupIQ Games Strip
   Slate-level row of the slate's games, between
   the build tabs and the split workspace (team
   sports only). Collapsible; horizontal scroll
   within the strip when there are many games.
   ============================================ */

.games-strip {
    background: var(--liq-bg-secondary);
    border-bottom: 1px solid var(--liq-border-color);
    flex-shrink: 0;
}

/* ---- Bar (always visible) ---- */

.games-strip-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    min-height: 32px;
}

.games-strip-toggle {
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--liq-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .games-strip-toggle:hover {
        border-color: var(--liq-border-color);
        color: var(--liq-text-primary);
        background: var(--liq-bg-hover);
    }

    .games-strip-toggle i {
        font-size: 0.7rem;
        line-height: 1;
    }

.games-strip-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--liq-text-secondary);
}

.games-strip-summary {
    font-size: 0.75rem;
    color: var(--liq-text-muted, var(--liq-text-secondary));
}

/* ---- Cards ---- */

.games-strip-cards {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

    .games-strip-cards::-webkit-scrollbar {
        height: 6px;
    }

    .games-strip-cards::-webkit-scrollbar-thumb {
        background: var(--liq-border-color);
        border-radius: 3px;
    }

.games-strip.collapsed .games-strip-cards {
    display: none;
}

.game-card {
    flex: 0 0 auto;
    min-width: 168px;
    padding: 0.4rem 0.625rem;
    background: var(--liq-bg-primary);
    border: 1px solid var(--liq-border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: border-color 0.15s ease;
}

    .game-card:hover {
        border-color: var(--liq-accent-green);
    }

/* Card body is clickable (toggles the game in the view filter) */
.game-card {
    cursor: pointer;
}

    .game-card.game-filtered {
        border-color: var(--liq-accent-green);
        background: rgba(16, 185, 129, 0.06);
    }

/* Game state accents (competitionState) — in-progress / final dim slightly */
.game-card.game-card-inprogress,
.game-card.game-card-live {
    border-color: rgba(16, 185, 129, 0.45);
}

.game-card.game-card-final,
.game-card.game-card-completed {
    opacity: 0.6;
}

/* Late Swap build only (LineupIQLateSwap.syncGamesStrip): the game has
   started per our stored start times — players from it are locked. Amber to
   match the locked-row edge and lineup lock icons; the time stays readable. */
.game-card.game-locked {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.05);
}

.game-card.game-locked .game-time {
    color: #f59e0b;
}

.game-card.game-locked .game-time::before {
    content: "\F47A";              /* bi-lock-fill */
    font-family: "bootstrap-icons";
    font-size: 0.75em;
    margin-right: 3px;
}

.game-card-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
}

.game-team {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

    .game-team-home {
        flex-direction: row-reverse;
    }

.game-team-logo {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .game-team-logo .team-logo {
        width: 22px;
        height: 22px;
        display: block;
    }

    /* Sprite not loaded / id missing: render nothing, keep the box so the
       layout doesn't shift when the sprite lands and upgrades it */
    .game-team-logo .team-logo-missing {
        display: block;
        width: 22px;
        height: 22px;
    }

.game-team-abbr {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--liq-text-primary);
    letter-spacing: 0.02em;
}

.game-at {
    font-size: 0.7rem;
    color: var(--liq-text-muted, var(--liq-text-secondary));
    flex-shrink: 0;
}

.game-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
    font-size: 0.72rem;
    color: var(--liq-text-secondary);
}

.game-time {
    white-space: nowrap;
}

    .game-time .game-tz {
        margin-left: 0.2rem;
        font-size: 0.6rem;
        opacity: 0.6;
        letter-spacing: 0.04em;
    }

.game-weather {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    color: var(--liq-text-muted, var(--liq-text-secondary));
}

.game-weather-icon {
    display: inline-flex;
    font-size: 0.8rem;
    line-height: 1;
    color: var(--liq-text-secondary);
}

.game-badges {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: auto;
}

.game-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    line-height: 1;
}

.game-badge-confirmed {
    color: var(--liq-accent-green);
}

.game-badge-dome {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    background: var(--liq-bg-tertiary);
    color: var(--liq-text-muted, var(--liq-text-secondary));
}

/* ---- Team actions (filter / exclude) ---- */

.game-card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.125rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--liq-border-color);
}

.game-team-actions {
    display: inline-flex;
    gap: 0.125rem;
}

.game-team-btn {
    width: 22px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--liq-text-muted, var(--liq-text-secondary));
    cursor: pointer;
    font-size: 0.72rem;
    line-height: 1;
    transition: all 0.12s ease;
}

    .game-team-btn:hover {
        border-color: var(--liq-border-color);
        color: var(--liq-text-primary);
        background: var(--liq-bg-hover);
    }

    .game-team-filter.active {
        color: var(--liq-accent-green);
        border-color: rgba(16, 185, 129, 0.4);
        background: rgba(16, 185, 129, 0.1);
    }

    .game-team-exclude.active {
        color: var(--liq-accent-red, #ef4444);
        border-color: rgba(239, 68, 68, 0.4);
        background: rgba(239, 68, 68, 0.1);
    }

/* Excluded team: dim its abbreviation on the card */
.game-team.team-excluded .game-team-abbr {
    text-decoration: line-through;
    opacity: 0.45;
}

.game-team.team-excluded .game-team-logo {
    opacity: 0.35;
}

/* Bar-level "Clear filter" (visible only while a team filter is on) */
.games-strip-clear {
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 5px;
    color: var(--liq-accent-green);
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
}

    .games-strip-clear:hover {
        background: rgba(16, 185, 129, 0.18);
    }

/* ---- Team logo in the player grid's Team column ---- */

.team-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 100%;
}

    .team-cell .team-cell-logo {
        width: 18px;
        height: 18px;
        display: block;
        flex-shrink: 0;
    }

    /* Sprite not loaded / id missing: no box, just the abbreviation */
    .team-cell .team-logo-missing {
        display: none;
    }

/* Player grid rows on an excluded team — visible, muted */
.ag-theme-quartz .ag-row.liq-row-team-excluded,
.ag-theme-quartz-dark .ag-row.liq-row-team-excluded {
    opacity: 0.4;
}

    .ag-theme-quartz .ag-row.liq-row-team-excluded .ag-cell,
    .ag-theme-quartz-dark .ag-row.liq-row-team-excluded .ag-cell {
        text-decoration: line-through;
        text-decoration-color: var(--liq-text-muted, currentColor);
    }

/* ---- Mobile ---- */

@media (max-width: 768px) {
    .games-strip-bar {
        padding: 0.25rem 0.75rem;
    }

    .games-strip-cards {
        padding: 0 0.75rem 0.5rem;
    }

    .game-card {
        min-width: 148px;
        padding: 0.375rem 0.5rem;
    }
}
