/* Final WNBA home theme layer.
 * Loaded after the shared/header styles because the preview stylesheet
 * contains light-mode rules with !important declarations.
 */

html.bbd-dark body.wnba-site {
  background: #071426 !important;
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-main,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details .table-wrap,
html.bbd-dark body.wnba-site #games > .card.card--v2 .stack-boxscores,
html.bbd-dark body.wnba-site #games > .card.card--v2 .detail-box {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2::after {
  background: linear-gradient(90deg, rgba(0, 110, 255, .95), rgba(255, 255, 255, .2), rgba(239, 45, 58, .95)) !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .team,
html.bbd-dark body.wnba-site #games > .card.card--v2 .team *,
html.bbd-dark body.wnba-site #games > .card.card--v2 .center,
html.bbd-dark body.wnba-site #games > .card.card--v2 .center *,
html.bbd-dark body.wnba-site #games > .card.card--v2 .team-fr-inline,
html.bbd-dark body.wnba-site #games > .card.card--v2 .team-fr-inline *,
html.bbd-dark body.wnba-site #games > .card.card--v2 .score--v2,
html.bbd-dark body.wnba-site #games > .card.card--v2 .status--v2,
html.bbd-dark body.wnba-site #games > .card.card--v2 .expand-btn,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details * {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .score--v2 {
  color: #f4f8ff !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .muted,
html.bbd-dark body.wnba-site #games > .card.card--v2 .sub,
html.bbd-dark body.wnba-site #games > .card.card--v2 .meta,
html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details small {
  color: #a9bdd8 !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details th {
  background: #162f50 !important;
  color: #a9bdd8 !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details td {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details .row-fr {
  background: #183252 !important;
  color: #ffffff !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .card-details .row-dnp {
  color: #8da4c2 !important;
}

html.bbd-dark body.wnba-site #wnba-night-fr,
html.bbd-dark body.wnba-site #wnba-night-content,
html.bbd-dark body.wnba-site #wnba-night-content .card,
html.bbd-dark body.wnba-site #wnba-night-content .card-main,
html.bbd-dark body.wnba-site #wnba-night-content .card-details,
html.bbd-dark body.wnba-site #wnba-night-content .detail-box,
html.bbd-dark body.wnba-site #wnba-night-content .table-wrap,
html.bbd-dark body.wnba-site .fr-night,
html.bbd-dark body.wnba-site .fr-night .card-main,
html.bbd-dark body.wnba-site .fr-night .card-details,
html.bbd-dark body.wnba-site .fr-night .detail-box,
html.bbd-dark body.wnba-site .fr-night .table-wrap {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #wnba-night-content .card *,
html.bbd-dark body.wnba-site #wnba-night-content .card-details *,
html.bbd-dark body.wnba-site .fr-night *,
html.bbd-dark body.wnba-site .fr-night-table * {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #wnba-night-content .card-details th,
html.bbd-dark body.wnba-site .fr-night-table th {
  background: #162f50 !important;
  color: #a9bdd8 !important;
}

html.bbd-dark body.wnba-site #wnba-night-content .card-details td,
html.bbd-dark body.wnba-site .fr-night-table td {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

/* app.js injects detailed boxscores after page render. Keep all generated
   children readable when the member uses the dark theme. */
html.bbd-dark body.wnba-site #games .card.card--v2,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-main,
html.bbd-dark body.wnba-site #games .card.card--v2 .team,
html.bbd-dark body.wnba-site #games .card.card--v2 .center,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details,
html.bbd-dark body.wnba-site #games .card.card--v2 .detail-box,
html.bbd-dark body.wnba-site #games .card.card--v2 .table-wrap {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-main *,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details * {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .team .tri,
html.bbd-dark body.wnba-site #games .card.card--v2 .team .wl,
html.bbd-dark body.wnba-site #games .card.card--v2 .detail-title,
html.bbd-dark body.wnba-site #games .card.card--v2 .bx-pm,
html.bbd-dark body.wnba-site #games .card.card--v2 .bx-td-pts,
html.bbd-dark body.wnba-site #games .card.card--v2 .bx-td-shoot {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score--v2 {
  color: #f4f8ff !important;
}

/* Keep the winning side visually distinct in the dark home cards. */
html.bbd-dark body.wnba-site #games .card.card--v2 .card-main .score--v2 .winner,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-main .team .winner {
  color: #62adff !important;
  text-shadow: 0 0 12px rgba(98, 173, 255, .18);
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-sep {
  color: #8fa4bf !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip {
  color: #eaf3ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.final {
  color: #0b8f4d !important;
}

/* Dark mode: keep match status and expand controls readable. */
html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip {
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.final {
  background: #d9fbe8 !important;
  border-color: #8be4b2 !important;
  color: #087443 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.pre {
  background: #203a5d !important;
  border-color: #4d78a8 !important;
  color: #dbeafe !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.live {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b42318 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status {
  color: #b9cce5 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .expand-btn {
  border: 1px solid #4a6e96 !important;
  background: #203b5e !important;
  color: #dbeafe !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .expand-btn:hover,
html.bbd-dark body.wnba-site #games .card.card--v2.open .expand-btn {
  border-color: #6fa7df !important;
  background: #2d5b8a !important;
  color: #fff !important;
}

html.bbd-dark body.wnba-site .nav-arrow {
  border: 1px solid #4f7fb5 !important;
  background: linear-gradient(145deg,#2e6fc4,#1d4d91) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.28) !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.live {
  color: #c61f2f !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.pre {
  color: #9eb0c8 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx td {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx th {
  background: #162f50 !important;
  color: #a9bdd8 !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr td,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr a {
  background: #183252 !important;
  color: #fff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-dnp,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-dnp td,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-dnp-reason {
  color: #9eb0c8 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-fr-hero,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-fr-hero * {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-fr-hero-stats {
  color: #63b0ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-fr-hero-sub,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-fr-hero-dnp,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details > div[style] {
  color: #9eb0c8 !important;
}

/* Keep the legacy generated-card fallback scoped to dark mode only. */
html.bbd-dark body.wnba-site #games .card.card--v2,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-main,
html.bbd-dark body.wnba-site #games .card.card--v2 .team,
html.bbd-dark body.wnba-site #games .card.card--v2 .center,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details,
html.bbd-dark body.wnba-site #games .card.card--v2 .detail-box,
html.bbd-dark body.wnba-site #games .card.card--v2 .table-wrap {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-main *,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details * {
  color: #eef4ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score--v2,
html.bbd-dark body.wnba-site #games .card.card--v2 .score--v2 .winner {
  color: #f4f8ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-sep {
  color: #a9bdd8 !important;
}

/* Final alignment for the V2 match-card center content. */
body.wnba-site #games > .card.card--v2 .card-main {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.35fr) minmax(0, 1fr);
}

body.wnba-site #games > .card.card--v2 .center.center--matchcard {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.wnba-site #games > .card.card--v2 .center.center--matchcard > .score--v2,
body.wnba-site #games > .card.card--v2 .center.center--matchcard > .status-chip,
body.wnba-site #games > .card.card--v2 .center.center--matchcard > .expand-btn {
  align-self: center;
  margin-inline: auto;
}

body.wnba-site #games > .card.card--v2 .center.center--matchcard > .status-chip {
  margin-top: 8px;
}

body.wnba-site #games > .card.card--v2 .center.center--matchcard > .expand-btn {
  margin-top: 10px;
  display: grid;
  place-items: center;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2,
html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .card-main,
html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .card-details {
  background: #fff !important;
  color: #0b1730 !important;
  border-color: #dce5ef !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2::after {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.82)) !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .score--v2 {
  color: #0b1730 !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .score--v2 .winner {
  color: #1675e5 !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .score-sep {
  color: #6f7c8f !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .status-chip.final {
  background: #e7f8ed !important;
  border-color: #a8e4bd !important;
  color: #0b7a44 !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .status-chip.pre {
  background: #edf3ff !important;
  border-color: #c9d9ee !important;
  color: #34527c !important;
}

html:not(.bbd-dark) body.wnba-site #games > .card.card--v2 .expand-btn {
  background: #f2f6fb !important;
  border-color: #dce5ef !important;
  color: #526176 !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .score--v2 .winner {
  color: #62adff !important;
}

