/* hero variants with better contrast */

/* subtle table container */

/* badges */

/* Hero, higher contrast */

/* Cards grid */

/* ensure hero links are readable */
.hero-ink a,
.hero-ink a:link,
/* button polish, in case Pico isn't styling anchors */
/* Total Sport, section cards and responsive table */
/* allow horizontal scroll when columns overflow */
/* Total Sport, section cards and responsive table */
/* Validation colors */
.field-validation-error,
.validation-summary-errors,
/* Games > Details — Summary */
/* thin accent bar on top */
/* compact header */
/* status pill */
/* key/value list */
/* tighten the title row (“Home vs Away”) */
/* Invite + Details tables: keep height sane with scroll */
.page-invite .scroll-y,
/* Summary: emphasize values */
/* Slightly bolder match title */
/* ---- summary card headers (blue for Details, green for Review) ---- */
/* ---- summary definition list: bold labels, normal values ---- */
a.button,
/* keep submit buttons from expanding in action cells */
/* Keep data tables horizontally scrollable on small screens */
/* Put both actions on one line, right aligned, with consistent spacing */
/* lay out both actions on one line and center them vertically */
/* kill Pico's bottom margin so buttons sit in the middle */
td.actions-cell button,
/* If a submit button slips in, prevent full width expansion */
/* Optional, slightly smaller buttons when space is tight */
/* inline help bubbles */
/* smaller inline help */
/* hide the default marker on the summary, all browsers */
/* Firefox and friends */
/* WebKit and Chromium */
/* reset help text size even when placed inside h1, h2, h3 */
h1 .inline-help,
h2 .inline-help,
/* simple scroll helpers */
/* optional, keeps inner table from hugging edges */
/* Make Identity validation messages red, no view override needed */
.text-danger,
.validation-summary-errors,
/* invite actions layout */
/* put the heading and the info icon on one line */
/* style the summary like a small round info button */
/* optional, muted background on hover */
/* keep the card hidden until opened */
/* green */
/* red */
/* Bet slip */
/* hero variants with better contrast */
.hero-ink h2, .hero-ink p {
    color: #f6fbff;
}

.hero-ink p {
    opacity: .9;
}

/* subtle table container */

/* badges */
.badge {
    display: inline-block;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-size: .85rem;
}

.badge-pending {
    background: #fee;
    color: #9b2226;
}

.badge-invitations {
    background: #e6f6f7;
    color: #0a5b68;
}

.badge-open {
    background: #e8f6ec;
    color: #1f6f43;
}

.badge-locked {
    background: #fff4db;
    color: #8a5a00;
}

.badge-settled {
    background: #eef2ff;
    color: #2c3e94;
}

.badge-canceled {
    background: #f6e6ee;
    color: #7d1d3a;
}

/* Hero, higher contrast */
.hero {
    border-radius: .9rem;
    padding: 1.5rem 1.75rem;
    margin: .5rem 0 1.5rem 0;
}

.hero-ink {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 60%, #243b57 100%);
    color: #fff;
}

    .hero-ink h1, .hero-ink h2, .hero-ink p {
        color: black;
    }

select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Cards grid */
.cards-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    padding: 1rem;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
/* ensure hero links are readable */
.hero-ink a,
.hero-ink a:link,
.hero-ink a:visited {
    color: #cfe8ff;
    font-weight: 600;
    text-decoration: none;
}

    .hero-ink a:hover {
        text-decoration: underline;
    }

/* button polish, in case Pico isn't styling anchors */
.button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1rem;
    border-radius: .75rem;
    text-decoration: none;
    font-weight: 600;
}

    .button.contrast {
        background: #25a18e;
        color: #fff;
    }

    .button.outline {
        background: transparent;
        border: 1px solid rgba(255,255,255,.6);
        color: #fff;
    }

.cta-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}
/* Total Sport, section cards and responsive table */

/* allow horizontal scroll when columns overflow */
/* Total Sport, section cards and responsive table */
.section-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.05);
    margin-bottom: 1.25rem;
}

.section-card__header {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
    background: linear-gradient(90deg,rgba(10,19,40,.06),rgba(10,19,40,.03));
}

.section-card__body {
    padding: 1rem;
}

/* Validation colors */
.field-validation-error,
.validation-summary-errors,
.text-danger {
    color: #dc3545 !important;
}

/* Games > Details — Summary */
.page-games-details .section-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

/* thin accent bar on top */
.page-games-details .summary-card {
    position: relative;
}

    .page-games-details .summary-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg,#22c55e,#0ea5e9,#6366f1);
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    /* compact header */
    .page-games-details .summary-card .section-card__header {
        padding: .75rem 1rem;
        background: #fff;
        border-bottom: 1px solid #eef0f3;
    }

.page-games-details .summary-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

/* status pill */
.page-games-details .status-pill {
    padding: .25rem .6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .8rem;
}

.page-games-details .status-open {
    background: #e6f7ee;
    color: #137a3a;
}

.page-games-details .status-locked {
    background: #fff3cd;
    color: #8a6d3b;
}

.page-games-details .status-inplay {
    background: #e7f0ff;
    color: #1d4ed8;
}

.page-games-details .status-settled {
    background: #eceef2;
    color: #495057;
}

.page-games-details .status-cancelled {
    background: #f1e8ee;
    color: #8b1d3f;
}

.page-games-details .section-card__body {
    padding: 1rem 1.25rem;
}

/* key/value list */
.page-games-details .summary-meta {
    margin: 0;
}

    .page-games-details .summary-meta dt {
        color: #6c757d;
        font-weight: 600;
        margin-top: .35rem;
    }

    .page-games-details .summary-meta dd {
        margin: 0 0 .5rem 0;
    }

/* tighten the title row (“Home vs Away”) */
.page-games-details .summary-card .h6 {
    margin-bottom: .75rem !important;
}

.table-scroll {
    max-height: 320px;
    overflow-y: auto;
}

/* Invite + Details tables: keep height sane with scroll */
.page-invite .scroll-y,
.page-games-details .scroll-y {
    max-height: 280px;
    overflow-y: auto;
}
/* Summary: emphasize values */

/* Slightly bolder match title */
.summary-title {
    font-weight: 700;
}

