﻿.hide-datagrid-header .mud-table-head {
    display: none !important;
}
.hide-datagrid-header thead.mud-table-head {
    display: none !important;
}

/* ==========================================================
    Global: standard top padding above every page's title, so
    individual pages don't need their own "mt-4" on the first
    heading - matches MudBlazor's own mt-4 value (16px).
===========================================================*/
.mud-main-content > h3:first-child {
    margin-top: 16px;
}

/* ==========================================================
    GameBox (Components/Games/GameBox.razor): the shared score/odds
    box used across the app's games lists. Plain table, so there is
    no MudBlazor table CSS to override here - only the middle line
    between the two rows, nothing else.
===========================================================*/
.h22h-game-box {
    border-collapse: collapse;
    width: 100%;
    height: 100%;
}

.h22h-game-box td {
    width: 40px;
    text-align: center;
    padding: 2px 4px;
    font-size: 0.65rem;
}

.h22h-game-box tr:first-child td {
    border-bottom: 1px solid var(--mud-palette-table-lines);
}

.h22h-game-box-final {
    font-weight: bold;
}

/* ==========================================================
    Odds box (Components/Games/BoxOdds.razor, via GameBox's CssClass
    parameter): light, slightly rounded borders on each of the 6 odds
    cells so odds don't visually blend into the Score box above them.
    Switches to separate borders (with a little spacing) since collapsed
    borders can't render a border-radius.
===========================================================*/
.h22h-odds-box {
    border-collapse: separate;
    border-spacing: 2px;
}

.h22h-odds-box td {
    border: 1px solid var(--mud-palette-table-lines);
    border-radius: 4px;
}

/* ==========================================================
    Scenario bubble (Components/Games/GameScenarios.razor): the small
    colored indicator per qualifying scenario on a game row. The scenario
    code (plus eye/fire "top team" icon) sits on the left, with the away
    team's push/win % stacked above the home team's % to the right - wider
    and shorter than a 3-row stack, while still fitting both percentages.
===========================================================*/
.h22h-scenario-bubble {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 6px;
    padding: 2px 6px;
    min-width: 42px;
    line-height: 1.15;
}

.h22h-scenario-bubble-pcts {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.h22h-scenario-bubble-pct {
    font-size: 0.6rem;
    opacity: 0.85;
}

.h22h-scenario-bubble-code {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 700;
}

.h22h-scenario-bubble-code .mud-icon-root {
    font-size: 1rem;
}

/* ==========================================================
    Live Games mobile layout (Components/Pages/LiveGames/Games.razor):
    below the breakpoint, swap the desktop MudDataGrid + right-hand
    top-teams panel for a header-less, two-row-per-game card list (see
    .h22h-mobile-game-row below). Both markups render in the DOM; this
    just toggles which one is visible, so there's no separate
    data-loading path to keep in sync.
===========================================================*/
.h22h-mobile-only {
    display: none;
}

/* Live Games status filter pills (Live/H1/Half/H2/Scheduled/Final). Went through several
   iterations (no-wrap + shrinking text/abbreviating "Scheduled", then a MudToggleGroup segmented
   control) before landing here, per explicit user feedback on each - see CLAUDE.md for the full
   history before changing this again. Final shape: real MudChip pills (kept for per-item color
   coding - Live/H1/Half/H2 green, Scheduled blue, Final grey - a connected single-color
   MudToggleGroup couldn't do this), allowed to wrap to a second line on mobile
   (`MudStack Wrap="Wrap.Wrap"`) rather than forcing one line, and less rounded than MudChip's
   default pill shape per explicit request. */
.h22h-status-chip {
    /* !important needed - MudBlazor's own .mud-chip.mud-chip-outlined rule (two classes) beats
       this single-class selector regardless of file order (found via getComputedStyle: this was
       computing to MudChip's default 16px despite the rule below, same cascade trap as the
       font-size/padding overrides documented just below). */
    border-radius: 8px !important;
}

/* font-size/padding have to go on .mud-chip-content specifically, not just the outer chip -
   MudChip's own base CSS sets both directly on .mud-chip-content, which wins over a size/padding
   merely inherited from the outer element regardless of selector specificity (found by checking
   getComputedStyle on the rendered chip text, which was still MudBlazor's unmodified default).
   Placed before the mobile media query below so its own (same-selector, same-specificity)
   tighter rule still wins there by source order - two equal-specificity rules for the same
   selector resolve by position in the file, not by which one "sounds" more specific, a cascade
   trap this file has hit before. */
.h22h-status-chip .mud-chip-content {
    padding: 0 10px;
}

@media (max-width: 768px) {
    .h22h-desktop-only {
        display: none !important;
    }

    .h22h-mobile-only {
        display: block;
    }

    .h22h-status-chip {
        height: 24px;
    }

    .h22h-status-chip .mud-chip-content {
        font-size: 0.75rem;
        padding: 0 8px;
    }

    .h22h-status-chip-row {
        row-gap: 8px !important;
    }
}

.h22h-mobile-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 4px;
}