html.bbd-dark body.wnba-site #games > .card.card--v2 .score-sep {
  color: #a9bdd8 !important;
}

@media (max-width: 640px) {
  body.wnba-site #games > .card.card--v2 .card-main {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 1.15fr) minmax(0, 1fr);
  }
}

/* Vertical alignment: the center column must fill the match-card row. */
body.wnba-site #games > .card.card--v2 > .card-main {
  align-items: stretch !important;
}

body.wnba-site #games > .card.card--v2 > .card-main > .center.center--matchcard {
  align-self: stretch !important;
  min-height: 190px !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding-block: 0 !important;
}

@media (max-width: 640px) {
  body.wnba-site #games > .card.card--v2 > .card-main > .center.center--matchcard {
    min-height: 160px !important;
  }
}

html.bbd-dark body.wnba-site #games .card.card--v2 .status-chip.final {
  color: #0b8f4d !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx td {
  background: #102542 !important;
  color: #eef4ff !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx th {
  background: #162f50 !important;
  color: #b7c9df !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr td,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-fr a {
  background: #183252 !important;
  color: #fff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-dnp,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details table.bx tr.row-dnp td,
html.bbd-dark body.wnba-site #games .card.card--v2 .card-details .bx-dnp-reason {
  color: #b7c9df !important;
}

/* The games renderer may wrap cards, so do not require the article to be a
   direct child of #games. Keep the score/status/expand controls centered in
   the full card height. */
#games article.card.card--v2 > .card-main,
article.card.card--v2 > .card-main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.35fr) minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 220px !important;
}

#games article.card.card--v2 > .card-main > .center.center--matchcard,
article.card.card--v2 > .card-main > .center.center--matchcard {
  align-self: stretch !important;
  min-width: 0 !important;
  min-height: 220px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 10px !important;
}

