/**
 * R8.2b — Home / shell page flow ownership (DOCTYPE + standards-mode scroll).
 * One vertical scroll owner: documentElement (html) in standards mode.
 *
 * ROOT CAUSE (still broken after R8.2a):
 *   dream-ui/index.html had NO <!DOCTYPE html> → document.compatMode=BackCompat
 *   → document.scrollingElement=null → unreliable mobile/document scroll.
 *
 * Also supersedes Dream mobile `.content { overflow:hidden; min-height:calc(95vh-70px) }`.
 */
html {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100%;
  /* standards-mode scroll root */
  -webkit-overflow-scrolling: touch;
}

body {
  /* overflow-x:hidden + overflow-y:visible → oy computes to auto (CSS pairing).
     Keep body fully visible; html owns both clip-x and scroll-y. */
  overflow: visible;
  height: auto;
  min-height: 100%;
  min-height: 100dvh;
}

/* App shell grows with content — never a nested 100vh scroll trap */
.d-flex.app-body.adjust-height,
.app-body.adjust-height,
.app-body {
  height: auto !important;
  max-height: none !important;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible !important;
  flex-wrap: nowrap;
  align-items: stretch;
}

/* Content participates in document flow — both axes visible */
.content,
div.content,
.content[_ngcontent-ng-c822550196],
.content[_ngcontent-ng-c2192290883] {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

@media only screen and (max-width: 991px) {
  .content,
  div.content,
  .content[_ngcontent-ng-c822550196],
  .content[_ngcontent-ng-c2192290883] {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Event lists: content-driven height (no viewport cap) */
app-home .sports-wrapper,
app-home .inplay-wrapper,
app-home .upcoming-wrapper,
app-home .tab-content,
app-home .tab-pane,
app-home .list-group,
app-dashboard .sports-wrapper,
.home-page .sports-wrapper,
.home-center .sports-list,
app-inplay .tab-content,
app-inplay .list-group {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Casino section: normal document flow after sports */
app-home app-old-casino,
app-dashboard app-old-casino,
.home-page app-old-casino,
app-home .casino-section,
app-old-casino {
  position: relative !important;
  display: block;
  clear: both;
  float: none;
  top: auto !important;
  bottom: auto !important;
  left: auto;
  right: auto;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

/* Sport category row: horizontal only */
app-home .menu-list,
app-home .sport-menu,
app-home .nav-tabs,
app-home .owl-stage-outer,
.home-center .menu-list,
.sports-menu,
.sportTab,
ul.sports-tab {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Casino category tabs: horizontal only */
app-old-casino .menu-list,
app-old-casino .casino-menu,
app-old-casino .nav-tabs,
app-old-casino .owl-stage-outer {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x pan-y;
  overscroll-behavior-y: auto;
}

/* Event rows must not intercept vertical page swipe */
app-home .list-group-item,
app-home a[href*="fullMarket"],
app-home .event-name,
app-inplay .list-group-item {
  touch-action: manipulation;
  pointer-events: auto;
}

/* Highlight strips: horizontal only */
.scrollHeight {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

/*
 * Fixed bottom nav clearance.
 * Dream footer link height ≈ 13.33333vw; keep last casino/event row above nav.
 */
.content,
.main-container,
app-home,
app-inplay,
app-fullmarket,
app-market-details,
app-casino,
app-old-casino,
app-account,
app-my-account {
  padding-bottom: calc(13.33333vw + 40px + env(safe-area-inset-bottom, 0px)) !important;
}

@media only screen and (min-width: 992px) {
  .content,
  .main-container,
  app-home,
  app-inplay,
  app-fullmarket,
  app-market-details,
  app-casino,
  app-old-casino,
  app-account,
  app-my-account {
    padding-bottom: 24px !important;
  }
}

/* Keep casino images stable (R6 freeze) */
app-old-casino .casinoicons img.img-fluid,
app-old-casino .casinoicons img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  min-height: 96px;
  background: #1a1a2e;
}