/* ---- summary card headers (blue for Details, green for Review) ---- */
.section-card__header--blue {
    background: linear-gradient(90deg, #2563eb 0%, #6d28d9 100%);
    color: #fff;
}

.section-card__header--green {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
}

/* ---- summary definition list: bold labels, normal values ---- */
.summary-meta {
    margin: 0;
}

    .summary-meta dt {
        font-weight: 600;
        color: #111827;
        margin-bottom: .125rem;
    }

    .summary-meta dd {
        font-weight: 400;
        color: #374151;
        margin-bottom: .5rem;
        margin: 0 0 .75rem 0;
    }

a.button,
button.button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

    /* keep submit buttons from expanding in action cells */

    a.button.warning {
        background-color: var(--pico-primary);
        color: var(--pico-primary-inverse);
    }

        a.button.warning:hover {
            filter: brightness(.95);
        }

/* Keep data tables horizontally scrollable on small screens */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .table-container table {
        width: 100%;
    }

@media (min-width: 681px) {

    .table-container table {
        min-width: 760px;
    }
}

/* Put both actions on one line, right aligned, with consistent spacing */
td.actions-cell {
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}
    /* lay out both actions on one line and center them vertically */
    td.actions-cell form {
        display: inline-flex;
        align-items: center;
        margin: 0 0 0 .5rem;
        vertical-align: middle;
    }

        td.actions-cell form:first-child {
            margin-left: 0;
        }

    /* kill Pico's bottom margin so buttons sit in the middle */
    td.actions-cell button,
    td.actions-cell .button {
        margin-bottom: 0;
        white-space: nowrap;
        color: white;
    }

/* If a submit button slips in, prevent full width expansion */
button[type="submit"].button {
    width: auto;
    margin-bottom: 0;
}

/* Optional, slightly smaller buttons when space is tight */
@media (max-width: 680px) {
    td.actions-cell .button {
        padding: .5rem .75rem;
        font-size: .875rem;
    }
    /* inline help bubbles */
}

.inline-help {
    display: inline-block;
    position: relative;
    margin-left: .4rem;
}

    .inline-help[open] .help-card {
        position: absolute;
        top: 1.6rem;
        left: 0;
        z-index: 20;
        background: #fff;
        border: 1px solid rgba(0,0,0,.12);
        padding: .5rem .75rem;
        border-radius: .5rem;
        box-shadow: 0 .25rem .75rem rgba(0,0,0,.15);
        width: min(32ch, 90vw);
    }
    /* smaller inline help */

    .inline-help .help-icon {
        font-size: 1.4rem;
        width: 1.4rem;
        height: 1rem;
        line-height: .98rem;
    }

    /* hide the default marker on the summary, all browsers */

    /* Firefox and friends */

    /* WebKit and Chromium */

    .inline-help > summary::marker {
        content: "";
    }

    .inline-help > summary::-webkit-details-marker {
        display: none;
    }
/* reset help text size even when placed inside h1, h2, h3 */
h1 .inline-help,
h2 .inline-help,
h3 .inline-help {
    font-size: 1rem;
}

/* simple scroll helpers */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-y {
    max-height: 420px;
    overflow-y: auto;
}

/* optional, keeps inner table from hugging edges */
.table-responsive table {
    width: 100%;
}

/* Make Identity validation messages red, no view override needed */
.text-danger,
.validation-summary-errors,
.field-validation-error {
    color: #dc3545 !important;
}

/* invite actions layout */
.invite-actions form {
    display: inline;
    margin-left: .25rem;
}

.invite-actions button {
    white-space: nowrap;
}

/* put the heading and the info icon on one line */
.hgroup {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* style the summary like a small round info button */
.inline-help summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    border: 0;
    background: transparent;
    padding: 0;
}

    .inline-help summary::-webkit-details-marker {
        display: none;
    }

.help-icon {
    display: inline-flex;
    width: 4.5rem;
    height: 4.5rem;
    line-height: 1.15rem;
    text-align: center;
    font-size: .8rem;
    border: 1px solid var(--pico-primary-border,#3a86ff);
    border-radius: 9999px;
    opacity: .7;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--pico-primary,#3a86ff);
}

/* optional, muted background on hover */
.inline-help summary:hover .help-icon {
    background-color: rgba(0,0,0,.04);
}

/* keep the card hidden until opened */
.inline-help .help-card {
    font-size: .875rem;
    line-height: 1.3;
    margin-top: .4rem;
}

.inline-help:not([open]) .help-card {
    display: none;
}

.result-badge {
    font-weight: 600;
}

    .result-badge.win {
        color: #16794f;
    }
    /* green */

    .result-badge.loss {
        color: #c62828;
    }
    /* red */
    .result-badge.neutral {
        color: #6b7280;
    }
/* Bet slip */
.bet-slip-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .5rem .75rem;
    background: #111;
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    overflow: auto;
    max-height: 55vh;
    display: grid;
    gap: .5rem;
    padding: .25rem 0;
}

.slip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .5rem;
    padding: .5rem .75rem;
}

@media (min-width: 992px) {
    .bet-slip-bar {
        position: fixed;
        bottom: 1rem;
        left: auto;
        right: 1rem;
        width: 360px;
        border-radius: .75rem;
    }
}

.bet-slip-drawer {
    position: fixed;
    left: auto;
    right: 1rem;
    bottom: 0;
    max-height: 80vh;
    background: #111;
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    box-shadow: 0 -10px 30px rgba(0,0,0,.4);
    padding: .75rem;
    z-index: 30;
    width: 420px;
    border-radius: .75rem;
}

/* Filters drawer and chips */

.chip-clear {
    text-decoration: none;
}

.be-search-form {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
}

.no-scroll {
    overflow: hidden;
}

/* Filter toolbar */

.be-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-block: .5rem;
    margin: .5rem 0 1rem 0;
}

/* Chips */

