/* =============================================================================
   Hoopsalytics modern theme — APP COMPATIBILITY LAYER
   Loaded (after modern.css) on logged-in app pages that set $app_page = 1 before
   including template/head-modern.php (template/nav-user-modern.php loads it as a
   fallback). It implements, in the dark theme, the bootstrap 4 classes the app
   markup actually uses (grid, utilities, buttons, forms, tables, modals, dropdowns,
   tooltips) so pages keep their existing markup and bootstrap.min.js keeps driving
   modals / tooltips / dropdowns. bootstrap.css itself is NOT loaded on these pages.
   ============================================================================= */

/* ---- page wrappers (old template markup) ---- */
.contain-wrapp { padding: 20px 0 80px; }
.contain-wrapp.padding-bottom-clear { padding-bottom: 80px; }
.container, .container-sm, .container-md, .container-lg, .container-xl {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 48px;
}
.container-fluid { width: 100%; margin: 0 auto; padding: 0 24px; }
.container-xl { max-width: 1400px; }

/* rows that sit directly in <body> (lib/alert.php is included before the page wrapper on app pages):
   align them with the content column instead of bleeding past the viewport via the negative gutters */
body > .row { max-width: 1200px; margin: 0 auto; padding: 0 36px; }
@media (max-width: 767px) { body > .row { padding: 0 4px; } }
body > .row > .col-12 .alert { margin-top: 20px; }

/* app page headings are smaller than marketing headings */
.contain-wrapp h1, .container-fluid > h1 { font-size: 30px; margin: 4px 0 10px; }
.contain-wrapp h2 { font-size: 22px; margin: 18px 0 8px; }
.contain-wrapp h3 { font-size: 19px; margin: 16px 0 6px; }
h4 { font-size: 17px; font-weight: 700; margin: 14px 0 6px; }
h5 { font-size: 15px; font-weight: 700; margin: 12px 0 4px; }
h6 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; }
p { margin: 0 0 12px; }
hr { margin: 14px 0; }      /* app pages use <hr> as a list separator (event logs etc.); modern.css's 28px is for marketing pages */
.contain-wrapp h1 i, .contain-wrapp h2 i, .contain-wrapp h3 i { color: var(--brand); margin-right: 4px; }

/* old mini-hero (template/mini-hero.php) */
.inner-head { padding: 28px 0 6px; text-align: center; }
.inner-head .title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.inner-head .subtitle { font-size: 16px; color: var(--body); margin-top: 6px; }

/* ---- grid ---- */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.row > * { box-sizing: border-box; padding: 0 12px; min-width: 0; }
.no-gutters { margin: 0; } .no-gutters > * { padding: 0; }
.form-row { display: flex; flex-wrap: wrap; margin: 0 -6px; } .form-row > * { padding: 0 6px; }
.col { flex: 1 0 0%; max-width: 100%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
.col-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.offset-1 { margin-left: 8.3333%; } .offset-2 { margin-left: 16.6667%; } .offset-3 { margin-left: 25%; }
.offset-4 { margin-left: 33.3333%; } .offset-5 { margin-left: 41.6667%; } .offset-6 { margin-left: 50%; }
/* responsive columns: below their breakpoint they stack full width (like bootstrap) */
[class*="col-sm-"], [class*="col-md-"], [class*="col-lg-"], [class*="col-xl-"] { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 8.3333%; max-width: 8.3333%; } .col-sm-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; } .col-sm-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-sm-5 { flex: 0 0 41.6667%; max-width: 41.6667%; } .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.3333%; max-width: 58.3333%; } .col-sm-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; } .col-sm-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-sm-11 { flex: 0 0 91.6667%; max-width: 91.6667%; } .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .offset-sm-1 { margin-left: 8.3333%; } .offset-sm-2 { margin-left: 16.6667%; } .offset-sm-3 { margin-left: 25%; } .offset-sm-4 { margin-left: 33.3333%; }
}
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.3333%; max-width: 8.3333%; } .col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; } .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-5 { flex: 0 0 41.6667%; max-width: 41.6667%; } .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.3333%; max-width: 58.3333%; } .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; } .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-md-11 { flex: 0 0 91.6667%; max-width: 91.6667%; } .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .offset-md-1 { margin-left: 8.3333%; } .offset-md-2 { margin-left: 16.6667%; } .offset-md-3 { margin-left: 25%; } .offset-md-4 { margin-left: 33.3333%; }
}
@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 8.3333%; max-width: 8.3333%; } .col-lg-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; } .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-5 { flex: 0 0 41.6667%; max-width: 41.6667%; } .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.3333%; max-width: 58.3333%; } .col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; } .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-lg-11 { flex: 0 0 91.6667%; max-width: 91.6667%; } .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    .offset-lg-1 { margin-left: 8.3333%; } .offset-lg-2 { margin-left: 16.6667%; } .offset-lg-3 { margin-left: 25%; } .offset-lg-4 { margin-left: 33.3333%; }
}
@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 8.3333%; max-width: 8.3333%; } .col-xl-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; } .col-xl-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-xl-5 { flex: 0 0 41.6667%; max-width: 41.6667%; } .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-7 { flex: 0 0 58.3333%; max-width: 58.3333%; } .col-xl-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-xl-9 { flex: 0 0 75%; max-width: 75%; } .col-xl-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-xl-11 { flex: 0 0 91.6667%; max-width: 91.6667%; } .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
    .offset-xl-2 { margin-left: 16.6667%; } .offset-xl-3 { margin-left: 25%; }
}
/* small screens: fixed-fraction cols narrower than a third stack too, so labels/inputs don't crush */
@media (max-width: 767px) {
    .col-1, .col-2, .col-3, .col-4, .offset-1, .offset-2, .offset-3, .offset-4 { flex: 0 0 100%; max-width: 100%; margin-left: 0; }
    .container, .container-sm, .container-md, .container-lg, .container-xl { padding: 0 16px; }
    .container-fluid { padding: 0 12px; }
}

.align-items-center { align-items: center; } .align-items-start { align-items: flex-start; } .align-items-end { align-items: flex-end; }
.justify-content-center { justify-content: center; } .justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; } .justify-content-start { justify-content: flex-start; }
.flex-wrap { flex-wrap: wrap; } .flex-column { flex-direction: column; } .flex-row { flex-direction: row; }
.d-flex { display: flex !important; } .d-inline-flex { display: inline-flex !important; }