/* Status-tinted header background - a light wash of the same color the status text itself uses
   (var(--mud-palette-success)/-info/-dark, see BoxTime.razor), not a flat solid color, so bold
   dark-on-light text stays readable in both light and dark mode. The previous flat
   --mud-palette-background-grey fill was too close to the page's own background to read as a
   background color at all - this reads clearly while still doubling as a status indicator. */
.h22h-mobile-game-header.h22h-status-live {
    background-color: color-mix(in srgb, var(--mud-palette-success) 20%, transparent);
}

.h22h-mobile-game-header.h22h-status-scheduled {
    background-color: color-mix(in srgb, var(--mud-palette-info) 16%, transparent);
}

.h22h-mobile-game-header.h22h-status-final {
    background-color: color-mix(in srgb, var(--mud-palette-dark) 12%, transparent);
}

/* Period/Clock only render markup when the game is actually live (see Period.razor/Clock.razor) -
   margin-left:auto keeps them pinned to the header's right edge even when empty. */
.h22h-mobile-game-period {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Team/score grid on the left, odds on the right, both on the same row. */
.h22h-mobile-game-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Away team/score on the grid's first row, home team/score on its second - putting both teams'
   names in the grid's first column and their score cells in the following columns guarantees
   each name lines up with that team's own score, since they're literally in the same grid row. */
.h22h-mobile-team-score-grid {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    column-gap: 6px;
    row-gap: 2px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.h22h-mobile-team-name {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h22h-mobile-score-cell {
    font-size: 0.65rem;
    text-align: center;
    min-width: 18px;
}

.h22h-mobile-score-final {
    font-weight: 700;
}

.h22h-mobile-score-na {
    grid-column: span 3;
    font-size: 0.65rem;
    color: var(--mud-palette-text-secondary);
    text-align: right;
}

.h22h-mobile-game-odds {
    flex: 0 0 auto;
}

.h22h-mobile-game-row-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.h22h-mobile-game-scenarios {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================
    Day's Profit scenario cards (Components/Pages/LiveGames/Games.razor):
    on mobile, the desktop card-per-scenario layout (name/qualifiers/wins
    stacked, plus a separate profit action row) takes too much vertical
    room - replace it with one compact, tabular row per scenario. Fixed
    column widths (rather than flex) keep the name/Q/W columns aligned
    across rows regardless of value length, so it reads like a small
    table even though it's a stack of divs.
===========================================================*/
.h22h-scenario-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.h22h-scenario-card-row {
    display: grid;
    grid-template-columns: 72px 44px 44px 1fr;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.h22h-scenario-card-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h22h-scenario-card-stat {
    opacity: 0.85;
}

.h22h-scenario-card-profit {
    text-align: right;
    font-weight: 700;
}

/* ==========================================================
    Sports Game Odds Events page: the per-market card shown in each
    event's expanded detail row, and the dense fair/book/bookmaker
    tables inside it. No Bootstrap is loaded in this app, so the
    "table table-bordered table-sm" classes used here (matching the
    SPF Games page's own convention) need their own backing styles.
===========================================================*/
.sgo-market-card {
    width: 320px;
}

.sgo-market-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.75rem;
}

.sgo-market-table th,
.sgo-market-table td {
    border: 1px solid var(--mud-palette-table-lines);
    padding: 2px 4px;
    text-align: center;
}

.sgo-market-table th {
    font-weight: 600;
}

.sgo-market-table td:first-child {
    text-align: left;
    font-weight: 600;
}

/* ==========================================================
    Main Edit Games list: darken the horizontal line between game
    rows a bit so individual games are easier to tell apart from
    the lighter lines used elsewhere (e.g. inside the Score/Odds
    boxes). Scoped to the table body only, so the header's own
    bottom border is untouched.
===========================================================*/
.datagrid-small-text .mud-table-body .mud-table-cell,
.row-divider .mud-table-body .mud-table-cell {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3) !important;
}

/* ==========================================================
    Sport Book Review - Archive: each game occupies two consecutive
    rows (odd Rot = visitor, even Rot = home), so darken the border
    after the even row to set games apart from each other, while the
    line between a game's own two rows stays the normal weight.
===========================================================*/
.sbr-archive-group-divider .mud-table-cell {
    border-bottom: 1px solid rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================
    For MudDataGrid (smaller overall text)
===========================================================*/
.datagrid-small-text .mud-table-cell {
    font-size: 0.70rem; /* Adjust the size as needed, e.g., 0.75rem is smaller than the default 0.875rem */
}

/* Optionally, style the header cells as well */
.datagrid-small-text .mud-table-cell-header {
    font-size: 0.70rem;
}

/* ==========================================================
    Global: every MudDataGrid gets tighter cell padding and a
    smaller font. MudBlazor's default is 16px padding (6px 16px
    even with Dense="true") and 0.875rem text, which is too
    spacious for data-dense grids and reads too close to the
    side-menu font. Applies to every MudDataGrid automatically,
    no per-page Class needed.
===========================================================*/
.mud-data-grid .mud-table-cell,
.mud-data-grid .mud-table-cell.mud-table-cell-header {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

/* ==========================================================
    For MudSimpleTable 
===========================================================*/
/*.mud-table-cell {
    font-size: 0.85rem !important;*/ /* Adjust size as needed */
/*}*/
/* For headers */
/*.mud-table-header .mud-table-cell {
    font-size: 0.9rem !important;
}*/

.mud-table-container {
    font-size: 11px;
}

.mud-simple-table table * tr > td, .mud-simple-table table * tr th {
    font-size: 11px;
}

.mud-simple-table.mud-table-dense * tr td, .mud-simple-table.mud-table-dense * tr th {
    padding: 6px 6px;

}

/* ==========================================================
    Score/Odds boxes (SportsPageFeed Games grid): bordered boxes
    of numbers. Border matches the grid's own row border color
    (light gray) instead of Bootstrap's default. The cell itself
    has its padding zeroed (via .boxed-cell) so the box fills the
    row edge-to-edge, and the table uses a fixed layout so column
    widths don't shift with digit count.
===========================================================*/
.mud-data-grid .mud-table-cell.boxed-cell {
    padding: 0 !important;
}

.score-box, .odds-box {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    height: 100%;
}

.score-box td, .odds-box td {
    border: 1px solid var(--mud-palette-table-lines);
    padding: 2px 6px;
    text-align: center;
    font-size: 0.65rem;
}

/* The grid row itself already draws a line at the top/bottom of the
   row, a pixel or two away from the box's own border - drop the box's
   outer top/bottom borders so there isn't a near-duplicate double line. */
.score-box tr:first-child td, .odds-box tr:first-child td {
    border-top: none;
}

.score-box tr:last-child td, .odds-box tr:last-child td {
    border-bottom: none;
}

/* Odds Trader - Games: date/time column has no vertical stacking border
   (just two plain lines of text), and the teams column is left-aligned
   instead of the default odds-box centering. */
.odds-box.borderless td {
    border: none;
}

.odds-box.team-box td {
    text-align: left;
}

/* High-Performing Teams On The Schedule (Dashboard): column headers (and the filter
   inputs they hold) are self-explanatory once you can see the whole row, but on a
   narrow phone they take up space the row values don't need - hide them there, and
   show a inline "Opponent: " label on that one column since it's the only value that
   isn't obviously self-describing without its header. */
.opponent-mobile-label {
    display: none;
}

@media (max-width: 600px) {
    .high-performing-teams-grid thead,
    .high-performing-teams-grid .mud-table-head {
        display: none !important;
    }

    /* MudDataGrid's own mobile mode independently prefixes every cell with its
       column name via data-label/::before - suppress that here since we only
       want our own manual "Opponent: " label, not one on every column. */
    .high-performing-teams-grid .mud-table-cell:before {
        content: none !important;
    }

    .opponent-mobile-label {
        display: inline;
    }
}

.score-box td.score-final {
    font-weight: bold;
}