/* Scoped Stage 4 pilot. No desktop or data changes. */
@media (max-width: 700px) {
  /* The unified router owns the visible region, even if the legacy rail
     still carries the UK class from its previous render. */
  body:has(#regionButtons > [data-region="europe" i][aria-pressed="true"]) #countryButtons.uk-countries {
    flex-wrap: wrap;
  }
  body:has(#regionButtons > [data-region="europe" i][aria-pressed="true"]) #countryButtons.uk-countries button {
    min-width: 0;
    flex: 0 0 auto;
    padding-inline: 7px;
  }
  body.bt-player-screen-active #tableContainer.bt-player-screen .l1pc-player-name {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  body.bt-player-screen-active #tableContainer.bt-player-screen .dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
  [data-bt-mobile-player-scroll]:focus-visible {
    outline: 2px solid #08d7e8;
    outline-offset: -2px;
  }
}

@media (max-width: 1024px) {
  #handicapTable details.odds-best-more > summary {
    box-sizing: border-box;
    min-width: 24px;
    min-height: 24px;
  }
  #handicapTable details.odds-best-more > summary:focus-visible {
    outline: 2px solid #08d7e8;
    outline-offset: 1px;
  }
  #handicapTable details.odds-best-more[open] > .odds-best-more-popover[data-bt-mobile-odds] {
    box-sizing: border-box;
    position: fixed;
    inset: auto;
    left: var(--bt-mobile-odds-x, 0px);
    top: var(--bt-mobile-odds-y, 0px);
    transform: none;
    max-width: var(--bt-mobile-odds-width, calc(100vw - 16px));
    max-height: var(--bt-mobile-odds-height, calc(100vh - 16px));
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    z-index: 30000;
  }
}


@media (max-width: 700px) {
  body.bt-player-screen-active #tableContainer.bt-player-screen .dataTables_wrapper:has(
    #handicapTable.bt-player-table thead [data-bt-native-sortable="1"][data-bt-player-column="team"]
  ) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  body.bt-player-screen-active #tableContainer.bt-player-screen #handicapTable.bt-player-table:has(
    thead [data-bt-native-sortable="1"][data-bt-player-column="team"]
  ) {
    min-width: 600px !important;
    max-width: none !important;
  }

  body.bt-player-screen-active #tableContainer.bt-player-screen #handicapTable.bt-player-table:has(
    thead [data-bt-native-sortable="1"][data-bt-player-column="team"]
  ) :is([data-bt-player-column="player"], [data-bt-player-column="team"]) {
    overflow-wrap: break-word !important;
  }

  .bt-wide-player-scroll-hint {
    margin: 0;
    padding: 6px 8px;
    color: #eef0f8;
    font-size: 12px;
  }

  [data-bt-mobile-player-scroll]:focus-visible {
    outline: 2px solid #08d7e8;
    outline-offset: -2px;
  }

  #countryButtons:not(:has([data-country="England" i]:not([hidden]), [data-country="Scotland" i]:not([hidden]))) {
    flex-wrap: wrap;
  }
}

