/* ==========================================================================
   BB-Bet UI polish layer
   Loaded after custom.css. Keeps layout, hero, tiles, bet slip and contrast
   fixes in one place so they are easy to audit and roll back.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header: stop the nav from forcing horizontal scroll at 1280/1024/360
   -------------------------------------------------------------------------- */
.header-fluid-custom-parent {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-width: 0 !important;
}
.header-fluid-custom-parent > .d-flex:first-child {
  flex: 0 0 auto;
  min-width: 0;
}
.primary-menu-container {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
}
.primary-menu-container > ul.d-lg-flex {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap !important;
  overflow: hidden;
  justify-content: flex-start !important;
}
.primary-menu-container .right-side-nav {
  flex: 0 0 auto !important;
  margin-left: auto;
  flex-wrap: nowrap !important;
}

/* Keep the language + odds-format selectors on tablets and up; on phones they
   live in the sports drawer, so hide them there to protect the header budget. */
.odds-format-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  border: 1px solid transparent;
  white-space: nowrap;
}
.odds-format-btn i:first-child { font-size: 1rem; opacity: .85; }
.odds-format-dropdown .dropdown-menu .oddsSel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  text-decoration: none;
}
.odds-format-dropdown .dropdown-menu .oddsSel.active { font-weight: 700; }
.odds-format-dropdown .dropdown-menu .oddsSel i { width: 14px; }