#games article.card.card--v2 > .card-main > .center.center--matchcard > .score--v2,
#games article.card.card--v2 > .card-main > .center.center--matchcard > .status-chip,
#games article.card.card--v2 > .card-main > .center.center--matchcard > .expand-btn,
article.card.card--v2 > .card-main > .center.center--matchcard > .score--v2,
article.card.card--v2 > .card-main > .center.center--matchcard > .status-chip,
article.card.card--v2 > .card-main > .center.center--matchcard > .expand-btn {
  align-self: center !important;
  margin-inline: auto !important;
}

@media (max-width: 640px) {
  #games article.card.card--v2 > .card-main,
  article.card.card--v2 > .card-main,
  #games article.card.card--v2 > .card-main > .center.center--matchcard,
  article.card.card--v2 > .card-main > .center.center--matchcard {
    min-height: 180px !important;
  }
}

/* Definitive horizontal axis: the three columns have equal widths, so the
   score and both status pills (FINAL or date) share the exact card center. */
#games article.card.card--v2 > .card-main,
article.card.card--v2 > .card-main {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#games article.card.card--v2 > .card-main > .center.center--matchcard,
article.card.card--v2 > .card-main > .center.center--matchcard {
  justify-self: stretch !important;
  width: auto !important;
}

#games article.card.card--v2 > .card-main > .center.center--matchcard > .score--v2,
#games article.card.card--v2 > .card-main > .center.center--matchcard > .status-chip,
#games article.card.card--v2 > .card-main > .center.center--matchcard > .expand-btn,
article.card.card--v2 > .card-main > .center.center--matchcard > .score--v2,
article.card.card--v2 > .card-main > .center.center--matchcard > .status-chip,
article.card.card--v2 > .card-main > .center.center--matchcard > .expand-btn {
  position: relative !important;
  left: 0 !important;
  transform: none !important;
  align-self: center !important;
  justify-self: center !important;
  margin-inline: auto !important;
}

/* Use the card itself as the reference frame. This prevents the variable
   French-player teasers on either side from moving the central controls. */
#games article.card.card--v2 > .card-main,
article.card.card--v2 > .card-main {
  position: relative !important;
}

#games article.card.card--v2 > .card-main > .center.center--matchcard,
article.card.card--v2 > .card-main > .center.center--matchcard {
  position: absolute !important;
  inset-block: auto !important;
  top: 50% !important;
  left: 50% !important;
  width: min(33.3333%, 420px) !important;
  min-height: 0 !important;
  height: max-content !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2 !important;
}

@media (max-width: 640px) {
  #games article.card.card--v2 > .card-main > .center.center--matchcard,
  article.card.card--v2 > .card-main > .center.center--matchcard {
    width: 38% !important;
  }
}

/* Center the label inside the pill itself (FINAL / match date). */
body.wnba-site #games .card.card--v2 .center.center--matchcard > .status-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

/* Keep both team columns visible after the centered-control overrides above. */
body.wnba-site #games article.card.card--v2 > .card-main > .team {
  display: flex !important;
  min-width: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  z-index: 3 !important;
}

body.wnba-site #games article.card.card--v2 > .card-main > .team:last-child {
  grid-column: 3 !important;
}

body.wnba-site #games article.card.card--v2 > .card-main > .team:first-child {
  grid-column: 1 !important;
}

/* Give the French-player portraits a little breathing room around the
   centered score/date controls. */
body.wnba-site #games article.card.card--v2 .team-fr-inline[data-side="home"] {
  margin-left: -34px !important;
}

body.wnba-site #games article.card.card--v2 .team-fr-inline[data-side="away"] {
  margin-right: -34px !important;
}

/* Timeline injectée sous les boxscores : même composant que la home NBA,
   adapté au fond sombre de la home WNBA. */
html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl {
  margin-top: 14px;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-section {
  background: #102542 !important;
  border-color: #29486b !important;
  box-shadow: none !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-header {
  background: #162f50 !important;
  border-color: #29486b !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-hdr-label,
html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-hdr-side {
  color: #a9bdd8 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-qs-win {
  color: #72e6ad !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-action-detail {
  background: #102542 !important;
  border-color: #29486b !important;
  color: #b9cbe0 !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-action-detail.is-french {
  background: linear-gradient(90deg,rgba(237,41,57,.18),rgba(20,114,200,.16)) !important;
  border-color: rgba(237,41,57,.45) !important;
  color: #f4f8ff !important;
}

html.bbd-dark body.wnba-site #games .card.card--v2 .score-tl .tl-action-detail em {
  border-color: rgba(255,116,129,.4) !important;
  background: rgba(237,41,57,.12) !important;
  color: #ff9eaa !important;
}

/* Mobile: keep the matchup readable and uncluttered. The French-player
   badges remain available in the expanded boxscore, but are hidden from the
   compact match card on small screens. */
@media (max-width: 640px) {
  body.wnba-site #games article.card.card--v2 .team-fr-inline {
    display: none !important;
  }

  body.wnba-site #games article.card.card--v2 .score--v2 {
    font-size: 30px !important;
    letter-spacing: -1px !important;
  }
}
