/* NBA Live Today PH v3.14.84 — final light-theme surface/contrast normalization.
   Loaded after every legacy stylesheet. Dark remains the default theme.
   Scope: normal content/cards/data UI only; branded hero, status badges and CTAs retain identity. */

html[data-bs-theme="light"] body {
  --nlt-light-card-bg:#ffffff;
  --nlt-light-card-alt:#f8f9fa;
  --nlt-light-card-fg:#172033;
  --nlt-light-card-heading:#111827;
  --nlt-light-card-muted:#596579;
  --nlt-light-card-border:#d9e0e8;
}

/* Standard Bootstrap/content cards — explicit background on both shell and body. */
html[data-bs-theme="light"] body main :is(
  .card,.card-body,.api-record-card,.value-card,.related-journey-card,.journey-item,
  .content-panel,.faq-panel,.news-card,.blog-card,.data-card,.record-card,
  .schedule-card,.score-card,.scores-sidebar-card,.scores-calendar-card,
  .game-card,.match-card,.calendar-card,.api-results-toolbar,.api-filter-row,
  .list-group-item,.accordion-item,.accordion-body,.dropdown-menu,.modal-content,.offcanvas
){
  background-color:var(--nlt-light-card-bg)!important;
  color:var(--nlt-light-card-fg)!important;
  border-color:var(--nlt-light-card-border)!important;
  -webkit-text-fill-color:currentColor;
}

/* Generated/API listing cards have historically carried a dark card-body skin. */
html[data-bs-theme="light"] body main #generated-news-results .api-record-card.card,
html[data-bs-theme="light"] body main #generated-news-results .api-record-card.card > .card-body,
html[data-bs-theme="light"] body main .api-results .api-record-card.card,
html[data-bs-theme="light"] body main .api-results .api-record-card.card > .card-body,
html[data-bs-theme="light"] body main [data-feed-state] .card,
html[data-bs-theme="light"] body main [data-feed-state] .card > .card-body {
  background:#fff!important;
  color:#172033!important;
  border-color:#d9e0e8!important;
}