/* ---- display / visibility utilities ---- */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
@media (min-width: 576px) { .d-sm-none { display: none !important; } .d-sm-block { display: block !important; } .d-sm-inline { display: inline !important; } .d-sm-inline-block { display: inline-block !important; } .d-sm-flex { display: flex !important; } }
@media (min-width: 768px) { .d-md-none { display: none !important; } .d-md-block { display: block !important; } .d-md-inline-flex { display: inline-flex !important; } .d-md-inline { display: inline !important; } .d-md-inline-block { display: inline-block !important; } .d-md-flex { display: flex !important; } .d-md-table-cell { display: table-cell !important; } }
@media (min-width: 992px) { .d-lg-none { display: none !important; } .d-lg-block { display: block !important; } .d-lg-inline { display: inline !important; } .d-lg-inline-block { display: inline-block !important; } .d-lg-flex { display: flex !important; } .d-lg-table-cell { display: table-cell !important; } }
@media (min-width: 1200px) { .d-xl-none { display: none !important; } .d-xl-block { display: block !important; } .d-xl-inline { display: inline !important; } .d-xl-flex { display: flex !important; } }
.invisible { visibility: hidden !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.position-relative { position: relative; } .position-absolute { position: absolute; }
.overflow-auto { overflow: auto; } .overflow-hidden { overflow: hidden; }
.w-100 { width: 100% !important; } .w-50 { width: 50% !important; } .w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.float-right { float: right !important; } .float-left { float: left !important; } .float-none { float: none !important; }
.clearfix::after { display: block; clear: both; content: ""; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; } .ml-auto { margin-left: auto !important; } .mr-auto { margin-right: auto !important; }
.text-left { text-align: left !important; } .text-right { text-align: right !important; } .text-nowrap { white-space: nowrap !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-muted { color: var(--faint) !important; }
.text-primary { color: var(--brand-hot) !important; }
.text-secondary { color: var(--body) !important; }
.text-warning { color: #ecc978 !important; }
.text-success { color: #4cd97e !important; }
.text-danger { color: #ee6b6b !important; }
.text-info { color: #6cb6ff !important; }
.text-white { color: #fff !important; }
.text-dark { color: var(--ink) !important; }
.text-uppercase { text-transform: uppercase; }
.font-weight-bold, .font-weight-bolder { font-weight: 700 !important; } .font-weight-normal { font-weight: 400 !important; }
.font-italic { font-style: italic; }
.small, small { font-size: 85%; }
.lead { font-size: 18px; color: var(--body); }
.rounded { border-radius: 8px; } .rounded-circle { border-radius: 50%; }
.border { border: 1px solid var(--line); } .border-0 { border: 0 !important; }
.shadow-sm, .shadow { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8); }
.img-fluid { max-width: 100%; height: auto; }
.img-thumbnail { padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; max-width: 100%; height: auto; }

/* spacing scale: 0 .25rem .5rem 1rem 1.5rem 3rem */
.m-0 { margin: 0 !important; } .mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .ml-0 { margin-left: 0 !important; } .mr-0 { margin-right: 0 !important; }
.m-1 { margin: .25rem !important; } .mt-1 { margin-top: .25rem !important; } .mb-1 { margin-bottom: .25rem !important; } .ml-1 { margin-left: .25rem !important; } .mr-1 { margin-right: .25rem !important; }
.m-2 { margin: .5rem !important; } .mt-2 { margin-top: .5rem !important; } .mb-2 { margin-bottom: .5rem !important; } .ml-2 { margin-left: .5rem !important; } .mr-2 { margin-right: .5rem !important; }
.m-3 { margin: 1rem !important; } .mt-3 { margin-top: 1rem !important; } .mb-3 { margin-bottom: 1rem !important; } .ml-3 { margin-left: 1rem !important; } .mr-3 { margin-right: 1rem !important; }
.m-4 { margin: 1.5rem !important; } .mt-4 { margin-top: 1.5rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .ml-4 { margin-left: 1.5rem !important; } .mr-4 { margin-right: 1.5rem !important; }
.m-5 { margin: 3rem !important; } .mt-5 { margin-top: 3rem !important; } .mb-5 { margin-bottom: 3rem !important; }
.mx-1 { margin-left: .25rem !important; margin-right: .25rem !important; } .mx-2 { margin-left: .5rem !important; margin-right: .5rem !important; } .mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.my-1 { margin-top: .25rem !important; margin-bottom: .25rem !important; } .my-2 { margin-top: .5rem !important; margin-bottom: .5rem !important; } .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; } .my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.p-0 { padding: 0 !important; } .p-1 { padding: .25rem !important; } .p-2 { padding: .5rem !important; } .p-3 { padding: 1rem !important; } .p-4 { padding: 1.5rem !important; }
.pt-0 { padding-top: 0 !important; } .pt-1 { padding-top: .25rem !important; } .pt-2 { padding-top: .5rem !important; } .pt-3 { padding-top: 1rem !important; } .pt-4 { padding-top: 1.5rem !important; }
.pb-0 { padding-bottom: 0 !important; } .pb-1 { padding-bottom: .25rem !important; } .pb-2 { padding-bottom: .5rem !important; } .pb-3 { padding-bottom: 1rem !important; } .pb-4 { padding-bottom: 1.5rem !important; }
.pl-0 { padding-left: 0 !important; } .pl-1 { padding-left: .25rem !important; } .pl-2 { padding-left: .5rem !important; } .pl-3 { padding-left: 1rem !important; }
.pr-0 { padding-right: 0 !important; } .pr-1 { padding-right: .25rem !important; } .pr-2 { padding-right: .5rem !important; } .pr-3 { padding-right: 1rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; } .px-1 { padding-left: .25rem !important; padding-right: .25rem !important; } .px-2 { padding-left: .5rem !important; padding-right: .5rem !important; } .px-3 { padding-left: 1rem !important; padding-right: 1rem !important; } .px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; } .py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; } .py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; } .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; } .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

/* ---- buttons (bootstrap class names, dark palette; icons are Font Awesome) ---- */
.btn, .btn-e {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.25;
    padding: 9px 16px; border-radius: 8px; border: 1.5px solid transparent;
    cursor: pointer; text-decoration: none; white-space: nowrap; vertical-align: middle;
    background: var(--input); color: var(--ink);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.btn:hover, .btn-e:hover { color: var(--ink); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(247, 147, 29, 0.25); }
.btn:focus-visible { outline: 2px solid var(--sa-video); outline-offset: 2px; box-shadow: none; }   /* keyboard focus ring */
.btn-primary, .btn-e-primary { background: var(--brand); color: #14171c; }
.btn-primary:hover, .btn-e-primary:hover { background: var(--brand-hot); color: #14171c; }
.btn-success { background: #2fbf63; color: #0f1a13; } .btn-success:hover { background: #4cd97e; color: #0f1a13; }
.btn-info { background: #4ba3f5; color: #0e1620; } .btn-info:hover { background: #6cb6ff; color: #0e1620; }
.btn-danger { background: #e05656; color: #fff; } .btn-danger:hover { background: #ee6b6b; color: #fff; }
.btn-warning { background: #e7b84a; color: #1a1406; } .btn-warning:hover { background: #f3c85f; color: #1a1406; }
.btn-secondary { background: #3a4250; color: var(--ink); border-color: var(--sa-slate-edge); }   /* the edge lifts the component boundary to 3.24:1 on the page bg (WCAG 1.4.11); the fill alone is 1.84:1 */ .btn-secondary:hover { background: #4a5364; }
.btn-back { background: #3568b8; color: #fff; } .btn-back:hover { background: #4a7fd0; color: #fff; }  /* "Back to ..." navigation, site-wide */
.btn-learn { background: #cfd6e0; border-color: #cfd6e0; color: #14171c; font-weight: 600; } .btn-learn:hover { background: #e2e8f0; border-color: #e2e8f0; color: #14171c; filter: none; }  /* "Learn More" help links, site-wide: light gray fill - visible, but neutral next to the orange/green/blue action colors */

/* ---- button hierarchy (tokens in css/modern.css :root) ----
   Weight carries hierarchy, hue carries meaning:
   tier 1  .btn-primary      solid brand orange - at most ONE per screen (the page's single primary action)
   tier 2  .btn-accent-soft  tinted brand - section-level actions
   tier 3  .btn-row          neutral slate - per-row controls; the color coding lives in the leading icon (.icon-lead + .is-video / .is-analytics) */
.btn-accent-soft { background: var(--sa-brand-tint); color: var(--sa-brand); border-color: var(--sa-brand-tint-edge); }
.btn-accent-soft:hover { background: #30230f; color: var(--sa-brand); }
.btn-row { background: var(--sa-slate); color: var(--sa-ink); border-color: var(--sa-slate-edge); }
.btn-row:hover { background: var(--sa-slate-hover); color: var(--sa-ink); }
.btn-row .icon-lead { color: var(--sa-ink-dim); }
.btn-row.is-video .icon-lead { color: var(--sa-video); }
.btn-row.is-analytics .icon-lead { color: var(--sa-brand); }

/* ---- jersey color picker strip (games/start-game.php etc.) ---- */
/* the current-color swatch opens the picker; a caret signals it's clickable.
   Drawn via ::after because the page JS rewrites the button's inner html on every pick */
#home-color-display::after, #visitor-color-display::after {
    content: ""; display: inline-block; margin-left: 8px; vertical-align: 2px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}
.jersey-picker { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.jersey-picker-close {
    width: 26px; height: 26px; padding: 0;
    background: none; border: 1px solid var(--input-line); border-radius: 50%;
    color: var(--faint); font-size: 15px; line-height: 1; cursor: pointer;
}
.jersey-picker-close:hover { color: var(--ink); border-color: #4a5462; }

/* ---- stats toolbar with segmented controls (template/subnav-show-stats*.php) ----
   groups of exclusive, instant-effect choices render as connected segments;
   the active segment is orange (orange = analytics) */
.stats-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 12px 30px; padding: 8px 0 6px;
}
.tb-group { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.tb-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; color: var(--faint); text-transform: uppercase; }
.seg { display: inline-flex; border: 1px solid var(--input-line); border-radius: 8px; overflow: hidden; background: var(--input); }
.seg a {
    display: block; padding: 7px 14px; white-space: nowrap; cursor: pointer;
    font-size: 13.5px; font-weight: 600; color: var(--body);
    border-right: 1px solid var(--input-line);
}
.seg a:last-child { border-right: none; }
.seg a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.seg a.on { background: var(--brand); color: #14171c; }
.seg a.on:hover { background: var(--brand-hot); color: #14171c; }
/* per-game / totals toggle at the right of the comparison table (api/get-summary.php) */
.values-toggle { display: inline-flex; vertical-align: middle; }
.tb-gear { color: #4ba3f5; cursor: pointer; font-size: 15px; }    /* customize cog: blue, site-wide (matches btn-info "Customize View" buttons) */
.tb-gear:hover { color: #8ec7ec; }
.tb-gear i { color: inherit !important; }
.tb-reset {
    font-size: 13.5px; font-weight: 600; color: var(--faint); cursor: pointer;
    border: 1px solid transparent; border-radius: 8px; padding: 7px 12px;
}
.tb-reset:hover { color: var(--ink); border-color: var(--input-line); }
/* a fixed box for the View select: its width can't follow the longest option (which spilled over the next group),
   and long names clip with an ellipsis instead */
.stats-toolbar select { width: 240px; min-width: 0; max-width: 240px; flex: 0 0 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.btn-light { background: #d4dae2; color: #14171c; } .btn-dark { background: #0b0d11; color: var(--ink); border-color: var(--line); }
.btn-link { background: none; color: var(--brand); padding-left: 4px; padding-right: 4px; } .btn-link:hover { color: var(--brand-hot); filter: none; text-decoration: underline; }
.btn-outline-primary { background: none; border-color: var(--brand); color: var(--brand); } .btn-outline-primary:hover { background: var(--brand-tint); color: var(--brand-hot); }
.btn-outline-info { background: none; border-color: #4ba3f5; color: #6cb6ff; } .btn-outline-info:hover { background: rgba(75, 163, 245, 0.14); color: #8ec7ec; }
.btn-outline-success { background: none; border-color: #2fbf63; color: #4cd97e; } .btn-outline-success:hover { background: rgba(47, 191, 99, 0.14); }
.btn-outline-danger { background: none; border-color: #e05656; color: #ee6b6b; } .btn-outline-danger:hover { background: rgba(224, 86, 86, 0.14); }
.btn-outline-warning { background: none; border-color: #e7b84a; color: #ecc978; } .btn-outline-warning:hover { background: rgba(231, 184, 74, 0.14); }
.btn-outline-secondary { background: none; border-color: var(--input-line); color: var(--body); } .btn-outline-secondary:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.btn-outline-dark, .btn-outline-light { background: none; border-color: var(--input-line); color: var(--ink); }
.btn-sm, .btn-group-sm > .btn { font-size: 13px; padding: 5px 11px; border-radius: 6px; }
.btn-lg, .btn-group-lg > .btn { font-size: 16px; padding: 12px 22px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn-group, .btn-group-vertical { display: inline-flex; vertical-align: middle; }
/* joined strip: square off the shared inner edges only (mirrors bootstrap 4). A dropdown toggle keeps its
   right corners because its .dropdown-menu sibling always follows it, so it is never :last-child */
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1.5px; }
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group-vertical { flex-direction: column; }
/* loose row of separate action buttons (NOT a joined .btn-group): wraps inside a table cell instead of forcing the table wider than the page */
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.btn .badge { margin-left: 4px; }
button.btn.btn-primary.option-button { margin-right: 4px; margin-bottom: 4px; }
/* a plain <button> with no class */
button:not(.btn):not(.close):not(.hamburger):not([class*="btn"]) {
    font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 7px;
    border: 1px solid var(--input-line); background: var(--input); color: var(--ink); cursor: pointer;
}

/* ---- badges ---- */
.badge {
    display: inline-block; padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.2;
    border-radius: 6px; background: #3a4250; color: var(--ink); vertical-align: baseline; white-space: nowrap;
}
.badge-pill { border-radius: 999px; padding-left: 10px; padding-right: 10px; }
.badge-primary { background: var(--brand); color: #14171c; }
.badge-success { background: #2fbf63; color: #0f1a13; }
.badge-info { background: #4ba3f5; color: #0e1620; }
.badge-danger { background: #e05656; color: #fff; }
.badge-warning { background: #e7b84a; color: #1a1406; }
.badge-secondary { background: #3a4250; color: var(--ink); }
.badge-light { background: #d4dae2; color: #14171c; }
.badge-dark { background: #414c5e; color: #fff; border: 1px solid #5d6a7f; }   /* steel, not black: readable on the dark panel (event log Start/Stop/Sub/Starter) */
a.badge-dark:hover { background: #505c70; border-color: #75839a; color: #fff; text-decoration: none; }

/* ---- forms (bootstrap markup + bare inputs) ---- */
label { color: #d4dae2; }
.form-group { margin-bottom: 14px; }
.form-group.row { align-items: flex-start; }      /* label lines up with the FIRST line of a tall column (checkbox lists), like bootstrap */
.col-form-label { padding-top: 8px; padding-bottom: 8px; font-weight: 600; color: #d4dae2; line-height: 1.4; }
/* a column that starts with a bare checkbox/radio list: pad it so the first option sits level with the label text */
.form-group.row > div:has(> input[type="checkbox"]:first-child), .form-group.row > div:has(> input[type="radio"]:first-child) { padding-top: 7px; }
.form-control, .custom-select,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.btn),
select, textarea {
    font: inherit; font-size: 14.5px; color: var(--ink);
    background: var(--input); border: 1.5px solid var(--input-line); border-radius: 8px;
    padding: 8px 12px; line-height: 1.4;
}
.form-control, .custom-select { display: block; width: 100%; }
.form-control:focus, .custom-select:focus, input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(247, 147, 29, 0.2);
}
.form-control::placeholder, input::placeholder, textarea::placeholder { color: var(--faint); }
.form-control:disabled, .form-control[readonly], input:disabled, select:disabled, textarea:disabled { opacity: 0.6; cursor: not-allowed; }
.form-control-sm, .custom-select-sm, .form-control.form-control-sm { padding: 5px 9px; font-size: 13.5px; border-radius: 6px; }
select.form-control-sm, select.form-control.form-control-sm, .custom-select-sm { padding-right: 30px; }   /* small selects keep room for the chevron */
.form-control-lg { padding: 12px 14px; font-size: 16px; }
.form-control-plaintext { background: none; border: 0; padding-left: 0; color: var(--ink); }
select, select.form-control, .custom-select {   /* select.form-control: outrank the .form-control background shorthand so the chevron survives */
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5.5 L7 9.5 L11 5.5' stroke='%23c9ced9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
/* selects get a lighter fill + brighter border than text inputs so they read as controls against the card */
/* text inputs: lighter fill + border than the card so they read as fields */
.form-control, .custom-select,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.btn),
select, textarea { background-color: #262c36; border-color: #4a5468; }
/* one height for single-line inputs and selects so they line up side by side (textareas + list boxes excluded) */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.btn),
select:not([multiple]):not([size]), .custom-select:not([multiple]) { height: 40px; box-sizing: border-box; }
.form-control-sm, .custom-select-sm, .form-control.form-control-sm { height: 34px; }
.form-control-lg { height: 48px; }
table.table input:not([type="checkbox"]):not([type="radio"]), table.table select { height: 34px; }   /* compact in data tables */
/* selects: a step lighter again, with a brighter border, so they read as drop-downs */
select, .custom-select { background-color: #2b3240; border-color: #5b6779; padding-left: 16px; text-indent: 4px; }   /* a little breathing room before the text */
select:hover:not(:focus), .custom-select:hover:not(:focus) { background-color: #323a4a; border-color: #7c889f; }
select:focus, .custom-select:focus { background-color: #323a4a; }
select[multiple], select[size]:not([size="1"]) { background-image: none; padding-right: 12px; }
select option { background: var(--card); color: var(--ink); }

/* the open drop-down list: Firefox honors option padding natively; Chrome/Edge 134+ can style the popup itself via
   the customizable-select mode (older browsers ignore this block and keep the native list) */
select option { padding: 7px 12px; }
@supports (appearance: base-select) {
    select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
    select:not([multiple]):not([size])::picker-icon { display: none; }   /* our own caret (background image) stays */
    /* in this mode the control is a box: center the chosen value vertically (our block/height rules would top-align it) */
    select:not([multiple]):not([size]), .custom-select:not([multiple]) { display: inline-flex; vertical-align: middle; align-items: center; line-height: 1.2; }   /* inline-flex: a bare select stays content-width (block-level flex made it fill its column) */
    select:not([multiple]):not([size]) > selectedcontent, select:not([multiple]):not([size]) > button { display: block; }
    /* the chosen value must stay inside the box (a long option would otherwise overflow onto the next control) */
    select:not([multiple]):not([size]) { overflow: hidden; min-width: 0; }
    select:not([multiple]):not([size]) > selectedcontent, select:not([multiple]):not([size]) > button { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    select::picker(select) {
        background: #262c36; color: var(--ink);
        border: 1px solid #5b6779; border-radius: 10px; padding: 6px;
        box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75); margin-top: 4px;
    }
    select option { padding: 9px 14px; border-radius: 6px; font-size: 14.5px; color: var(--ink); }
    select option:hover, select option:focus-visible { background: rgba(247, 147, 29, 0.16); outline: none; }
    select option:checked { background: var(--brand); color: #14171c; }
    select option::checkmark { display: none; }
}
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 15px; height: 15px; vertical-align: -2px; margin: 0 4px 0 0; }
input[type="file"] { color: var(--body); font-size: 14px; }
input[type="file"]::file-selector-button {
    font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; margin-right: 10px;
    border-radius: 7px; border: 1px solid var(--input-line); background: var(--input); color: var(--ink); cursor: pointer;
}
input[type="range"] { accent-color: var(--brand); }
input[type="color"] { border: 1px solid var(--input-line); border-radius: 6px; background: var(--input); padding: 2px; height: 34px; width: 48px; }
.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-inline .form-control, .form-inline .custom-select { display: inline-block; width: auto; }
.form-check { display: flex; align-items: center; gap: 6px; }
.form-check-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.form-text { font-size: 13px; color: var(--faint); }
.custom-control { position: relative; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.custom-control-input { position: static; width: 15px; height: 15px; opacity: 1; margin: 0; }
.custom-control-label { color: #d4dae2; cursor: pointer; }
.custom-control-label::before, .custom-control-label::after { display: none; }
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group > .form-control { flex: 1 1 auto; width: 1%; }
.input-group-prepend, .input-group-append { display: flex; }
.input-group-text { display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--body); background: #1a1f27; border: 1.5px solid var(--input-line); }
.input-group > .form-control:not(:last-child), .input-group-prepend .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:first-child), .input-group-append .input-group-text, .input-group-append .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.is-invalid, .form-control.is-invalid { border-color: #e05656 !important; }
.invalid-feedback { display: block; color: #ec9aa2; font-size: 13px; margin-top: 4px; }
.valid-feedback { display: block; color: #8fd8ab; font-size: 13px; margin-top: 4px; }

/* ---- tables (base .table rules live in modern.css) ---- */
/* app tables (box scores etc.) have many narrow numeric columns - tighter horizontal
   padding than the marketing tables' 14px so more columns fit before scrolling */
table.table th { padding: 11px 8px; }
table.table td { padding: 9px 8px; }
/* stats tables (box scores and friends) size to their content, centered - not
   stretched across the full page width when they only have a few columns */
table.table-sticky-header { width: auto; margin-left: auto; margin-right: auto; }
/* .stats-block: one content-sized block wrapping a heading/toolbar (.stats-block-head, with
   .stats-block-title on the left and .stats-block-actions on the right), the content-sized table
   and the scroll toggle, so they all line up with the table's edges while the block stays centered.
   (show.php, show-details.php and player-impact.php also carry local copies of these rules.) */
.stats-block { width: -webkit-fit-content; width: fit-content; max-width: 100%; margin: 0 auto; }
.stats-block table.table-sticky-header { margin-left: 0; margin-right: 0; }
.stats-block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.stats-block-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.stats-block-title h3, .stats-block-title h4, .stats-block-title h5, .stats-block-head > h3, .stats-block-head > h4 { margin: 0; }
.stats-block-actions { margin-left: auto; }
.stats-block .stats-note { text-align: left; margin: 10px 0 0; }
table.table.table-hover tbody tr:hover { background: var(--brand-tint); }
table.table.table-bordered, table.table.table-bordered th, table.table.table-bordered td { border: 1px solid var(--line); }
table.table.table-sm th, table.table.table-sm td { padding: 5px 6px; font-size: 14px; }
table.table th.text-center, table.table td.text-center { text-align: center; }
table.table th.text-right, table.table td.text-right { text-align: right; }
table.table thead.thead-dark th { background: #0b0d11; }
table.table thead.thead-light th { background: var(--card); }
table.table tr.table-success, table.table td.table-success { background: rgba(47, 191, 99, 0.16); }
table.table tr.table-danger, table.table td.table-danger { background: rgba(224, 86, 86, 0.16); }
table.table tr.table-warning, table.table td.table-warning { background: rgba(231, 184, 74, 0.16); }
table.table tr.table-info, table.table td.table-info { background: rgba(75, 163, 245, 0.16); }
table.table tr.table-active, table.table td.table-active, table.table tr.active { background: var(--brand-tint); }
table.table tr.table-secondary, table.table tr.table-light, table.table tr.table-primary { background: rgba(255, 255, 255, 0.05); }
table.table tfoot th, table.table tfoot td { border-top: 2px solid var(--input-line); font-weight: 700; color: var(--ink); }
table.table a:not(.btn) { color: var(--brand); }
.table-responsive, .table-responsive-sm, .table-responsive-md, .table-responsive-lg { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll-wrapper { overflow: auto; width: 100%; max-height: 85vh; }
/* phones/tablets: wide stats tables scroll sideways inside their wrapper instead of pushing the page out
   (the sticky header no longer applies inside a scroll container, which is acceptable at this width) */
@media (max-width: 1080px) {
    .insert-table-scroll-wrapper-here { overflow-x: auto; max-width: 100%; }
    .stats-block { max-width: 100%; }
}
.table-sticky-header thead th { position: sticky; top: 0; background-color: var(--panel); z-index: 2; }
/* tables without the .table class (old inline layouts) */
table:not(.table) td, table:not(.table) th { padding: 3px 6px; }
/* tablesorter.js headers */
th.sortable, .sortable th { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--brand); }
th.headerSortUp::after { content: " \25B2"; font-size: 10px; color: var(--brand); }
th.headerSortDown::after { content: " \25BC"; font-size: 10px; color: var(--brand); }
/* event colour coding (game summaries / box scores) — dark-safe versions of custom.css */
/* goal highlighting on stat cells: strong enough to read at a glance on the dark background */
/* the fill is kept dark enough that the site-wide orange number links still read on it; the bright inset ring is what makes the cell pop */
.green-event { background: rgba(47, 191, 99, 0.28) !important; color: #f0fff4 !important; box-shadow: inset 0 0 0 1.5px rgba(76, 217, 126, 0.75); }
.red-event { background: rgba(224, 86, 86, 0.30) !important; color: #fff2f2 !important; box-shadow: inset 0 0 0 1.5px rgba(242, 109, 109, 0.75); }
/* goal (target) icons in stat tables: blue so they stand apart from the orange number links */
table.table a.goal-btn, table.table abbr.goal-btn { color: #6cb6ff; text-decoration: none; }
table.table a.goal-btn:hover { color: #9dd0ff; }
.white-event { background: rgba(255, 255, 255, 0.06) !important; }
/* comment / scorer count bubbles (custom.css) */
.count-icon { display: inline-block; position: relative; }
.count { position: absolute; top: 3px; right: 6px; height: 16px; width: 16px; background: #57850d; color: white !important; font-weight: 600; font-size: 12px; text-align: center; border-radius: 3px; }
.scorer-count { position: absolute; top: 3px; right: 6px; height: 16px; width: 16px; background: #F0AD4E; color: black !important; font-weight: 800; font-size: 12px; text-align: center; border-radius: 3px; }
/* game list markers (games/index.php): clips / notes / scoring errors share one cell as tinted pills;
   the count sits beside the icon as plain text instead of a tiny square overlaid on it */
.game-marks { white-space: nowrap; }
.mark-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: 13.5px; font-weight: 700; line-height: 1.2; border: 1px solid transparent; vertical-align: middle;
}
.mark-pill + .mark-pill { margin-left: 6px; }
.mark-pill i { font-size: 13px; }
table.table a.mark-clips { background: rgba(47, 191, 99, 0.16); border-color: rgba(47, 191, 99, 0.45); color: #8fd8ab; }
table.table a.mark-clips:hover { background: rgba(47, 191, 99, 0.3); color: #d2f5df; }
table.table a.mark-notes { background: rgba(75, 163, 245, 0.16); border-color: rgba(75, 163, 245, 0.45); color: #8ec5fb; }
table.table a.mark-notes:hover { background: rgba(75, 163, 245, 0.3); color: #d0e7fd; }
table.table a.mark-errors { background: rgba(224, 86, 86, 0.16); border-color: rgba(224, 86, 86, 0.5); color: #f08a8a; }
table.table a.mark-errors:hover { background: rgba(224, 86, 86, 0.3); color: #fbd0d0; }
.grid-item.col-12 { padding-bottom: 20px; padding-top: 20px; }

/* ---- lists ---- */
.list-group { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; }
.list-group-item { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); margin-top: -1px; color: #c9d0d9; }
.list-group-item.active { background: var(--brand-tint); color: var(--ink); border-color: var(--brand); }
.list-unstyled, .list-inline { list-style: none; padding-left: 0; }
.list-inline-item { display: inline-block; margin-right: 8px; }

/* ---- nav pills / tabs (bootstrap markup, static or JS) ---- */
.nav { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 4px; }
.nav-link { display: block; padding: 7px 14px; border-radius: 8px; color: var(--body); font-weight: 600; }
.nav-link:hover { color: var(--brand); }
.nav-link.active, .nav-pills .nav-link.active { background: var(--brand); color: #14171c; }
.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link.active { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-color: var(--card); margin-bottom: -1px; }
.tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; }

/* ---- dropdowns (driven by bootstrap.min.js) ---- */
.dropdown, .dropup, .btn-group { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; z-index: 1000; min-width: 180px;
    padding: 6px; margin: 4px 0 0; list-style: none;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
}
.dropdown-menu.show { display: block; }
.dropdown-menu-right { right: 0; left: auto; }
/* once popper.js has positioned a menu (it sets inline left/top + transform) clear the static right/bottom offsets,
   otherwise a .dropdown-menu-right menu has both left:0 and right:0 and is squeezed to the width of its .btn-group
   (min-width 180px) so long items spill past its edge. Mirrors bootstrap 4's [x-placement] rule. */
.dropdown-menu[x-placement^="top"], .dropdown-menu[x-placement^="right"], .dropdown-menu[x-placement^="bottom"], .dropdown-menu[x-placement^="left"] { right: auto; bottom: auto; }
.dropdown-item {
    display: block; width: 100%; padding: 8px 12px; border-radius: 8px; clear: both;
    font-size: 14.5px; font-weight: 600; color: #ccd3dc; text-align: left; white-space: nowrap;
    background: none; border: 0; cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus { color: var(--ink); background: var(--brand-tint); }
.dropdown-item.active { background: var(--brand); color: #14171c; }
.dropdown-item.disabled { opacity: 0.5; pointer-events: none; }
.dropdown-divider { height: 0; margin: 6px 0; border-top: 1px solid var(--line); }
.dropdown-header { padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--faint); }
.dropdown-toggle { cursor: pointer; }
.dropdown-toggle::after {
    content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px;
    border-top: 5px solid; border-right: 4px solid transparent; border-left: 4px solid transparent;
}
.btn.dropdown-toggle::after { margin-left: 0; }   /* .btn is inline-flex; its gap already spaces the caret */

/* ---- collapse (bootstrap.min.js) ---- */
.collapse:not(.show) { display: none; }
.collapsing { position: relative; height: 0; overflow: hidden; transition: height 0.2s ease; }

/* ---- fade (bootstrap.min.js modals, alerts, tooltips) ---- */
.fade { transition: opacity 0.15s linear; }
.fade:not(.show) { opacity: 0; }

/* ---- modals (markup in /modals/*.php, driven by bootstrap.min.js) ---- */
.modal {
    position: fixed; top: 0; left: 0; z-index: 1050; display: none; width: 100%; height: 100%;
    overflow-x: hidden; overflow-y: auto; outline: 0;
}
.modal-open { overflow: hidden; }
.modal-open .modal { overflow-x: hidden; overflow-y: auto; }
/* (some modals use class="modal-dialog-scrollable" / "-centered" WITHOUT modal-dialog, e.g. modals/event-modal.php — treat those the same) */
.modal-dialog, .modal > .modal-dialog-scrollable, .modal > .modal-dialog-centered { position: relative; width: auto; max-width: 560px; margin: 28px auto; pointer-events: none; }
.modal.fade .modal-dialog { transition: transform 0.2s ease-out; transform: translate(0, -24px); }
.modal.show .modal-dialog { transform: none; }
.modal-sm { max-width: 360px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1140px; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 56px); }
.modal-dialog-scrollable { display: flex; max-height: calc(100% - 56px); }
.modal-dialog-scrollable .modal-content { max-height: calc(100vh - 56px); overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
/* modal surface is deliberately lighter than the page/cards so it reads as a separate, opaque layer over the dimmed page */
.modal-content {
    position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto;
    background: #202631; color: var(--ink); border: 1px solid #3f4857; border-radius: 16px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6); outline: 0;
}
.modal-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(.btn),
.modal-content select, .modal-content textarea, .modal-content .form-control, .modal-content .custom-select {
    background-color: #12161c; border-color: #454f5f;
}
.modal-content .note-card, .modal-content .card { background: #1a1f28; }
.modal-content label, .modal-content .col-form-label { color: var(--ink); }
/* side-drawer variants (class="modal left" / "modal right" — used by the event editor, active players, pick subtype) */
.modal.left .modal-dialog, .modal.right .modal-dialog,
.modal.left > .modal-dialog-scrollable, .modal.right > .modal-dialog-scrollable {
    position: fixed; top: 0; bottom: 0; margin: 0; width: 100%; max-width: 540px; display: flex;
}
.modal.left .modal-dialog, .modal.left > .modal-dialog-scrollable { left: 0; }
.modal.right .modal-dialog, .modal.right > .modal-dialog-scrollable { right: 0; }
/* drawers are only as tall as their content (capped at the viewport, scrolling inside) and honour .modal-sm / .modal-lg widths */
.modal.left .modal-dialog, .modal.right .modal-dialog,
.modal.left > .modal-dialog-scrollable, .modal.right > .modal-dialog-scrollable { bottom: auto; max-height: 100vh; }
.modal.left .modal-dialog.modal-sm, .modal.right .modal-dialog.modal-sm { max-width: 380px; }
.modal.left .modal-dialog.modal-lg, .modal.right .modal-dialog.modal-lg { max-width: 900px; }
.modal.left .modal-dialog.modal-xl, .modal.right .modal-dialog.modal-xl { max-width: 1140px; }
/* the click-a-location drawer (modals/location-modal.php): the court image fills the drawer width, so a wide drawer
   makes a tall one; 640px keeps the court near its native 560px and the whole drawer well inside a laptop screen */
#location-modal .modal-dialog { max-width: 640px; }
#location-modal #courtmap { filter: invert(1); mix-blend-mode: screen; opacity: 0.85; border-radius: 8px; }   /* same dark court as the charts: white drawing inverted, black screened away */
.modal.left .modal-content, .modal.right .modal-content { height: auto; max-height: 100vh; overflow-y: auto; border-width: 0 1px 1px 0; border-radius: 0 0 16px 0; }
.modal.right .modal-content { border-width: 0 0 1px 1px; border-radius: 0 0 0 16px; }
.modal.left .modal-dialog-scrollable .modal-content, .modal.right .modal-dialog-scrollable .modal-content { max-height: 100vh; }
.modal.left .modal-dialog-centered, .modal.right .modal-dialog-centered { min-height: 0; align-items: flex-start; }
/* compact form rows inside the event editor drawer (modals/event-modal.php) */
#event-editor .modal-body { padding: 14px 20px 16px; }
#event-editor .modal-body .row { margin-bottom: 8px; align-items: center; }
#event-editor .modal-body .row .row { margin-bottom: 0; }
#event-editor .modal-body .col-form-label { padding-top: 4px; padding-bottom: 4px; font-size: 15px; font-weight: 600; color: #d4dae2; }
#event-editor .modal-body .col-form-label strong { font-weight: inherit; }
#event-editor .modal-body hr { margin: 10px 0; }
#event-editor .modal-body .form-group { margin-bottom: 0; }
#event-editor .event-editor-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid #3f4857; }
#event-editor .event-editor-update { width: auto; min-width: 300px; margin: 0 auto; padding: 12px 36px; font-size: 16px; border-radius: 10px; box-shadow: 0 8px 24px -8px rgba(247, 147, 29, 0.55); }
#event-editor .event-editor-secondary { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
#event-editor .event-editor-secondary .grow { flex: 1; }
#event-editor .event-editor-ref { font-size: 11px; color: var(--faint); text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }
#event-editor .event-editor-ref:empty { display: none; }
/* video time: segmented stepper [-] 0:00.0 [+] plus a neutral "use video time" button with an orange icon */
#event-editor .time-adjust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#event-editor .time-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid #3a4250; border-radius: 8px; overflow: hidden; background: #12161c; }
#event-editor .time-stepper button {
    font: inherit; font-size: 17px; line-height: 1; padding: 0 12px; min-width: 40px; border: 0; border-radius: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: #4ba3f5; color: #0e1620;
}
#event-editor .time-stepper button:hover { background: #6cb6ff; color: #0e1620; }
#event-editor .time-stepper #video-time-display { display: flex; align-items: center; padding: 5px 12px; min-width: 66px; justify-content: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
#event-editor .time-sync { background: #262d38; color: var(--ink); border: 1.5px solid #3a4250; padding: 5px 10px; font-size: 12.5px; }
#event-editor .time-sync:hover { background: #333b47; color: #fff; filter: none; }
#event-editor .time-sync i { color: #6cb6ff; }
/* clip emoticon tile picker (modals/comment-modal.php emoticon_picker()) */
.emoticon-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.emoticon-tile {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 64px; padding: 8px 6px 6px; margin: 0; cursor: pointer;
    background: #1a1f28; border: 1.5px solid #3a4250; border-radius: 10px;
    color: var(--body); font-size: 11px; font-weight: 600; line-height: 1;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.emoticon-tile input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; }
.emoticon-tile i { font-size: 20px; line-height: 1; }
.emoticon-tile:hover { border-color: #5a6678; color: var(--ink); }
.emoticon-tile:has(input:checked), .emoticon-tile.selected { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); box-shadow: 0 0 0 1px var(--brand) inset; }
.emoticon-label { font-size: 15px; color: #d4dae2; margin-bottom: 4px; }
/* clip start / end time controls (+ / - / set to video time) in the comment dialogs: blue, like the event editor */
#add-comment-modal a[onclick*="clip_time"], #edit-comment-modal a[onclick*="clip_time"] { color: #6cb6ff; font-size: 17px; margin-right: 2px; }
#add-comment-modal a[onclick*="clip_time"]:hover, #edit-comment-modal a[onclick*="clip_time"]:hover { color: #8ec7ec; }
.emoticon-tile:has(input:focus-visible) { outline: 2px solid var(--brand-hot); outline-offset: 2px; }

/* attributes row hides itself when the event has none */
#event-editor .attributes-row:has(#attributes-select:empty) { display: none; }
/* event attributes: two-column grid of labelled checkboxes (built in js in modals/event-modal.php) */
#attributes-select { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px; margin: 4px 0 2px; }
#event-editor .modal-body .attributes-row { margin-top: 12px; align-items: flex-start; }
#event-editor .modal-body .attributes-row .col-form-label { padding-top: 3px; }
#attributes-select:empty { display: none; }
#attributes-select .attrib-item { display: flex; align-items: center; gap: 7px; font-size: 14px; color: #d4dae2; cursor: pointer; margin: 0; line-height: 1.35; }
#attributes-select .attrib-item input { flex: none; margin: 0; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px;
    background: #1a1f28; border-bottom: 1px solid #3f4857; border-radius: 16px 16px 0 0;   /* a slightly darker band than the modal body */
}
.modal.left .modal-header, .modal.right .modal-header { border-radius: 0; }
.modal-header .close { margin: -8px -8px -8px auto; }
/* headers that are not flex rows (d-lg-block) or that nest the close button inside the title (clip player)
   still need it in the top-right corner: floats are ignored in flex rows, so this is harmless there */
.modal-header .close, .modal-title .close { float: right; }
.modal-title .close { margin: -4px -6px 0 12px; }
.modal-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.modal-title i { color: var(--brand); margin-right: 4px; }
.modal-body { position: relative; flex: 1 1 auto; display: block; padding: 18px 20px; color: #d4dae2; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #3f4857; }
.modal-backdrop { position: fixed; top: 0; left: 0; z-index: 1040; width: 100vw; height: 100vh; background: #000; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 0.72; }
.modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; }
@media (max-width: 600px) { .modal-dialog { margin: 12px; max-width: none; } }
/* generic close button (modals; .alert .close is styled in modern.css) */
.close { background: none; border: 0; padding: 4px 6px; font-size: 24px; line-height: 1; color: var(--body); cursor: pointer; opacity: 0.7; }
.close:hover { color: var(--ink); opacity: 1; }

/* ---- tooltips (bootstrap.min.js + popper) ---- */
.tooltip { position: absolute; z-index: 1070; display: block; opacity: 0; font-size: 13px; line-height: 1.4; word-wrap: break-word; pointer-events: none; }
.tooltip.show { opacity: 1; }
.tooltip .arrow { display: none; }
/* inverted (light-on-dark-theme) tooltip so it clearly pops off the dark page */
.tooltip-inner { max-width: 260px; padding: 7px 11px; color: #14171c; font-weight: 500; text-align: center; background: #e8edf4; border: 0; border-radius: 8px; box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.7); }
.bs-tooltip-top, .bs-tooltip-auto[x-placement^="top"] { padding: 6px 0; }
.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^="bottom"] { padding: 6px 0; }
.bs-tooltip-left, .bs-tooltip-auto[x-placement^="left"] { padding: 0 6px; }
.bs-tooltip-right, .bs-tooltip-auto[x-placement^="right"] { padding: 0 6px; }
.popover { position: absolute; z-index: 1060; max-width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0; font-size: 14px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
.popover .arrow { display: none; }
.popover-header { padding: 8px 12px; font-weight: 700; border-bottom: 1px solid var(--line); margin: 0; }
.popover-body { padding: 10px 12px; color: #d4dae2; }

/* ---- progress / misc components ---- */
.progress { display: flex; height: 14px; overflow: hidden; background: var(--input); border-radius: 999px; }
.progress-bar { display: flex; align-items: center; justify-content: center; background: var(--brand); color: #14171c; font-size: 11px; font-weight: 700; transition: width 0.4s ease; }
.progress-bar-striped { background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent); background-size: 1rem 1rem; }
.spinner-border { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: hal-spin 0.75s linear infinite; }
@keyframes hal-spin { to { transform: rotate(360deg); } }
.card-body { padding: 18px 20px; }
.card-header { padding: 12px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
.card-title { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.card-text { color: var(--body); }
.jumbotron { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
blockquote, .blockquote { border-left: 3px solid var(--brand); padding-left: 14px; color: var(--body); margin: 12px 0; }
pre, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: #0b0d11; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow: auto; color: #d4dae2; }
code { background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 4px; }
kbd { background: #0b0d11; border: 1px solid var(--input-line); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
.embed-responsive { position: relative; display: block; width: 100%; overflow: hidden; }
.embed-responsive::before { display: block; content: ""; padding-top: 56.25%; }
.embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.embed-responsive-4by3::before { padding-top: 75%; }

/* clip player: highlight the clip currently playing (was a custom rule appended to bootstrap.css) */
.clip-selected { background-color: rgba(247, 147, 29, 0.22) !important; }

/* generic "please wait" line shown while reports reload */
.show-wait-message { color: var(--brand-hot); font-weight: 700; }

/* video player & stats layouts often sit in bare divs with light colours; soften common ones */
.bg-light { background: var(--card) !important; }
.bg-white { background: var(--panel) !important; }
.bg-dark { background: #0b0d11 !important; }
.bg-primary { background: var(--brand) !important; color: #14171c; }
.bg-success { background: #2fbf63 !important; color: #0f1a13; }
.bg-info { background: #4ba3f5 !important; color: #0e1620; }
.bg-danger { background: #e05656 !important; color: #fff; }
.bg-warning { background: #e7b84a !important; color: #1a1406; }
.border-primary { border-color: var(--brand) !important; }
.border-success { border-color: #2fbf63 !important; }
.border-danger { border-color: #e05656 !important; }

.site-footer .footer-who { color: var(--faint); }
@media (max-width: 960px) { .site-footer .footer-who { display: block; } }

/* user nav (template/nav-user-modern.php) extras */
.topnav-links .topnav-spacer { flex: 1; }
.topnav-links > a, .topnav-links .drop-toggle, .topnav-links .nav-buy .btn-solid { white-space: nowrap; }
.topnav-links .nav-buy { margin-left: 4px; }
.topnav-links .nav-buy .btn-solid { font-size: 14px; padding: 8px 14px; }
/* the user nav has more items than the lead nav: compact it on narrow desktops so it never wraps */
@media (min-width: 961px) and (max-width: 1280px) {
    .topnav-inner { padding: 8px 24px; }
    .topnav-logo img { height: 76px; }
    .topnav-links { gap: 16px; }
    .topnav-links > a, .topnav-links .drop-toggle { font-size: 14px; }
    .topnav-links .nav-buy .btn-solid { font-size: 13px; padding: 7px 11px; }
}
@media (min-width: 961px) and (max-width: 1080px) {
    .topnav-logo img { height: 64px; }
    .topnav-links { gap: 12px; }
    .topnav-links > a, .topnav-links .drop-toggle { font-size: 13.5px; }
}
@media (max-width: 960px) {
    .topnav-links .topnav-spacer { display: none; }
    .topnav-links .nav-buy { margin: 6px 0 0; }
}

/* ---- print: reports and box scores print on white ---- */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .topnav, .site-footer, .hamburger, .d-print-none { display: none !important; }
    .d-print-block { display: block !important; }
    .d-print-inline { display: inline !important; }
    .d-print-inline-block { display: inline-block !important; }
    .d-print-table-cell { display: table-cell !important; }
    .contain-wrapp, .page-wrap { padding: 0; }
    a { color: #000; }
    h1, h2, h3, h4, h5, h6, strong, b, label { color: #000; }
    .card, .note-card, .modal-content, .jumbotron { background: #fff; border-color: #ccc; box-shadow: none; }
    table.table th { background: #eee; color: #000; border-bottom: 2px solid #999; position: static; }
    table.table td { color: #000; border-bottom: 1px solid #ccc; }
    table.table.table-striped tbody tr:nth-child(even) { background: #f5f5f5; }
    .green-event { background: #CCF4B9 !important; }
    .red-event { background: #F1B9B5 !important; }
    .white-event { background: #fff !important; }
    .badge { border: 1px solid #999; color: #000; background: #fff; }
    .btn { display: none; }
    input, select, textarea { background: #fff; color: #000; border-color: #999; }
    .print-powered { display: flex !important; justify-content: space-between; align-items: center; padding: 16px 0 8px; font-size: 12px; }
}
.print-powered { display: none; }

/* ---- balance tiles (order/show-transactions.php): per credit type, what's left, what's used and a buy link ---- */
.balance-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
    margin: 18px 0 26px; text-align: left;
}
.balance-tile {
    display: flex; flex-direction: column; gap: 7px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.balance-tile .bt-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
}
.balance-tile .bt-label i { color: var(--brand); font-size: 14px; }
.balance-tile .bt-value { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--ink); }
.balance-tile .bt-value small { font-size: 13px; font-weight: 600; color: var(--body); margin-left: 7px; }
.balance-tile .bt-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 2px; }
.balance-tile .bt-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.balance-tile .bt-used { font-size: 13.5px; color: var(--body); }
.balance-tile .bt-used b { font-weight: 600; color: var(--ink); }
.balance-tile .bt-cta { margin-top: auto; align-self: flex-start; }   /* green outline button (.btn-outline-success) pinned to the bottom of the tile; the tile gap spaces it */
.balance-tile.low .bt-value { color: #e7b84a; }
.balance-tile.low .bt-bar span { background: #e7b84a; }
.balance-tile.empty .bt-value { color: #e05656; }
.balance-tile.empty .bt-bar span { background: #e05656; }
