/*
 * Structural host only — replaces missing ion-content scroll + full-height shell.
 * Does not restyle colors/typography; enables original .page-body overflow-y:auto.
 */
html,
body,
#root {
  height: 100%;
  margin: 0;
}

/* Match prod app-root: dark outside the 768 shell (never yellow side frames). */
#root {
  background: var(--grey-00, #111111);
}

#root > mat-sidenav-container.mat-drawer-container,
#root > .mat-drawer-container.mat-sidenav-container {
  height: 100%;
  max-width: 768px;
  margin: 0 auto;
  display: block;
  overflow: hidden;
}

#root mat-sidenav-content.mat-drawer-content,
#root .mat-drawer-content.mat-sidenav-content {
  height: 100%;
  display: block;
}

#root .main {
  height: 100%;
}

#root .main > .container {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  /*
   * Bootstrap main.4c3529e2.css sets .container { padding:0 15px; max-width:1200px }.
   * Prod styles.6050 zeroes padding and caps at 768. Without this, yellow
   * --secondary-color on .main>.container shows as L/R gutters beside .page-body.
   */
  padding-left: 0;
  padding-right: 0;
  max-width: 768px;
  width: 100%;
  box-sizing: border-box;
}

/*
 * Homepage keeps yellow shell (wallet header). Inner routes (sports/casino/…)
 * match prod: container background is grey-00, not secondary yellow.
 */
#root .main > .container:not(:has(.wallet-wrapper)) {
  background: var(--grey-00, #111111);
}

/*
 * Fill the flex column below `.page-header` / above footer. Do NOT override
 * gopanel-components `height:100%` with `height:auto` — that collapses the
 * scroll shell to 0px and exposes the yellow `.container` background.
 */
#root .page-body {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /*
   * component-profile-page.css sets .page-body { margin-bottom:120px } without
   * Angular encapsulation. Prod only uses 60px (footer height). Extra 60px of
   * margin sits above the fixed footer and exposes yellow .container on home.
   */
  margin-bottom: 60px;
}

/* Profile/payment shells that need taller clearance under stacked chrome */
#root .page-body:has(.user-bal-info),
#root .page-body:has(.user-payment-info) {
  margin-bottom: 120px;
}

/*
 * Without Ionic runtime, ion-content stays display:inline and blows out layout
 * (15px baseline gap + full document height). Prod hydrated ion-content is
 * display:block, position:relative, min-height:100% inside the scroll shell.
 */
#root .page-body ion-content {
  display: block;
  min-height: 100%;
  position: relative;
}

/* Ensure drawer panel uses theme surface when opened over content */
#root .mat-sidenav-container > .mat-drawer.left-sidemenu {
  background: var(--grey-00);
}

#root .mat-sidenav-container .left-sidemenu .smenu-link {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

/*
 * Guard: global `.not-loggedIn{display:flex}` (from de-encapsulated Angular CSS)
 * must never lay out `.page-header` as a row.
 */
#root .page-header {
  display: block;
}

/*
 * styles.6050 sets:
 *   .page-header { margin-bottom: 30px }
 *   .page-header.not-loggedIn { margin-bottom: 15px !important }
 * Homepage zeroes via component-13 [_ngcontent] / :has(.wallet-wrapper).
 * Inner SubHeader routes lack those selectors, so the 15px margin paints as a
 * black strip (grey-00 .container) between the 44px header and
 * .forSearchBar-internal. Prod Angular keeps header→search flush (gap 0).
 * Scope to non-wallet headers only — do not disturb homepage yellow shell.
 */
#root .page-header:not(:has(.wallet-wrapper)) {
  margin-bottom: 0;
}
/* Mirror component-13's !important zero — required to beat styles.6050 guest rule. */
#root .page-header.not-loggedIn:not(:has(.wallet-wrapper)) {
  margin-bottom: 0 !important;
}

/* Banner bullets — original uses swiper ::part(); we mirror the look */
#root .page-banner {
  position: relative;
}
#root .page-banner swiper-container {
  display: block;
  /* Prod swiper shadow slot reserves ~4px for horizontal pagination bullets. */
  padding-bottom: 4px;
}
#root .page-banner .img-wrap {
  line-height: 0;
}
#root .page-banner .img-wrap img {
  display: block;
}
#root .page-banner .banner-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  margin-top: 0;
  z-index: 2;
  pointer-events: auto;
}
#root .page-banner .banner-bullet {
  width: 15px;
  height: 3px;
  border: none;
  padding: 0;
  border-radius: 0;
  background: var(--black-color);
  cursor: pointer;
}
#root .page-banner .banner-bullet.active {
  background: var(--secondary-color);
}

/* Light-DOM mat-tab stubs — prod Angular lazy chunks style mat-tab-header children */
#root .sports-tabs-group mat-tab-header .mat-mdc-tab-labels,
#root .inplay-page-wrap mat-tab-header .mat-mdc-tab-labels,
#root .pagetab-body mat-tab-header .mat-mdc-tab-labels,
#root .ids-tabnav mat-tab-header .mat-mdc-tab-labels {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}
#root .sports-tabs-group mat-tab-header .mat-mdc-tab-labels .mdc-tab,
#root .inplay-page-wrap mat-tab-header .mat-mdc-tab-labels .mdc-tab,
#root .pagetab-body mat-tab-header .mat-mdc-tab-labels .mdc-tab,
#root .ids-tabnav mat-tab-header .mat-mdc-tab-labels .mdc-tab {
  flex: 1 0 auto;
  max-width: none;
}

/*
 * MDC tab underline base (normally from Angular Material). Without
 * border-top-style:solid, styles.6050… border-width/color cannot paint.
 */
#root mat-tab-header .mdc-tab-indicator__content--underline {
  border-top-style: solid;
}

/*
 * Sports match cards sit on white surfaces while .page-body inherits light
 * text from the shell — force readable ink on the card.
 */
#root .matches-wrap .game-card {
  color: #111;
}
#root .matches-wrap .game-card .tournament-title,
#root .matches-wrap .game-card .score-info h3,
#root .matches-wrap .game-card .score-info p {
  color: #111;
}

/* Schedule chip: original rule used same --primary for bg+text (invisible). */
#root .matches-wrap .game-card.w-icon-view .schedule-time {
  color: #fff;
  background: #111;
  border-radius: 12px;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

/*
 * Wallet grid is production-owned (300px / 1fr 2fr 1fr). On narrow phones
 * ensure the host shell never forces horizontal overflow from the grid.
 */
#root .wallet-wrapper {
  overflow-x: hidden;
  max-width: 100%;
}