/* Readable typography inside ordinary light surfaces, including legacy text-white/link-light. */
html[data-bs-theme="light"] body main :is(
  .card,.api-record-card,.value-card,.related-journey-card,.journey-item,
  .content-panel,.faq-panel,.news-card,.blog-card,.data-card,.record-card,
  .schedule-card,.score-card,.scores-sidebar-card,.scores-calendar-card,
  .game-card,.match-card,.calendar-card,.list-group-item,.accordion-item
) :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.card-title,.record-title,strong,.fw-bold,.fw-semibold){
  color:var(--nlt-light-card-heading)!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="light"] body main :is(
  .card,.api-record-card,.value-card,.related-journey-card,.journey-item,
  .content-panel,.faq-panel,.news-card,.blog-card,.data-card,.record-card,
  .schedule-card,.score-card,.scores-sidebar-card,.scores-calendar-card,
  .game-card,.match-card,.calendar-card,.list-group-item,.accordion-item
) :is(p,span,small,time,li,dd,dt,.card-text,.record-date,.record-byline,.record-description,.text-white,.text-light,.text-body){
  color:var(--nlt-light-card-fg)!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="light"] body main :is(
  .card,.api-record-card,.value-card,.related-journey-card,.journey-item,
  .content-panel,.faq-panel,.news-card,.blog-card,.data-card,.record-card,
  .schedule-card,.score-card,.scores-sidebar-card,.scores-calendar-card,
  .game-card,.match-card,.calendar-card,.list-group-item,.accordion-item
) :is(.text-secondary,.text-body-secondary,.text-muted){
  color:var(--nlt-light-card-muted)!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Links are Bootstrap blue in light surfaces. */
html[data-bs-theme="light"] body main :is(
  .card,.api-record-card,.value-card,.related-journey-card,.journey-item,
  .content-panel,.faq-panel,.news-card,.blog-card,.data-card,.record-card,
  .schedule-card,.score-card,.scores-sidebar-card,.scores-calendar-card,
  .game-card,.match-card,.calendar-card,.list-group-item,.accordion-item
) a:not(.btn):not(.badge){
  color:var(--bs-link-color,#0d6efd)!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Preserve semantic button/badge contrast after aggressive legacy normalization. */
html[data-bs-theme="light"] body main .btn-primary,
html[data-bs-theme="light"] body main .btn-danger,
html[data-bs-theme="light"] body main .btn-success,
html[data-bs-theme="light"] body main .badge.text-bg-primary,
html[data-bs-theme="light"] body main .badge.text-bg-danger,
html[data-bs-theme="light"] body main .badge.text-bg-success,
html[data-bs-theme="light"] body main .badge.text-bg-dark {
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Dark hero/band areas intentionally stay dark in light mode and therefore keep light copy. */
html[data-bs-theme="light"] body :is(
  .home-hero,.live-hero,.schedule-hero,.resource-hero,.news-hero,.blogs-hero,
  .news-authority-hero,.journey-strip
){color:#f8f9fa!important;}
html[data-bs-theme="light"] body :is(
  .home-hero,.live-hero,.schedule-hero,.resource-hero,.news-hero,.blogs-hero,
  .news-authority-hero,.journey-strip
) :is(h1,h2,h3,h4,h5,h6,.headline,.hero-copy > p,.eyebrow){
  color:#f8f9fa!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Raised cards placed inside dark hero/bands still use light-theme surfaces and dark copy. */
html[data-bs-theme="light"] body :is(
  .home-hero,.live-hero,.schedule-hero,.resource-hero,.news-hero,.blogs-hero,.news-authority-hero,.journey-strip
) :is(.card,.hero-panel,.journey-item){
  background:#fff!important;
  color:#172033!important;
  border-color:#d9e0e8!important;
}
html[data-bs-theme="light"] body :is(
  .home-hero,.live-hero,.schedule-hero,.resource-hero,.news-hero,.blogs-hero,.news-authority-hero,.journey-strip
) :is(.card,.hero-panel,.journey-item) :is(h1,h2,h3,h4,h5,h6,strong,p,span,small){
  color:#172033!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Schedule/live API rows and score/calendar blocks. */
html[data-bs-theme="light"] body main :is(
  .api-live-calendar,.api-live-calendar__head,.api-live-calendar__filters,.api-live-calendar__toolbar,
  .live-event-scores,.live-event-scores__head,.live-event-scores__filters,.live-event-scores__pager,
  .scores-month-accordion,.scores-month-accordion__body,.scores-content-accordion,.scores-content-accordion__body,
  .games-date-shell,.scores-2026-directory,.scores-monthly-overview
){
  background-color:#fff!important;
  color:#172033!important;
  border-color:#d9e0e8!important;
}
html[data-bs-theme="light"] body main :is(
  .api-live-calendar,.live-event-scores,.scores-month-accordion,.scores-content-accordion,.games-date-shell,.scores-2026-directory
) :is(h1,h2,h3,h4,h5,h6,strong,p,span,small,time,li){
  color:#172033!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Accordion headers use a subtle light raised surface. */
html[data-bs-theme="light"] body main .accordion-button,
html[data-bs-theme="light"] body main .scores-month-accordion__summary,
html[data-bs-theme="light"] body main .scores-content-accordion__summary {
  background:#f8f9fa!important;
  color:#111827!important;
  border-color:#d9e0e8!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="light"] body main .accordion-button:not(.collapsed){
  background:var(--bs-primary-bg-subtle,#cfe2ff)!important;
  color:var(--bs-primary-text-emphasis,#052c65)!important;
}

/* Footer is a normal light shell when Light is selected. */
html[data-bs-theme="light"] body footer,
html[data-bs-theme="light"] body footer.bg-dark{
  background:#f8f9fa!important;
  color:#172033!important;
  border-color:#d9e0e8!important;
}
html[data-bs-theme="light"] body footer :is(h1,h2,h3,h4,h5,h6,strong,p,span,small,li){color:#172033!important;-webkit-text-fill-color:currentColor!important;}
html[data-bs-theme="light"] body footer a:not(.btn){color:var(--bs-link-color,#0d6efd)!important;-webkit-text-fill-color:currentColor!important;}

/* v3.14.87 — sitewide light/dark contrast + compact information toolbar repair.
   This block intentionally loads last through the existing global stylesheet so
   legacy page-specific rules cannot reintroduce white-on-white/dark-on-dark UI. */

/* LIGHT THEME: ordinary raised cards are light surfaces with explicitly dark copy. */
html[data-bs-theme="light"] body :is(
  main,[data-nlt-related-links="true"]
) :is(
  .card,.card-body,.content-panel,.faq-panel,.cta-panel,.hero-panel,
  .related-journey-card,.api-results-toolbar,.api-record-card,.data-card,
  .record-card,.schedule-card,.score-card,.game-card,.match-card,.calendar-card,
  .accordion-item,.accordion-body,.list-group-item
):not(.journey-item) {
  color:#172033!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="light"] body :is(
  main,[data-nlt-related-links="true"]
) :is(
  .card,.card-body,.content-panel,.faq-panel,.cta-panel,.hero-panel,
  .related-journey-card,.api-results-toolbar,.api-record-card,.data-card,
  .record-card,.schedule-card,.score-card,.game-card,.match-card,.calendar-card,
  .accordion-item,.accordion-body,.list-group-item
):not(.journey-item) :is(
  h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.card-title,
  p,small,time,li,dd,dt,strong,.fw-bold,.fw-semibold,.text-body,.text-white,.text-light
):not(.btn):not(.badge) {
  color:#172033!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="light"] body :is(
  main,[data-nlt-related-links="true"]
) :is(.card,.card-body,.content-panel,.faq-panel,.cta-panel,.hero-panel,.related-journey-card,.api-record-card)
  :is(.text-muted,.text-secondary,.text-body-secondary) {
  color:#596579!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Dark journey bands stay genuinely dark in BOTH themes. Remove the legacy
   white rectangle from each step and use light copy directly on the band. */
html body .journey-strip {
  background:#101827!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.18)!important;
}
html body .journey-strip .journey-item,
html[data-bs-theme="light"] body .journey-strip .journey-item,
html[data-bs-theme="dark"] body .journey-strip .journey-item {
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#f8fafc!important;
  -webkit-text-fill-color:currentColor!important;
}
html body .journey-strip .journey-item :is(strong,p,small),
html[data-bs-theme="light"] body .journey-strip .journey-item :is(strong,p,small),
html[data-bs-theme="dark"] body .journey-strip .journey-item :is(strong,p,small) {
  color:#f8fafc!important;
  -webkit-text-fill-color:currentColor!important;
  background:transparent!important;
}
html body .journey-strip .journey-item small {color:#cbd5e1!important;}
html body .journey-strip .journey-item>span {
  background:#0d6efd!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* DARK THEME: repair bottom/recommended cards and CTA/footer areas that inherited
   light-theme foregrounds or transparent bodies. */
html[data-bs-theme="dark"] body [data-nlt-related-links="true"] .related-journey-card,
html[data-bs-theme="dark"] body [data-nlt-related-links="true"] .related-journey-card .card-body {
  background:#20272f!important;
  color:#f8f9fa!important;
  border-color:#495057!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="dark"] body [data-nlt-related-links="true"] .related-journey-card :is(
  h1,h2,h3,h4,h5,h6,.card-title,p,small,strong,.text-body,.text-white,.text-light
):not(.badge):not(.btn) {
  color:#f8f9fa!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="dark"] body [data-nlt-related-links="true"] .related-journey-card :is(
  .text-muted,.text-secondary,.text-body-secondary
) {
  color:#adb5bd!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="dark"] body .sitewide-bybet-bottom-cta,
html[data-bs-theme="dark"] body footer {
  color:#f8f9fa!important;
  border-color:#343a40!important;
}
html[data-bs-theme="dark"] body .sitewide-bybet-bottom-cta :is(h1,h2,h3,h4,h5,h6,p,small,strong,.text-light,.text-body),
html[data-bs-theme="dark"] body footer :is(h1,h2,h3,h4,h5,h6,p,small,strong,.text-light,.text-body) {
  color:#f8f9fa!important;
  -webkit-text-fill-color:currentColor!important;
}
html[data-bs-theme="dark"] body .sitewide-bybet-bottom-cta :is(.text-secondary,.text-body-secondary,.text-muted),
html[data-bs-theme="dark"] body footer :is(.text-secondary,.text-body-secondary,.text-muted) {
  color:#adb5bd!important;
  -webkit-text-fill-color:currentColor!important;
}

/* NBA INFORMATION toolbar: show every control without the clipped horizontal rail.
   Desktop stays a single slim row; tablet folds cleanly; mobile becomes two/one columns. */
body .api-results-toolbar {
  padding:.65rem .75rem!important;
  border-radius:.9rem!important;
  overflow:visible!important;
}
body .api-results-toolbar .api-toolbar-head {margin-bottom:.5rem!important;}
body .api-results-toolbar .api-results-kicker {margin-bottom:.18rem!important;font-size:.64rem!important;}
body .api-results-toolbar .api-results-meta strong {font-size:.82rem!important;}
body .api-results-toolbar .api-toolbar-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.12fr) minmax(0,1fr) minmax(0,1fr) minmax(0,.95fr) minmax(0,.86fr) minmax(0,.86fr) minmax(0,.62fr)!important;
  gap:.42rem!important;
  align-items:end!important;
  overflow:visible!important;
  padding-bottom:0!important;
}
body .api-results-toolbar .api-toolbar-controls>* {
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  flex:none!important;
}
body .api-results-toolbar .api-toolbar-controls :is(.form-control,.form-select,.btn) {
  min-height:36px!important;
  height:36px!important;
  padding-top:.35rem!important;
  padding-bottom:.35rem!important;
  font-size:.78rem!important;
  line-height:1.15!important;
}
body .api-results-toolbar .api-date-filter span {
  margin-bottom:.18rem!important;
  font-size:.58rem!important;
  line-height:1!important;
}
body .api-results-toolbar .api-toolbar-controls .btn {padding-inline:.55rem!important;white-space:nowrap!important;}

@media (max-width:1199.98px) {
  body .api-results-toolbar .api-toolbar-controls {
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}
@media (max-width:767.98px) {
  body .api-results-toolbar .api-toolbar-controls {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body .api-results-toolbar .api-toolbar-controls .api-search {grid-column:1/-1!important;}
}
@media (max-width:480px) {
  body .api-results-toolbar .api-toolbar-controls {grid-template-columns:1fr!important;}
  body .api-results-toolbar .api-toolbar-controls .api-search {grid-column:auto!important;}
}