html[data-theme="light"] .header-primary .odds-format-btn {
  color: #0F172A !important;
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}
html[data-theme="dark"] .header-primary .odds-format-btn,
html:not([data-theme="light"]) .header-primary .odds-format-btn {
  color: #E2E8F0 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
.header-primary .odds-format-btn:hover { border-color: #0878E8 !important; color: #0878E8 !important; }

@media (max-width: 991.98px) {
  .header-primary .odds-format-dropdown,
  .primary-menu-container .odds-format-dropdown {
    display: none !important;
  }
}

/* Below 1200 the centre menu no longer fits; the sports drawer covers it. */
@media (max-width: 1199.98px) {
  .primary-menu-container > ul.d-lg-flex {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  .header-fluid-custom-parent {
    gap: 8px !important;
  }
  .header-primary .container-fluid {
    padding-inline: 8px !important;
  }
  .app-header-logo {
    max-width: 132px !important;
    height: auto !important;
  }
  .btn-sports-drawer {
    margin-right: 2px !important;
  }
  .primary-menu-container .right-side-nav {
    gap: 6px !important;
  }
  .btn-theme-toggle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }
}

/* The language label must follow the header theme. */
html[data-theme="light"] .header-primary .language-btn,
html[data-theme="light"] .header-primary .language-text,
html[data-theme="light"] .header-primary .language-btn .language-code-text {
  color: #0F172A !important;
}
html[data-theme="dark"] .header-primary .language-btn,
html[data-theme="dark"] .header-primary .language-text,
html[data-theme="dark"] .header-primary .language-btn .language-code-text {
  color: #E2E8F0 !important;
}
.header-primary .language-btn:hover,
.header-primary .language-btn:hover .language-text {
  color: #0E7490 !important;
}
html[data-theme="dark"] .header-primary .language-btn:hover,
html[data-theme="dark"] .header-primary .language-btn:hover .language-text {
  color: #7DD3FC !important;
}

/* --------------------------------------------------------------------------
   1b. Desktop flex shell: the bet slip was pushed past the right edge because
   .sports-body kept its full width (width:100%) and would not shrink.
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .home-page > .sports-body {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
  }
  .home-page > .betslip {
    flex: 0 0 330px !important;
    max-width: 330px !important;
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .home-page > .betslip {
    flex-basis: 300px !important;
    max-width: 300px !important;
  }
}

/* --------------------------------------------------------------------------
   1c. Sidebar category rail: "one line" compact layout
   Base template stacks every category in a single 56px column (~2500px tall).
   Turn it into a tidy multi-column grid so all categories are scannable
   without a mile-long scroll, while keeping the icons + labels readable.
   -------------------------------------------------------------------------- */
/* --- Desktop/tablet: 2-column grid, tighter rows ------------------------- */
@media (min-width: 768px) {
  .home-page .sports-category__list,
  .home-page .sports-category .sports-category__list,
  .sports-category .sports-category__list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 2px !important;
    align-content: start !important;
    padding: 4px 4px 8px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: none !important;
  }
  .home-page .sports-category__list::after,
  .sports-category__list::after {
    display: none !important;
  }
  .sports-category::after {
    display: none !important;
  }
  .home-page .sports-category__list .sports-category__link,
  .home-page .sports-category .sports-category__link,
  .sports-category .sports-category__link {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 5px 6px !important;
    border-radius: 7px !important;
    border-left: 0 !important;
    text-align: start !important;
  }
  .home-page .sports-category__list .sports-category__icon,
  .home-page .sports-category .sports-category__icon,
  .sports-category .sports-category__link i {
    font-size: 0.95rem !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
    width: 16px !important;
    text-align: center !important;
  }
  .home-page .sports-category__list .sports-category__text,
  .home-page .sports-category .sports-category__text,
  .sports-category__list .sports-category__text {
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.01em !important;
  }
  /* Keep the active marker visible as a rounded highlight, not a left bar. */
  .sports-category .sports-category__link.active {
    border-left: 0 !important;
    box-shadow: inset 3px 0 0 var(--bb-blue-600) !important;
  }
  .sports-category__link.live-btn.active {
    box-shadow: inset 3px 0 0 var(--bb-danger) !important;
  }
  /* In-Play keeps its full-width banner row with the pulsing dot. */
  .sports-category > .live-btn {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  .sports-category > .live-btn .sports-category__text {
    font-size: 0.8rem !important;
  }
}
/* Wide desktop: give the rail a little more room so long labels fit on one line. */
@media (min-width: 1200px) {
  .home-page .sports-category__list,
  .sports-category__list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .home-page .sports-category,
  .sports-category {
    width: 244px !important;
    min-width: 244px !important;
  }
}
@media (max-width: 1199.98px) and (min-width: 992px) {
  .home-page .sports-category,
  .sports-category {
    width: 228px !important;
    min-width: 228px !important;
  }
}

/* --------------------------------------------------------------------------
   1d. Home Casino & Games rail (image cards)
   -------------------------------------------------------------------------- */
.home-casino-rail {
  margin-top: 4px;
}
.home-casino-rail .casino-tile-card {
  flex: 0 0 150px !important;
  width: 150px !important;
  height: 132px !important;
}
.casino-tile-card__img {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
/* The casino category artwork is a transparent square icon; show it whole on a
   felt tile with the label beneath instead of stretching it as a banner. */
.casino-tile-card__img[style*="categories/"] {
  background-size: contain !important;
  background-position: center 34% !important;
  background-color: var(--bb-workspace-surface-2, #16294A);
  background-repeat: no-repeat !important;
}
/* Square category cards keep a solid footer strip so the label always reads. */
.browse-casino-card[data-kind="category"] .sports-tile-card__overlay {
  background: linear-gradient(180deg,
    rgba(4, 12, 24, 0) 46%,
    rgba(4, 12, 24, 0.35) 60%,
    rgba(4, 12, 24, 0.94) 100%) !important;
  justify-content: flex-end !important;
}
.casino-tile-card__tag {
  display: block;
  margin-top: 1px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FBBF24;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
@media (max-width: 767.98px) {
  .home-casino-rail .casino-tile-card {
    flex: 0 0 132px !important;
    width: 132px !important;
    height: 118px !important;
  }
  .casino-tile-card__tag {
    font-size: 0.55rem;
  }
}

/* --------------------------------------------------------------------------
   1e. Sidebar top spacing
   The rail carries `top: var(--header-h)` for sticky scrolling, but the home
   shell already starts below the header, so that offset left an 85px gap under
   the announcement strip. Sit flush against the top of the shell instead.
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  /* .home-page clips overflow-x, which disables position:sticky for children.
     Keep the rail in normal flow, flush with the top of the shell (no 85px
     `--header-h` gap), and let it scroll with the page. */
  .home-page > .sports-category {
    position: relative !important;
    top: 0 !important;
    height: auto !important;
    max-height: none !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .home-page > .sports-category .sports-category__list {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* --------------------------------------------------------------------------
   2. Mobile sports sidebar: restore the off-canvas rail
   custom.css set position:relative at <=767 which pushed the whole page down.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .home-page .sports-category,
  .sports-category {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    width: min(300px, 86vw) !important;
    min-width: 0 !important;
    max-width: 300px !important;
    z-index: 10500 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.22s ease-out !important;
    overflow: hidden !important;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
  }
  .sports-category.active-category-side {
    transform: translateX(0) !important;
  }
  .sports-category__list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  .sports-category__link {
    flex: 0 0 auto !important;
    width: 100% !important;
    scroll-snap-align: none !important;
  }
  .sports-category::after {
    display: none !important;
  }
  .sports-body {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   3. Hero: compact on laptops/tablets, no 1000px-tall stacked hero on phones
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .home-page .hero-content-grid,
  .hero-content-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  /* The featured match panel duplicated the fixture list and doubled the
     hero height on 1024/900/768/390. Keep the hero to the pitch + CTA. */
  .home-page .featured-match-panel,
  .cricket-hero-card .featured-match-panel {
    display: none !important;
  }
  .home-page .cricket-hero-card,
  .cricket-hero-card {
    padding: 18px !important;
  }
}

@media (max-width: 767.98px) {
  .home-page .cricket-hero-card,
  .cricket-hero-card {
    padding: 12px !important;
    border-radius: 12px !important;
  }
  .hero-visual-bg {
    position: relative !important;
    inset: auto !important;
    height: 150px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    border-radius: 8px !important;
  }
  .hero-visual-bg::before {
    background: linear-gradient(180deg, rgba(7, 20, 38, 0.05) 35%, rgba(7, 20, 38, 0.72) 100%) !important;
  }
  .hero-title,
  .cricket-hero-card .hero-title {
    font-size: 1.32rem !important;
    line-height: 1.2 !important;
  }
  .hero-subtitle,
  .cricket-hero-card .hero-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
  }
  .hero-actions > * {
    flex: 1 1 100% !important;
  }
  .hero-actions .btn {
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 0.8rem !important;
  }
  .hero-badge-cyan,
  .hero-badge-amber,
  .hero-badge-gold {
    font-size: 0.62rem !important;
    padding: 3px 7px !important;
  }
}

/* Softer left scrim so the stadium photo is not crushed to black. */
.hero-visual-bg::before {
  background: linear-gradient(90deg,
    rgba(7, 20, 38, 0.94) 0%,
    rgba(7, 20, 38, 0.72) 38%,
    rgba(7, 20, 38, 0.20) 68%,
    rgba(7, 20, 38, 0.02) 100%) !important;
}
@media (max-width: 991.98px) {
  .hero-visual-bg::before {
    background: linear-gradient(180deg,
      rgba(7, 20, 38, 0.10) 0%,
      rgba(7, 20, 38, 0.55) 55%,
      rgba(7, 20, 38, 0.88) 100%) !important;
  }
}

/* --------------------------------------------------------------------------
   4. Trending sports tiles: brighter imagery, lighter scrim, bigger tiles
   -------------------------------------------------------------------------- */
.sports-tile-card {
  flex: 0 0 150px !important;
  height: 102px !important;
  border-radius: 10px !important;
}
.sports-tile-card__img {
  filter: none !important;
  background-size: cover !important;
  background-position: center !important;
}
.sports-tile-card__overlay,
html[data-theme="light"] .sports-tile-card__overlay {
  background-image: linear-gradient(180deg,
    rgba(4, 12, 24, 0) 46%,
    rgba(4, 12, 24, 0.14) 64%,
    rgba(4, 12, 24, 0.70) 100%) !important;
}
.sports-tile-card__badge {
  background: rgba(8, 120, 232, 0.94) !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.sports-tile-card__name {
  color: #FFFFFF !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.55);
}
@media (max-width: 575.98px) {
  .sports-tile-card {
    flex-basis: 132px !important;
    height: 92px !important;
  }
}

/* --------------------------------------------------------------------------
   5. Bet slip bottom sheet: flex column + internal scroll, never cut off
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .open-betslip .betslip {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    height: min(86dvh, 760px) !important;
    max-height: calc(100dvh - 8px) !important;
    width: auto !important;
    max-width: min(420px, 100%) !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    bottom: 0 !important;
    top: auto !important;
    overflow: hidden !important;
    border-radius: 14px 0 0 0;
  }
  .open-betslip .betslip > .betslip-header {
    flex: 0 0 auto !important;
  }
  .open-betslip .betslip > .betslip-inner {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .open-betslip .betslip-backdrop {
    z-index: 10490 !important;
  }
  .betslip-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--bb-workspace-border, #203B5B);
    background: transparent;
    color: var(--bb-workspace-muted, #94A3B8);
    cursor: pointer;
  }
  .betslip-close-btn:hover,
  .betslip-close-btn:focus-visible {
    color: #FFFFFF;
    border-color: #00B8D9;
  }
}

/* --------------------------------------------------------------------------
   6. Colourful, consistent menu icons
   The base rules use `.sports-category__link i { color: ... !important }`, so
   these selectors need equal !important weight plus :not() to keep hover/active
   feedback working.
   -------------------------------------------------------------------------- */
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 1) i { color: #FBBF24 !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 2) i { color: #34D399 !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 3) i { color: #60A5FA !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 4) i { color: #F472B6 !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 5) i { color: #A78BFA !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 6) i { color: #FB923C !important; }.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 7) i { color: #22D3EE !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 8) i { color: #F87171 !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 9) i { color: #4ADE80 !important; }
.sports-category__list .sports-category__link:not(.active):not(:hover):nth-child(10n + 10) i { color: #C084FC !important; }

/* --------------------------------------------------------------------------
   7. Contrast repairs (light theme first; dark stays as designed)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .match-quick-card .text-white,
html[data-theme="light"] .match-quick-card [class*="text-white"] {
  color: #0F172A !important;
}
html[data-theme="light"] .match-quick-card {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
}
html[data-theme="light"] .badge-contest-mega {
  background: #FFEDD5 !important;
  color: #7C2D12 !important;
  border-color: #FDBA74 !important;
}
html[data-theme="light"] .badge-crr {
  background: #E0F2FE !important;
  color: #0E7490 !important;
  border-color: #7DD3FC !important;
}
html[data-theme="light"] .quick-stake-pill {
  background: #F1F5F9 !important;
  color: #334155 !important;
  border-color: #CBD5E1 !important;
}
html[data-theme="light"] .casino-table-meta {
  color: #8A5A00 !important;
}
html[data-theme="light"] .fantasy-match-teams {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}
html[data-theme="light"] .fantasy-match-teams .fs--15,
html[data-theme="light"] .fantasy-match-teams .fw-bold {
  color: #0F172A !important;
}
html[data-theme="light"] .podium-card .podium-username {
  color: #0F172A !important;
}
html[data-theme="light"] .podium-card .badge[style*="0, 229, 251"] {
  background: #E0F2FE !important;
  color: #0E7490 !important;
  border-color: #7DD3FC !important;
}
html[data-theme="light"] .leaderboard-table td .badge[style*="19, 136, 8"] {
  background: #DCFCE7 !important;
  color: #15803D !important;
  border-color: #86EFAC !important;
}
html[data-theme="light"] .sports-news-header .text-info,
html[data-theme="light"] .sports-news-section .text-info {
  color: #0369A1 !important;
}
/* Cookie banner "learn more" was blue on grey (2.95:1). */
.cookies-card__content a {
  color: #0B4F9C !important;
  text-decoration: underline;
}

/* Light-theme text sitting on light card surfaces.
   These are all real measured failures (Bootstrap .text-warning/.text-info are
   designed for dark surfaces, but the light theme turns the cards white). */
html[data-theme="light"] .match-center-scoreboard .text-white,
html[data-theme="light"] .cricket-live-tracker .text-white,
html[data-theme="light"] .bg-dark-tint .text-white {
  color: #0F172A !important;
}
html[data-theme="light"] .bg-dark-tint .text-info,
html[data-theme="light"] .bg-dark-tint.text-info,
html[data-theme="light"] .match-center-scoreboard .text-info,
html[data-theme="light"] .match-center-head .text-info,
html[data-theme="light"] .match-center-head .btn-outline-info,
html[data-theme="light"] .match-quick-card .text-info,
html[data-theme="light"] .home-crash-showcase .text-info,
html[data-theme="light"] .fantasy-stat-box .text-info {
  color: #0E7490 !important;
}
html[data-theme="light"] .match-center-head .btn-outline-info {
  border-color: #0E7490 !important;
}
html[data-theme="light"] .match-center-scoreboard .text-warning,
html[data-theme="light"] .match-quick-card .text-warning,
html[data-theme="light"] .fantasy-stat-box .text-warning {
  color: #B45309 !important;
}
html[data-theme="light"] .match-vs-badge {
  color: #B45309 !important;
}
/* Win-probability strip keeps a dark translucent panel in light mode. */
html[data-theme="light"] .win-prob-wrapper {
  color: #E2E8F0 !important;
}
html[data-theme="light"] .win-prob-wrapper .text-muted {
  color: #CBD5E1 !important;
}

/* --------------------------------------------------------------------------
   7b. Dark-theme contrast repairs
   Base-template rules use hsl(var(--dark)) for text, which turns dark-on-dark
   once the dark theme flips --dark to a navy. Keep those labels readable.
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .badge--dark {
  color: #CBD5E1 !important;
  border-color: rgba(203, 213, 225, 0.35) !important;
}
html[data-theme="dark"] .betslip__list-ratio span,
html[data-theme="dark"] .betslip__list-text,
html[data-theme="dark"] .betslip__list-question,
html[data-theme="dark"] .betslip__list-match,
html[data-theme="dark"] .bet-slip-count {
  color: #CBD5E1 !important;
}
html[data-theme="dark"] .bet-type__btn input:checked + span,
html[data-theme="dark"] .bet-type__btn:has(input:checked) span {
  color: #FFFFFF !important;
}
html[data-theme="dark"] .btn-brand-glow {
  color: #E2E8F0 !important;
  border-color: rgba(0, 229, 251, 0.45) !important;
}
/* Six-run ball: white on #10B981 is only 2.5:1. */
.cricket-ball.six {
  background: #047857 !important;
  border-color: #047857 !important;
  color: #FFFFFF !important;
}
/* Hero copy sits over the stadium photo; keep a shadow so it survives a bright
   frame of the carousel. */
.hero-title,
.hero-subtitle {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------------
   8. Campaign banner rail (all supplied Banner assets)
   -------------------------------------------------------------------------- */
.bb-campaign-rail {
  position: relative;
  margin: 2px 0 14px;
}
.bb-campaign-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 14px;
}
.bb-campaign-scroll::-webkit-scrollbar { display: none; }
.bb-campaign-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--bb-workspace-border, #203B5B);
  background: #0B1B31;
  text-decoration: none !important;
  box-shadow: none;
}
.bb-campaign-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
  aspect-ratio: 1600 / 535;
  object-fit: cover;
  object-position: center;
}
.bb-campaign-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.bb-campaign-nav button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--bb-workspace-border, #203B5B);
  background: var(--bb-workspace-surface, #10243D);
  color: var(--bb-workspace-text, #FFFFFF);
  cursor: pointer;
}
.bb-campaign-nav button:hover { border-color: #00B8D9; color: #00B8D9; }
.bb-campaign-hint {
  margin-right: auto;
  font-size: 0.72rem;
  color: var(--bb-workspace-muted, #94A3B8);
}

/* Reusable page-top campaign banner */
.bb-page-banner {
  display: block;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--bb-workspace-border, #203B5B);
  background: #0B1B31;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.bb-page-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2168 / 725;
  object-fit: cover;
}

/* Final banner visibility and responsive sizing.
   The supplied hero banners are 2168x725 (~3:1). Match that aspect exactly and
   use object-fit:cover so the image fills the card edge-to-edge — a 16/7 box
   with `contain` letterboxed ~70px of empty space under the artwork. */
#bbHeroShowcase { padding: 0 !important; overflow: hidden !important; min-height: 0 !important; }
#bbHeroShowcase .hero-slide { display: none !important; min-height: 0 !important; height: auto !important; aspect-ratio: auto !important; padding: 0 !important; margin: 0 !important; }
#bbHeroShowcase .hero-slide.active { display: block !important; }
#bbHeroShowcase .hero-slides-wrapper { min-height: 0 !important; }
#bbHeroShowcase .hero-banner-image,
#bbHeroShowcase .hero-visual-bg {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1600 / 700 !important;
  object-fit: cover !important;
  object-position: center !important;
  background-size: cover !important;
  background-position: center !important;
}
#bbHeroShowcase .hero-content-grid, #bbHeroShowcase .hero-copy, #bbHeroShowcase .featured-match-panel { display: none !important; }
#bbHeroShowcase .hero-carousel-nav { display: none !important; }
.bb-campaign-card img, .bb-page-banner img { width: 100% !important; height: auto !important; max-height: none !important; aspect-ratio: auto !important; object-fit: cover !important; object-position: center !important; background: var(--bb-workspace-surface, #12233D) !important; }
@media (max-width: 767px) {
  /* Phones must show the WHOLE banner, not a centre crop. The supplied art is
     2168x725 (~3:1) with copy on the left, so cropping to 16/9 chopped the
     headline. Keep the natural aspect and scale the full artwork down. */
  #bbHeroShowcase .hero-banner-image,
  #bbHeroShowcase .hero-visual-bg {
    aspect-ratio: 1600 / 700 !important;
    object-fit: cover !important;
    object-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
  /* Same treatment for the campaign rail + page banners so no artwork is cut. */
  .bb-campaign-card img,
  .bb-page-banner img {
    aspect-ratio: 2168 / 725 !important;
    object-fit: contain !important;
  }
}

/* --------------------------------------------------------------------------
   8. Dedicated browse pages (/trending-sports and /casino-games)
   -------------------------------------------------------------------------- */
.browse-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--bb-text-secondary, #64748B);
}
.browse-breadcrumb a {
  color: var(--bb-blue-600, #0878E8);
  text-decoration: none;
  font-weight: 600;
}
.browse-breadcrumb a:hover { text-decoration: underline; }

.browse-hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--bb-workspace-surface, #12233D);
  border: 1px solid var(--bb-workspace-border, rgba(255,255,255,.12));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .browse-hero-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
}
.browse-hero-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 12px;
  font-size: 1.6rem;
  color: #FFFFFF;
  background: linear-gradient(135deg, #F59E0B 0%, #F43F5E 100%);
}
.browse-hero-card--casino .browse-hero-card__icon {
  background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 100%);
}
.browse-hero-card__title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  margin: 0 0 3px;
  color: var(--bb-text-primary, #0F172A);
}
.browse-hero-card__desc { color: var(--bb-text-secondary, #64748B); max-width: 70ch; }

.browse-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--bb-text-primary, #0F172A);
  margin: 0;
}

/* Grid cells reuse .sports-tile-card, so stretch them to the column width.
   The base rule sets a fixed pixel height; the browse grid needs a fluid,
   aspect-ratio-driven card instead. */
.browse-sport-card,
.browse-casino-card {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
  position: relative !important;
  overflow: hidden !important;
}
.browse-sport-card { aspect-ratio: 150 / 102 !important; }
.browse-casino-card { aspect-ratio: 150 / 132 !important; }
.browse-sport-card .sports-tile-card__img,
.browse-casino-card .sports-tile-card__img,
.browse-sport-card .sports-tile-card__overlay,
.browse-casino-card .sports-tile-card__overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.browse-sport-card .sports-tile-card__overlay,
.browse-casino-card .sports-tile-card__overlay {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  padding: 8px !important;
}

/* Compact category list rows. */
.browse-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none !important;
  background: var(--bb-workspace-surface, #12233D);
  border: 1px solid var(--bb-workspace-border, rgba(255,255,255,.12));
  color: var(--bb-text-primary, #0F172A);
  transition: border-color .15s ease, transform .15s ease;
}
html[data-theme="light"] .browse-cat-row { background: #FFFFFF; border-color: #E2E8F0; }
.browse-cat-row:hover {
  border-color: var(--bb-blue-600, #0878E8);
  transform: translateY(-1px);
}
.browse-cat-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  flex: 0 0 26px;
  font-size: 1.05rem;
  color: var(--bb-blue-600, #0878E8);
}
.browse-cat-row__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browse-cat-row__count {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: #0E7490;
  background: rgba(8, 120, 232, 0.12);
}
html[data-theme="dark"] .browse-cat-row__count { color: #7DD3FC; background: rgba(125, 211, 252, 0.16); }

@media (max-width: 575.98px) {
  .browse-hero-card { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .browse-hero-card .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   9. Premium match cards (home + category feed)
   Team logos are shown at a readable size, team rows sit on their own line and
   the market header reads as a proper "Winner" column like a sportsbook.
   -------------------------------------------------------------------------- */
.betting-body .sports-card {
  border-radius: 12px !important;
  overflow: hidden;
}
.home-page .betting-body .sports-card__team-flag,
.betting-body .sports-card__team-flag {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  border: 1px solid var(--bb-workspace-border, rgba(255,255,255,.16)) !important;
  overflow: hidden !important;
}
.home-page .betting-body .sports-card__team-flag-img,
.betting-body .sports-card__team-flag-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 3px !important;
}
.betting-body .sports-card__team {
  gap: 10px !important;
  padding: 6px 0 !important;
}
.betting-body .sports-card__team-name {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
}
/* Market header row (1 / - / 2, Total, etc.) reads as a labelled column. */
.betting-body .sports-card-top-inner {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  background: var(--bb-workspace-surface-2, rgba(255,255,255,.04)) !important;
  border-bottom: 1px solid var(--bb-workspace-border, rgba(255,255,255,.08)) !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--bb-text-secondary, #94A3B8) !important;
}
.betting-body .sports-card-top-inner .team-select-title {
  flex: 1 1 0 !important;
  text-align: center !important;
}
.betting-body .sports-card-top-inner .team-select-title:first-child,
.betting-body .sports-card-top-inner .team-select-title:last-child {
  color: var(--bb-text-primary, #E2E8F0) !important;
}
/* Live score strip stays prominent. */
.betting-body .cricket-score-summary,
.betting-body .cricket-situation {
  font-weight: 700 !important;
}

@media (max-width: 767.98px) {
  .betting-body .sports-card__team-flag {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px !important;
  }
  .betting-body .sports-card__team-name { font-size: 0.8rem !important; }
}

/* --------------------------------------------------------------------------
   1f. Sports drawer: odds format + language segmented controls
   -------------------------------------------------------------------------- */
.drawer-controls {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.drawer-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.drawer-control-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94A3B8;
}
.drawer-control-label i { font-size: 0.95rem; }
.drawer-control-btns {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
.drawer-seg {
  border: 0;
  background: transparent;
  color: #CBD5E1;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.drawer-seg:hover { color: #FFFFFF; }
.drawer-seg.active {
  background: #0878E8;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(8, 120, 232, 0.35);
}

/* --------------------------------------------------------------------------
   1g. Floating help widget: keep it clear of the 330px bet slip
   On betting pages the bet slip owns the right edge, so the Help & Guide
   button overlaps it. Shift the widget left of the slip on those pages.
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  body:has(.betslip) .bb-chatbot-container {
    right: 366px !important;
  }
}

/* --------------------------------------------------------------------------
   1h. Home "Live Now" rail (in-play matches with live scores + odds)
   -------------------------------------------------------------------------- */
.live-now-rail { margin-top: 2px; }
.live-now-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: liveNowPulse 1.6s infinite;
  vertical-align: middle;
  margin-right: 2px;
}
@keyframes liveNowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.live-now-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.live-now-scroll::-webkit-scrollbar { display: none; }
.live-now-card {
  flex: 0 0 232px;
  width: 232px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 12px;
  text-decoration: none !important;
  background: var(--bb-workspace-surface, #12233D);
  border: 1px solid var(--bb-workspace-border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
  transition: transform .15s ease, border-color .15s ease;
}
html[data-theme="light"] .live-now-card { background: #FFFFFF; border-color: #E2E8F0; }
.live-now-card:hover { transform: translateY(-2px); border-color: #0878E8; }
.live-now-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.live-now-card__live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #EF4444;
}
.live-now-card__league {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--bb-text-secondary, #64748B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.live-now-card__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.live-now-card__team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 0;
}
.live-now-card__team--right { justify-content: flex-end; }
.live-now-card__team img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #FFFFFF;
  padding: 2px;
  flex: 0 0 24px;
}
.live-now-card__name {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--bb-text-primary, #0F172A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-now-card__vs {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--bb-text-secondary, #94A3B8);
  flex: 0 0 auto;
}
.live-now-card__score {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0E7490;
  background: rgba(8, 120, 232, 0.10);
  border-radius: 6px;
  padding: 4px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-theme="dark"] .live-now-card__score { color: #7DD3FC; background: rgba(125, 211, 252, 0.14); }
.live-now-card__odds { display: flex; gap: 6px; }
.live-now-card__odd {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--bb-font-mono, monospace);
  padding: 5px 0;
  border-radius: 6px;
  color: #DC2626;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.live-now-card__odd:nth-child(2) {
  color: #2563EB;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.25);
}
html[data-theme="dark"] .live-now-card__odd { color: #FCA5A5; }
html[data-theme="dark"] .live-now-card__odd:nth-child(2) { color: #93C5FD; }
.live-now-card__cta {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0878E8;
  text-align: right;
}
html[data-theme="dark"] .live-now-card__cta { color: #7DD3FC; }

@media (max-width: 575.98px) {
  .live-now-card { flex: 0 0 200px; width: 200px; }
  .live-now-card__team img { width: 22px; height: 22px; flex-basis: 22px; }
}

/* --------------------------------------------------------------------------
   1i. Dedicated /live board
   -------------------------------------------------------------------------- */
.browse-hero-card--live .browse-hero-card__icon {
  background: linear-gradient(135deg, #EF4444 0%, #F59E0B 100%);
}
.live-board-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--bb-workspace-surface, #12233D);
  border: 1px solid var(--bb-workspace-border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}
html[data-theme="light"] .live-board-card { background: #FFFFFF; border-color: #E2E8F0; }
.live-board-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.live-board-card__league {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--bb-text-secondary, #64748B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.live-board-card__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.live-board-card__odds { display: flex; gap: 8px; margin-top: auto; }
.live-board-odd {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.live-board-odd small {
  font-size: 0.6rem;
  font-weight: 700;
  opacity: .85;
}
.live-board-odd strong { font-size: 0.95rem; font-weight: 800; font-family: var(--bb-font-mono, monospace); }
.live-board-odd--back {
  color: #DC2626;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
}
.live-board-odd--lay {
  color: #2563EB;
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.25);
}
.live-board-odd:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
html[data-theme="dark"] .live-board-odd--back { color: #FCA5A5; }
html[data-theme="dark"] .live-board-odd--lay { color: #93C5FD; }
.live-board-card__cta {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0878E8;
  text-align: right;
  text-decoration: none !important;
}
html[data-theme="dark"] .live-board-card__cta { color: #7DD3FC; }
.browse-empty {
  border-radius: 12px;
  background: var(--bb-workspace-surface, #12233D);
  border: 1px dashed var(--bb-workspace-border, rgba(255, 255, 255, 0.18));
}
html[data-theme="light"] .browse-empty { background: #FFFFFF; border-color: #E2E8F0; }