.be-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .25rem 0 1rem 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .25rem .6rem;
    border: 1px solid var(--muted-border-color, #dfe3e6);
    border-radius: 999px;
    font-size: .9rem;
    background: var(--card-background-color, #fff);
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

/* Drawer */

.be-drawer::backdrop {
    background: rgba(0,0,0,.35);
}

.be-drawer {
    border: 0;
    width: min(560px, 94vw);
    max-height: 92vh;
    padding: 0;
    margin: 0 0 0 auto;
    z-index: 1000;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    background: var(--background-color, #fff);
}

    .be-drawer > article {
        padding: 0;
        display: grid;
        flex-direction: column;
        height: 100%;
        grid-template-rows: auto 1fr auto;
    }

.be-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem .75rem 1rem;
    border-bottom: 1px solid var(--muted-border-color, #e6eaed);
    gap: 1rem;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
}

    .be-drawer-header h4 {
        margin-left: 0.75rem;
        font-size: 1.05rem;
        color: wheat;
    }

.be-filters-form {
    padding: 1rem;
    overflow: auto;
    max-height: calc(90vh - 4rem);
}

.filter-group {
    margin-bottom: 1rem;
    margin: 0 0 1rem 0;
    padding: .5rem 0 .25rem 0;
    border-bottom: 1px dashed var(--muted-border-color, #e6eaed);
}

    .filter-group legend {
        font-weight: 600;
        margin-bottom: .6rem;
        font-size: .95rem;
    }

.filter-option {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    margin: .25rem .85rem .25rem 0;
    padding: .25rem .4rem;
    border-radius: 6px;
}

.be-drawer-footer {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    padding: .75rem 1rem;
    border-top: 1px solid var(--muted-border-color, #e6eaed);
    position: sticky;
    bottom: 0;
    background: inherit;
}

.chip .chip-remove {
    border: 0;
    background: transparent;
    line-height: 1;
    font-size: 1rem;
    cursor: pointer;
    opacity: 1;
    color: #0b5fff;
    font-weight: 700;
}

    .chip .chip-remove:hover {
        opacity: 1;
        text-decoration: none;
    }

body[data-theme="light"] header.header {
    background-color: #000;
}

    body[data-theme="light"] header.header a {
        color: #9fd1ff;
    }

        body[data-theme="light"] header.header a:hover {
            color: #ffffff;
        }

    body[data-theme="light"] header.header .button,
    body[data-theme="light"] header.header button {
        background-color: #1f2937;
        color: #fff;
        border-color: transparent;
    }

        body[data-theme="light"] header.header .button:hover,
        body[data-theme="light"] header.header button:hover {
            background-color: #111827;
        }
/* ---- Total Sport header override ---- */
/* Pico sets header background via variables. We hard-override with higher specificity. */

:root {
    --ts-header-bg: #0b1020; /* deep navy (or use #000 if you want solid black) */
    --ts-header-fg: #ffffff;
    --ts-header-link: #9fd1ff;
    --ts-header-link-hover: #ffffff;
}

/* Make sure we beat Pico: use :where() to increase specificity safely and add !important once */
body:where(.pico) header.header,
/* Link colors on the header bar */
body header.header a {
    color: var(--ts-header-link) !important;
}

    body header.header a:hover {
        color: var(--ts-header-link-hover) !important;
    }

/* If the logout button is a Pico .button, give it a dark treatment on the dark header */
body header.header .button,
body header.header button {
    background-color: #1f2937;
    color: #fff;
    border-color: transparent;
}

    body header.header .button:hover,
    body header.header button:hover {
        background-color: #111827;
    }

/* Keep header above the hero background */
body header.header {
    background-color: var(--ts-header-bg) !important;
    color: var(--ts-header-fg) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Optional: tighten top spacing so content doesn't hide behind a sticky header */
main.container {
    padding-top: .5rem;
}

/* ===== Betting Events layout ===== */

/* Outer wrapper that contains all the event groups (add class to the container) */
.betting-events {
    overflow: auto; /* vertical + horizontal scroll as needed */
    max-height: 70vh;
    padding: .5rem;
}

/* Group/card per category */
.betting-card {
    border: 1px solid var(--muted-600, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    margin-block: .75rem;
}

.betting-card__header {
    padding: .5rem .75rem; /* reduced header padding */
    font-weight: 700;
    border-bottom: 1px dashed var(--muted-500, #cbd5e1);
}

/* Body that contains rows of questions/inputs */
.betting-list {
    padding: .35rem .55rem; /* ~65% smaller than the common 1rem */
    display: grid;
    grid-template-columns: 1fr auto; /* label grows, input fixed */
    gap: .35rem .75rem; /* tighter vertical gap */
}

/* Each row is two “cells” in the grid */
.bet-row {
    display: contents; /* label + input occupy the grid columns */
}

.bet-label {
    line-height: 1.25;
    align-self: center;
}

/* Inputs narrower so the question doesn’t wrap unnecessarily */
.bet-input {
    width: 12rem; /* tune as desired (10–14rem works well) */
    max-width: 40vw;
    justify-self: end;
}

/* Tighten control padding so fields look less “bulky” */
.betting-list input[type="number"],
.betting-list input[type="text"],
.betting-list select {
    padding: .35rem .5rem;
}

/* If your betting list is inside .section-card or .card, reduce inner padding */
.section-card__body.betting-body,
.card .betting-list {
    padding: .35rem .55rem;
}

/* Optional: if you later wrap trailing category in a span.cat, hide it here */
/* .bet-label .cat { display:none; } */

/* === Compact header / nav bar === */
header.header {
    padding-block: .5rem; /* thinner top bar */
}

    header.header a,
    header.header [role="button"],
    header.header button.button {
        padding-block: .35rem;
        line-height: 1.2;
        font-size: .95rem;
    }

    header.header .button {
        padding: .45rem .8rem;
        border-radius: .6rem;
    }

/* === Compact hero CTA buttons under the welcome banner === */
.hero-ink .cta-row .button,
.hero-ink .cta-row [role="button"] {
    padding: .5rem .9rem;
    line-height: 1.2;
    font-size: .95rem;
}

/* === Compact card/section headers (e.g., Auto Settle tile) === */
.section-card__header,
.card > header,
.betting-card__header {
    padding: .45rem .75rem;
    line-height: 1.2;
}

/* Optional: tighten card bodies a touch */
.section-card__body {
    padding: .85rem 1rem;
}

/* === Compact header / top bar (wins over theme) === */
body header.header {
    padding-block: .35rem !important; /* thinner bar */
}

    body header.header .container {
        padding-block: 0 !important; /* remove container padding */
        min-height: 48px !important;
    }

    body header.header a,
    body header.header [role="button"],
    body header.header button.button {
        padding-block: .25rem !important;
        line-height: 1.2 !important;
        font-size: .95rem !important;
    }

    /* Logout / header buttons */
    body header.header .button,
    body header.header button {
        padding: .35rem .6rem !important;
        font-size: .9rem !important;
        line-height: 1.1 !important;
        border-radius: .5rem !important;
    }

/* === Hero (“Welcome to Total Sport”) — reduce big blank area below === */
.hero {
    padding: 1rem 1.25rem !important;
    margin: .5rem 0 1rem !important; /* smaller bottom margin */
}

    .hero h1, .hero h2 {
        margin-bottom: .35rem !important;
    }

    .hero p {
        margin: 0 !important;
    }

/* === Dashboard cards (Pick a Fixture / Invite Friends / Auto Settle) === */
.cards-3 {
    gap: .75rem !important;
}
/* tighter gaps between tiles */

.section-card__header,
.card > header {
    padding: .45rem .75rem !important; /* thinner header bars on tiles */
}

.section-card__body {
    padding: .65rem .8rem !important; /* reduce white space inside tiles */
}

/* Also trim the internal header spacing the theme adds to generic .card */
.card header, .card .card-header {
    margin-bottom: .5rem !important; /* was larger in theme */
    padding-bottom: .4rem !important;
}
/* === Compact tweaks (nav & card headings) — 2025-10-31 === */

/* Reduce vertical padding on top-nav items (thinner black bar) */
header.header nav ul > li,
header.header .nav > li,
header.header .navbar > ul > li {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Tighten dashboard/card headings (e.g., “Pick a Fixture”, “Invite Friends”) */
.cards-3 .card > header h3,
.section-card__header h3,
.card > header h3 {
    margin-bottom: 5px !important;
}

/* === Logout button spacing fix — 2025-10-31 === */
header.header .button,
header.header button,
header.header a.button {
    margin-bottom: 0 !important;
}

/* === Games list tables: sticky header + small View button === */
.table-responsive.scroll-y {
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

    /* Keep the column header visible while scrolling */
    .table-responsive.scroll-y thead th {
        position: sticky;
        top: 0;
        background: var(--ts-surface, #fff);
        z-index: 2;
        box-shadow: 0 1px 0 var(--ts-border, #e6eaed);
        font-weight: 650;
        color: black;
    }

/* Make the action button compact (match status chip height) */
.actions-cell .button {
    padding: .25rem .6rem;
    font-size: .9rem;
    line-height: 1.1;
    border-radius: 9999px;
}

/* Compact action buttons in tables: Invites / Your Games / Fixtures */
.table-responsive .text-end button,
.table-responsive .text-end a,
.table tbody td .button,
.table tbody td button,
.table tbody td a {
    padding: .25rem .60rem !important; /* thinner */
    font-size: .90rem !important; /* smaller text */
    line-height: 1.1 !important;
    min-height: 2rem !important; /* keep tap target */
    min-width: 0 !important;
    border-radius: 9999px !important; /* small pill */
}

/* Inline + compact actions in table cells (Invites, Lists) */
.actions-inline {
    text-align: right;
    white-space: nowrap;
}

    .actions-inline form {
        display: inline-block;
        margin: 0 0 0 .5rem;
    }

    .actions-inline button,
    .actions-inline a.button {
        padding: .25rem .60rem !important;
        font-size: .90rem !important;
        line-height: 1.1 !important;
        min-height: 2rem !important;
        border-radius: 9999px !important;
        margin: 0 !important; /* kill any vertical margins */
    }
/* Compact the "Create Game" action on Fixtures table */
.fixtures-table a.button,
.fixtures-table button {
    padding: .25rem .60rem !important;
    font-size: .90rem !important;
    min-height: 2rem !important;
    border-radius: 9999px !important;
}

/* Normalize action buttons inside cards/forms (Profile, etc.) */
.card .form-actions,
.card .actions-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    margin-top: .5rem;
}

    /* Consistent sizing (non-table buttons) */
    .card .form-actions .button,
    .card .form-actions button,
    .card .form-actions a,
    .card footer .button,
    .card footer button,
    .card footer a {
        width: auto !important; /* stop full-width pills */
        padding: .45rem .9rem !important; /* same as other pages */
        font-size: .95rem !important;
        line-height: 1.2 !important;
        min-height: 2.25rem !important;
        border-radius: 9999px !important; /* unified pill */
    }

/* Optional: unify default button look inside cards */
.card .button.primary,
.card button.primary {
    background: var(--pico-primary);
    color: #fff;
}

/* Fallback when there is no .form-actions wrapper */
.card > .button,
.card > button,
.card > a.button {
    width: auto !important;
    padding: .45rem .9rem !important;
    font-size: .95rem !important;
    min-height: 2.25rem !important;
    border-radius: 9999px !important;
}

/* Profile page: spacing + colorized secondary buttons */

/* Give the helper text real bottom space */
.card p.muted {
    margin-bottom: .85rem; /* was too tight */
}
/* Fallback when there is no .form-actions wrapper */
.card > p.muted + * {
    margin-top: 1.5rem; /* pushes the next block (buttons) down */
}


/* Space the action row away from the fields/help */
.card .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 3.5rem; /* moves buttons down from helper text */
}

    /* Keep Save consistent */
    .card .form-actions .button.primary,
    .card .form-actions button.primary {
        padding: .45rem .9rem;
        font-size: .95rem;
        min-height: 2.25rem;
        border-radius: 9999px;
    }

    /* Add subtle color to the other two buttons */
    .card .form-actions .button.secondary,
    .card .form-actions button.secondary,
    .card .form-actions a.button.secondary {
        background: #fff1ee; /* soft blue tint */
        color: #ff120b; /* readable blue text */
        border: 1px solid #cfe1ff;
        padding: .45rem .9rem;
        font-size: .95rem;
        min-height: 2.25rem;
        border-radius: 9999px;
    }

        .card .form-actions .button.secondary:hover,
        .card .form-actions button.secondary:hover,
        .card .form-actions a.button.secondary:hover {
            filter: brightness(0.97);
        }
/* Long rectangular primary action (Create button on game form) */
.card button.long-rect,
.card a.button.long-rect {
    display: block;
    width: 100% !important; /* full width */
    max-width: none !important;
    padding: .9rem 1rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important; /* rectangle (not pill) */
    margin-top: .25rem;
}

    /* Optional: make it a clean red 'contrast' button via Pico vars */
    .card button.long-rect.contrast {
        --pico-contrast-background: #e53935; /* red fill */
        --pico-contrast-border: #c62828; /* red border */
        --pico-contrast-inverse: #ffffff; /* text color */
    }

/* Header greeting: force white text, regardless of link state */
header .nav-hello,
header .nav-hello:visited,
header .nav-hello:hover,
header .nav-hello:active,
header .nav-hello:focus {
    color: #fff !important;
}

/* If Pico applies its contrast/link color var, pin it to white just for this element */
header .nav-hello {
    --pico-color: #fff; /* scoped, won't affect other items */
}
/* Manage pages grid + nav */
.manage-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.manage-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manage-nav a {
    display: block;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: inherit;
}

    .manage-nav a.active {
        background: #eef6ff;
        color: #0b5fff;
    }

/* Button compatibility for Identity's .btn classes */
.btn {
    padding: .45rem .9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.btn-primary {
    background: #e53935;
    border-color: #c62828;
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background: #eef6ff;
    color: #0b5fff;
    border-color: #cfe1ff;
}

.w-100 {
    width: auto !important;
}
/* stop full-width slab buttons */

/* Long rectangular primary (if a page sets .w-100 on submit) */
.button.long-rect, .btn.long-rect {
    width: 100%;
    border-radius: 8px;
    padding: .9rem 1rem;
}

/* ===== Identity Manage pages: form compatibility ===== */

/* Make Bootstrap-style inputs look like your app's inputs */
.form-group {
    margin-bottom: .85rem;
}

    .form-label,
    .form-group > label {
        display: block;
        font-weight: 600;
        margin-bottom: .35rem;
    }

    /* Identity templates often apply .form-control to inputs */
    .form-control,
    .form-group input:not([type=checkbox]),
    .form-group select,
    .form-group textarea {
        display: block;
        width: 100%;
        padding: .55rem .7rem;
        border: 1px solid #e6eaed;
        border-radius: 10px;
        background: #fff;
        font: inherit;
        line-height: 1.25;
        min-height: 2.25rem;
    }

/* Error/help text */
.text-danger,
.field-validation-error,
.form-text {
    display: block;
    margin-top: .35rem;
    font-size: .9rem;
    color: #b00020;
}

/* Keep action buttons consistent with your style */
.btn {
    padding: .45rem .9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.btn-primary {
    background: #e53935;
    border-color: #c62828;
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background: #eef6ff;
    color: #0b5fff;
    border-color: #cfe1ff;
}

/* Kill full-width slab buttons Identity sometimes uses */
.w-100 {
    width: auto !important;
}

/* Manage layout niceties we added earlier */
.manage-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.manage-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manage-nav a {
    display: block;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: inherit;
}

    .manage-nav a.active {
        background: #eef6ff;
        color: #0b5fff;
    }
/* ===== Identity Manage pages: form compatibility ===== */

/* Make Bootstrap-style inputs look like your app's inputs */
.form-group {
    margin-bottom: .85rem;
}

    .form-label,
    .form-group > label {
        display: block;
        font-weight: 600;
        margin-bottom: .35rem;
    }

    /* Identity templates often apply .form-control to inputs */
    .form-control,
    .form-group input:not([type=checkbox]),
    .form-group select,
    .form-group textarea {
        display: block;
        width: 100%;
        padding: .55rem .7rem;
        border: 1px solid #e6eaed;
        border-radius: 10px;
        background: #fff;
        font: inherit;
        line-height: 1.25;
        min-height: 2.25rem;
    }

/* Error/help text */
.text-danger,
.field-validation-error,
.form-text {
    display: block;
    margin-top: .35rem;
    font-size: .9rem;
    color: #b00020;
}

/* Keep action buttons consistent with your style */
.btn {
    padding: .45rem .9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.btn-primary {
    background: #e53935;
    border-color: #c62828;
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background: #eef6ff;
    color: #0b5fff;
    border-color: #cfe1ff;
}

/* Kill full-width slab buttons Identity sometimes uses */
.w-100 {
    width: auto !important;
}

/* Manage layout niceties we added earlier */
.manage-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.manage-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manage-nav a {
    display: block;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: inherit;
}

    .manage-nav a.active {
        background: #eef6ff;
        color: #0b5fff;
    }


/* ===== Identity Manage pages: make Bootstrap "form-floating" behave like normal fields ===== */
.form-floating {
    position: static;
    display: block;
    margin-bottom: .85rem;
}

    .form-floating > label {
        position: static; /* stop floating overlay */
        transform: none;
        opacity: 1;
        padding: 0;
        margin: 0 0 .35rem;
        font-weight: 600;
    }

    /* Inputs inside form-floating */
    .form-floating > .form-control,
    .form-floating > .form-select,
    .form-floating > textarea.form-control {
        display: block;
        width: 100%;
        height: auto;
        padding: .55rem .7rem;
        line-height: 1.25;
        background: #fff;
        border: 1px solid #e6eaed;
        border-radius: 10px;
        font: inherit;
    }

/* Validation/help text */
.form-text,
.text-danger,
.field-validation-error {
    display: block;
    margin-top: .35rem;
    font-size: .9rem;
    color: #b00020;
}

/* ===== Neutralize common Bootstrap layout classes Identity uses ===== */
.row {
    display: block;
    margin: 0;
}

.col-md-6, .col-md-8, .col-md-4, .col-12 {
    width: 100%;
    padding: 0;
}

/* Keep Manage nav tidy (if Bootstrap nav-pills existed) */
.nav-pills .nav-link {
    border-radius: 8px;
}

    .nav-pills .nav-link.active {
        background: #eef6ff;
        color: #0b5fff;
    }

/* Buttons (if Identity still renders `.btn`, `.w-100`, etc.) */
.btn {
    padding: .45rem .9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.btn-primary {
    background: #e53935;
    border-color: #c62828;
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background: #eef6ff;
    color: #0b5fff;
    border-color: #cfe1ff;
}

.w-100 {
    width: auto !important;
}
/* prevent giant full-width slab */
/* Identity: convert Bootstrap 'form-floating' to normal stacked label+input */
.card .card-body .form-floating,
form .form-floating {
    position: static !important;
    display: block !important;
    margin-bottom: .85rem !important;
}

    .card .card-body .form-floating > label,
    form .form-floating > label {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        padding: 0 !important;
        margin: 0 0 .35rem !important;
        font-weight: 600 !important;
    }

    /* Inputs inside floating groups */
    .card .card-body .form-floating > .form-control,
    .card .card-body .form-floating > .form-select,
    .card .card-body .form-floating > textarea.form-control,
    form .form-floating > .form-control,
    form .form-floating > .form-select,
    form .form-floating > textarea.form-control {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: .55rem .7rem !important;
        line-height: 1.25 !important;
        background: #fff !important;
        border: 1px solid #e6eaed !important;
        border-radius: 10px !important;
        font: inherit !important;
    }

/* Neutralize Bootstrap layout wrappers that collapse fields without Bootstrap */
.row {
    display: block !important;
    margin: 0 !important;
}

[class^="col-"], [class*=" col-"] {
    width: 100% !important;
    padding: 0 !important;
}

/* Identity .btn compatibility (keeps buttons consistent everywhere) */
.btn {
    padding: .45rem .9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.btn-primary {
    background: #e53935;
    border-color: #c62828;
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background: #eef6ff;
    color: #0b5fff;
    border-color: #cfe1ff;
}

.w-100 {
    width: auto !important;
}
/* avoid full-width slabs */


/* Stack card headers (title above description) on forms/identity pages */
.card .card-header {
    display: block !important; /* override previous flex */
    padding-bottom: var(--ts-space-4);
    margin-bottom: var(--ts-space-4);
}

    .card .card-header > p {
        margin: .35rem 0 0;
    }

/* Validation summary + field errors */
.ts-validation,
.validation-summary-errors {
    color: #b00020;
    background: #fff5f5;
    border: 1px solid #f3bcbc;
    border-radius: 8px;
    padding: .6rem .8rem;
    margin-bottom: .75rem;
}

.field-validation-error {
    color: #b00020;
}

.input-validation-error {
    border-color: #b00020;
    box-shadow: 0 0 0 .15rem rgba(176, 0, 32, .15);
    outline: none;
}


/* Cards, shared */
.card-header {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

    .card-header h2 {
        margin: 0;
    }

    .card-header .muted {
        color: var(--ts-muted, #6b7280);
        margin: 0;
    }

/* Users table, and any other admin grids that use .card-table */
.card-table {
    max-height: 65vh;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--ts-border, #e5e7eb);
    background: #fff;
}

    .card-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .card-table th, .card-table td {
        padding: .6rem .75rem;
        vertical-align: middle;
    }

    .card-table thead th {
        position: sticky;
        top: 0;
        background: var(--ts-surface, #fff);
        box-shadow: 0 1px 0 var(--ts-border, #e5e7eb);
        z-index: 2;
    }

    .card-table .text-end {
        text-align: right;
    }

    /* Make admin action buttons smaller inside tables */
    .card-table .button {
        padding: .35rem .7rem;
        font-size: .9rem;
        line-height: 1.2;
    }

.ts-btn--sm {
    padding: .35rem .7rem;
    font-size: .9rem;
}

/* Mobile stacked table */
@media (max-width: 760px) {
    .card-table table,
    .card-table thead,
    .card-table tbody,
    .card-table th,
    .card-table td,
    .card-table tr {
        display: block;
    }

    .card-table thead {
        display: none;
    }

    .card-table tr {
        border: 1px solid var(--ts-border, #e5e7eb);
        border-radius: 10px;
        margin: .6rem 0;
        padding: .25rem .5rem .5rem;
        background: #fff;
    }

    .card-table td {
        display: grid;
        grid-template-columns: 9rem 1fr;
        gap: .5rem;
        padding: .4rem 0;
    }

        .card-table td::before {
            content: attr(data-label);
            font-weight: 600;
            color: var(--ts-muted, #6b7280);
        }

    .card-table .text-end {
        text-align: left;
    }
}


.table-wrapper {
    max-height: 60vh;
    overflow: auto;
}

    .table-wrapper.sticky-head thead th {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 6;
        background-clip: padding-box;
        box-shadow: 0 1px 0 rgba(0,0,0,.06);
    }



/* Bold headers */


/* Sticky first column */


/* Make header Bet cell stay on top of other sticky cells */




/* Bold, sticky header row */


/* Sticky first column (Bet) for all rows */


/* Bet header cell needs to sit above everything */



/* Wrapper: spacing and scroll area */


/* Main header row (Bet + participant names) */


/* Winnings header row (if present) sits under main header */


/* Sticky first column for all rows, with clear separator */


/* Make sure header Bet cell is above everything */


/* Participant headers style */


/* Optional: lighten striped rows so sticky parts look crisp */


/* Main header row (Bet + participant names) */


/* Sticky first column for all rows, with separator */


/* Make sure Bet header cell is above body cells */



.team-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Center summary card header content */
.section-card.summary-card > .section-card__header {
    display: flex;
    justify-content: center;
}

    .section-card.summary-card > .section-card__header h3 {
        margin: 0;
    }




/* Section cards for visual separation */
.section-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.05);
    margin-bottom: 1.25rem;
}

.section-card__header {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(90deg, rgba(10,19,40,.06), rgba(10,19,40,.03));
}

.section-card__body {
    padding: 1rem;
}

/* Allow long tables to scroll horizontally on narrow viewports */
.table-responsive {
    overflow-x: auto;
}


/* tighten Friends table row spacing */
.friends-table .button {
    margin-bottom: 0;
}

.friends-table form {
    margin: 0;
}

.friends-table td, .friends-table th {
    padding-top: .5rem;
    padding-bottom: .5rem;
}


/* Force validation summaries to render in red */
.text-danger, .validation-summary-errors, .field-validation-error {
    color: #dc3545 !important;
}

/* ============== General UI helpers ============== */

/* Section cards for visual separation */
.section-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.05);
    margin-bottom: 1.25rem;
}

.section-card__header {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(90deg, rgba(10,19,40,.06), rgba(10,19,40,.03));
}

.section-card__body {
    padding: 1rem;
}

/* Allow long tables to scroll horizontally on narrow viewports */
.table-responsive {
    overflow-x: auto;
}

/* Friends table spacing */
.friends-table .button {
    margin-bottom: 0;
}

.friends-table form {
    margin: 0;
}

.friends-table td,
.friends-table th {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* Validation in red */
.text-danger,
.validation-summary-errors,
.field-validation-error {
    color: #dc3545 !important;
}

/* Optional link look used in header summaries */
.header .nav-link-like {
    display: inline-block;
    padding: .5rem .75rem;
    color: var(--pico-primary);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

    .header .nav-link-like:hover {
        text-decoration: underline;
    }

/* ============== Admin menu, scoped and minimal ============== */

/* Keep Admin aligned with the other top links */
header nav > ul {
    align-items: center !important;
}

/* The details element gets margin from Pico, cancel it */
header details.admin-menu {
    position: relative;
    margin-bottom: 0 !important;
}

    header details.admin-menu[open] > summary {
        margin-bottom: 0 !important;
    }

    /* Main Admin panel, vertical list under Admin */
    header details.admin-menu > ul.menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 8rem;
        margin: .25rem 0 0 0;
        padding: .25rem 0;
        background: var(--pico-card-background-color);
        border: 1px solid var(--pico-muted-border-color);
        border-radius: .375rem;
        list-style: none;
        z-index: 1000;
    }

/* Items inside the Admin panel */
header .menu li {
    margin: 0;
    padding: 0 .75rem;
}

header .menu a,
header .menu summary {
    display: block;
    padding: .375rem 0;
    white-space: nowrap;
}

header .menu .menu-sep {
    height: 1px;
    margin: .25rem 0;
    background: var(--pico-muted-border-color);
}

/* Rows act as full width anchors for flyouts */
header details.submenu {
    position: relative;
    display: block;
    width: 100%;
}

    header details.submenu > summary {
        list-style: none;
        cursor: pointer;
        box-sizing: border-box;
        padding: .375rem .25rem; /* trims right padding so the gutter stays tight */
    }

    /* Right flyouts, fully outside the left panel box */
    header details.submenu > ul,
    header details.submenu > ul[role="list"] {
        position: absolute;
        top: 0;
        left: calc(100% + .30rem); /* small consistent gutter */
        margin: 0;
        min-width: 8rem;
        padding: .25rem 0;
        background: black;
        border: 1px solid var(--pico-muted-border-color);
        border-radius: .375rem;
        list-style: none;
        z-index: 1002;
    }

/* Safety, keep nested lists vertical inside nav */
header nav ul ul {
    display: block !important;
    flex-direction: column !important;
    gap: 0 !important;
}



/* === Participants and Bets grid (single source of truth) === */

.section-card.participants-card > .section-card__header {
    padding-bottom: .25rem;
}

.section-card.participants-card > .section-card__body {
    padding-top: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

    .section-card.participants-card > .section-card__body.bet-table-wrapper {
        height: 420px;
        overflow: auto;
        padding: 0 !important;
        background: #fff;
        position: relative;
    }


.section-card.participants-card table.bet-table {
    margin: 0;
    min-width: 100%;
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
}

    .section-card.participants-card table.bet-table th,
    .section-card.participants-card table.bet-table td {
        white-space: nowrap;
    }

    /* Make the two header rows bold (Bet row, Winnings row) */
    .section-card.participants-card table.bet-table thead tr:first-child th,
    .section-card.participants-card table.bet-table thead tr.winnings-header th {
        font-weight: 700;
    }


    /* Sticky header row 1 (Bet, participant names) */
    .section-card.participants-card table.bet-table thead tr:first-child th {
        position: sticky;
        top: 0;
        z-index: 5;
        background: #fff;
    }

    /* Sticky header row 2 (Winnings), offset by header row 1 height set in JS */
    .section-card.participants-card table.bet-table thead tr.winnings-header th {
        position: sticky;
        top: var(--bets-header-row-height, 0px);
        z-index: 4;
        background: #fff;
    }

    /* Sticky first column (Bet labels, Winnings label) */
    .section-card.participants-card table.bet-table th.sticky-col,
    .section-card.participants-card table.bet-table td.sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
        border-right: 1px solid #dee2e6;
    }

    /* Top-left cells above everything */
    .section-card.participants-card table.bet-table thead tr:first-child th.sticky-col {
        z-index: 7;
    }

    .section-card.participants-card table.bet-table thead tr.winnings-header th.sticky-col {
        z-index: 6;
    }

    /* Let long bet labels wrap (body first column only) */
    .section-card.participants-card table.bet-table tbody td.sticky-col {
        white-space: normal;
    }

.field-error {
    color: #b00020;
    font-size: .9rem;
    display: block;
    margin-top: .25rem
}

.be-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .5rem 0 1rem
}

.be-search-form {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1
}

.be-actions {
    display: flex;
    gap: .5rem
}

.be-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .5rem 0 1rem
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .25rem .6rem;
    border: 1px solid #dfe3e6;
    border-radius: 999px;
    font-size: .9rem;
    background: #fff
}

    .chip .chip-remove {
        border: 0;
        background: transparent;
        color: #0b5fff;
        font-weight: 700;
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        opacity: 1
    }

        .chip .chip-remove:hover {
            text-decoration: none
        }

.be-drawer::backdrop {
    background: rgba(0,0,0,.35)
}

.be-drawer {
    border: 0;
    width: min(560px, 94vw);
    max-height: 92vh;
    padding: 0;
    margin: 0 0 0 auto;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    background: #fff
}

    .be-drawer > article {
        display: grid;
        grid-template-rows: auto 1fr auto;
        height: 100%
    }

.be-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem .75rem;
    border-bottom: 1px solid #e6eaed;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1
}

.be-filters-form {
    padding: 1rem;
    overflow: auto
}

.filter-group {
    margin: 0 0 1rem;
    padding: .5rem 0 .25rem;
    border-bottom: 1px dashed #e6eaed
}

    .filter-group legend {
        font-weight: 600;
        margin-bottom: .6rem;
        font-size: .95rem
    }

.filter-option {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .25rem .85rem .25rem 0;
    padding: .25rem .4rem;
    border-radius: 6px
}

.be-drawer-footer {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    padding: .75rem 1rem;
    border-top: 1px solid #e6eaed;
    position: sticky;
    bottom: 0;
    background: inherit
}

/* --- Betting Events grouped layout and sizing --- */
.betting-events {
    overflow: auto;
    max-height: 70vh;
    padding: .5rem;
}

/* visual for grouped cards */
.betting-card {
    border: 1px solid #c9e3d6;
    border-radius: 12px;
    background: #f6fbf8;
    margin: .75rem 0;
}

.betting-card__header {
    background: #1f4d42;
    color: #fff;
    padding: .5rem .75rem;
    font-weight: 700;
    border-bottom: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Grid: label | number (if any) | checkbox */
.betting-list {
    padding: .35rem .55rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(6rem, 25%) auto;
    gap: .35rem .75rem;
    align-items: center;
    background: #f6fbf8;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.bet-row {
    display: contents;
}

/* single line label */
.bet-label {
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* collapse when no OU field */
.bet-input-wrap:empty {
    width: 0;
}

/* fixed height and min width for threshold input */
.bet-input {
    width: 100% !important;
    min-width: 6rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    padding: .15rem .35rem !important;
    font-size: .90rem;
    line-height: 1.1;
    box-sizing: border-box;
}

.betting-list input[type="number"],
.betting-list input[type="text"],
.betting-list select {
    padding: .15rem .35rem;
    font-size: .90rem;
    line-height: 1.1;
}

.bet-check {
    justify-self: end;
}

/* --- Total Sport betting events layout overrides (grouped, justified) --- */
.betting-events {
    overflow: auto;
    max-height: 70vh;
    padding: .5rem;
}

.betting-card {
    border: 1px solid #c9e3d6;
    border-radius: 12px;
    background: #f6fbf8;
    margin: .75rem 0;
}

.betting-card__header {
    background: #1f4d42;
    color: #fff;
    padding: .5rem .75rem;
    font-weight: 700;
    border-bottom: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* stack rows, each row defines its grid */
.betting-list {
    padding: .35rem .55rem;
    display: flow; /* kept as in your page, browsers treat it like block */
    flex-direction: column;
    gap: .35rem;
    background: #f6fbf8;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Base row: label | checkbox */
.bet-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .75rem;
    align-items: center;
}

    /* With number input: label | input | checkbox */
    .bet-row.has-input {
        grid-template-columns: 1fr clamp(6rem, 25%, 12rem) auto;
    }

/* readable, wrapping label */
.bet-label {
    justify-self: start;
    text-align: left;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* right aligned input and checkbox */
.bet-input-wrap {
    justify-self: end;
}

.bet-check {
    justify-self: end;
}

/* compact number input */
.bet-input {
    width: 100%;
    min-width: 6rem;
    height: 2rem !important;
    min-height: 2rem !important;
    padding: .15rem .35rem !important;
    font-size: .90rem;
    line-height: 1.1;
    box-sizing: border-box;
}

/* === Responsive helpers (mobile usability) === */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 600px) {

    .team-logo {
        width: 32px !important;
        height: 32px !important;
    }

    .mobile-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .mobile-actions .btn,
        .mobile-actions a.btn,
        .mobile-actions .button,
        .mobile-actions a.button,
        .mobile-actions button {
            width: 100%;
            justify-content: center;
            margin: 0 !important;
            text-align: center;
        }

        .mobile-actions form {
            width: 100%;
        }

        .mobile-actions .mx-2 {
            display: none !important;
        }

    header.header nav.container-fluid {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: .25rem;
    }

        header.header nav.container-fluid > ul {
            flex-wrap: wrap;
            max-width: 100%;
            gap: .25rem .6rem;
            margin: 0;
        }

            header.header nav.container-fluid > ul:last-child {
                width: 100%;
                justify-content: flex-start;
            }

    header.header a.brand span {
        display: none;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Mobile cards for list pages */
    .mobile-cards {
        display: grid;
        gap: .75rem;
        margin-top: .75rem;
    }

    .mobile-card {
        padding: .85rem 1rem !important;
    }

    .mobile-card__title {
        font-weight: 650;
        margin: 0 0 .35rem 0;
    }

    .mobile-kv {
        display: grid;
        grid-template-columns: 1fr;
        gap: .25rem;
        font-size: .95rem;
    }

    .mobile-actions {
        display: flex;
        gap: .5rem;
        flex-wrap: wrap;
        margin-top: .75rem;
        color: white;
    }

        .mobile-actions .button,
        .mobile-actions button {
            width: 100%;
            justify-content: center;
            margin: 0 !important;
        }

        .mobile-actions form {
            width: 100%;
        }

    .manual-market-card select,
    .manual-market-card input[type="number"] {
        width: 100%;
    }
    /* Participants and Bets: mobile accordion */
    .bet-accordion details {
        margin: 0 0 .5rem 0;
    }

    .bet-accordion summary {
        font-weight: 650;
        padding: .5rem;
    }

    .bet-accordion .bet-rows {
        display: grid;
        gap: .5rem;
        padding-top: .5rem;
    }

    .bet-accordion .bet-row-item {
        display: grid;
        grid-template-columns: 1fr;
        gap: .15rem;
        padding: .35rem .5rem;
        border: 1px solid rgba(0,0,0,.08);
        border-radius: .5rem;
        background: var(--ts-surface, #fff);
    }

    .bet-accordion .bet-row-name {
        font-weight: 650;
    }
}

.flash-toasts {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 3000;
    pointer-events: none;
}



.flash-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}



.flash-toast__message {
    overflow-wrap: anywhere;
    line-height: 1.35;
}



.flash-toast__close {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}



    .flash-toast__close:hover {
        background: rgba(255, 255, 255, 0.20);
    }



.flash-toast[data-flash-toast-kind="error"] {
    background: rgba(160, 20, 20, 0.92);
}



.flash-toast[data-flash-toast-kind="success"] {
    background: rgba(15, 110, 60, 0.92);
}
