/* Shared mobile layout, loaded after the page styles in both public renderers.
   Keep existing content, links, provider data and desktop layout intact. */
/* JS/server wrappers are transparent on desktop; no desktop layout changes. */
.pd-date-choices, .sc-date-choices, .trn-league-choices { display: contents; }

@media (max-width: 900px) {
  /* Preserve full safety copy after the primary page content, never hide it. */
  .dsn-main > .dsn-container:has(> .dsn-rg-bar) {
    display: flex;
    flex-direction: column;
  }
  .dsn-main > .dsn-container:has(> .dsn-rg-bar) > * { min-width: 0; }
  .dsn-main > .dsn-container > .dsn-rg-bar {
    order: 90;
    margin: 22px 0 0;
    padding: 14px;
    font-size: 12px;
    line-height: 1.65;
  }
  .dsn-main > .dsn-container > .dsn-rg-bar a { overflow-wrap: anywhere; }

  /* Native controls remain familiar; touch targets stay comfortably sized. */
  .pd-page-title { font-size: 24px; line-height: 1.25; margin-bottom: 10px; }
  .pd-intro { font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
  .pd-layout > *, .pd-vb-grid, .pd-vb-card-wrap, .pd-vb-card, .pd-best-bet { min-width: 0; max-width: 100%; }
  .pd-bb-league { flex-wrap: wrap; }
  .pd-bb-match .pd-bb-team { min-width: 0; flex-wrap: wrap; gap: 6px; }
  .pd-bb-match .pd-bb-team span { min-width: 0; overflow-wrap: anywhere; }
  .pd-bb-tip { flex-wrap: wrap; gap: 8px; }
  .pd-bb-tip .pd-bb-conf { flex: 1 1 120px; }
  .pd-best-bet .pd-bb-btn, .pd-vb-card .pd-vb-btn { min-height: 44px; }
  .pd-vb-card__pick-row { flex-wrap: wrap; gap: 7px; }
  .pd-vb-card__stats { flex-wrap: wrap; gap: 12px; }

  .pd-date-nav, .sc-date-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 7px;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    padding-bottom: 0;
  }
  .pd-date-nav > .pd-date-choices, .sc-date-nav > .sc-date-choices {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 5px;
  }
  .pd-date-nav .pd-date-pill, .sc-date-nav .sc-date-pill {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 13px;
  }
  /* Keep the native date picker visible while the date choices can scroll. */
  .pd-date-nav .pd-date-nav__cal, .sc-date-nav .sc-date-nav__cal {
    position: relative;
    right: auto;
    z-index: auto;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-left: 0;
    background-color: #1a1d2e;
    box-shadow: none;
  }
  .pd-date-nav__cal input[type="date"], .sc-date-nav__cal input[type="date"] { inset: -1px; min-width: 44px; min-height: 44px; font-size: 16px; }
  .pd-mobile-bar .pd-mobile-filter-btn { min-height: 44px; padding: 10px 14px; font-size: 13px; }
  .pd-league-hub { max-width: 100%; min-width: 0; }
  .pd-league-hub .pd-league-nav { flex-wrap: nowrap; overflow-x: auto; gap: 7px; overscroll-behavior-x: contain; }
  .pd-league-nav .pd-league-pill { flex: 0 0 auto; min-height: 44px; padding: 9px 12px; font-size: 12px; }
  .pd-sidebar select, .pd-sidebar input[type="number"] { min-height: 44px; }
  .pd-sidebar .pd-market-btn, .pd-sidebar .pd-line-btn, .pd-sidebar .pd-filter-clear { min-height: 44px; padding: 10px 12px; }

  /* Quick filters occupy one predictable row; full league lists stay available. */
  .hl-filter { gap: 8px; margin-bottom: 16px; }
  .hl-filter .hl-filter__quick {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    gap: 7px;
    padding-bottom: 4px;
    overscroll-behavior-x: contain;
  }
  .hl-filter .hl-filter-btn { flex-shrink: 0; min-height: 44px; font-size: 12px; padding: 9px 12px; }
  .hl-filter__more { width: 100%; }
  .hl-filter__more summary { min-height: 44px; padding: 11px 13px; box-sizing: border-box; }
  .hl-filter__panel { padding: 12px; }
  .hl-filter__panel input { min-height: 44px; font-size: 16px; }

  .bk-hero .bk-hero__stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 8px; }
  .bk-hero__stats .bk-hero__stat { min-width: 0; }
  .bk-hero__stats .bk-hero__stat-num { font-size: clamp(16px,5vw,22px); white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .bk-hero__stats .bk-hero__stat-label { overflow-wrap: anywhere; }
  .bk-bar { align-items: stretch; gap: 10px; }
  .bk-bar .bk-bar__filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    padding-bottom: 4px;
    gap: 7px;
    overscroll-behavior-x: contain;
  }
  .bk-bar .bk-filter-btn { flex: 0 0 auto; min-height: 44px; font-size: 13px; padding: 9px 13px; }
  .bk-bar .bk-bar__sort { width: 100%; }
  .bk-bar .bk-sort-select { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }

  .acc-filter-bar { align-items: flex-start; gap: 10px; }
  .acc-filter-bar .acc-filter-group { flex: 1 1 130px; min-width: 0; }
  .acc-filter-bar .acc-filter-select-wrap { width: 100%; }
  .acc-filter-bar .acc-filter-select { width: 100%; max-width: 100%; min-height: 44px; padding: 10px 30px 10px 12px; font-size: 14px; }
  .acc-filter-bar .acc-filter-clear-link { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; }
  .acc-filter-bar .acc-filter-count { margin: 0; }
  .acc-card { min-width: 0; max-width: 100%; }
  .acc-card:has(> .acc-table) { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }

  .tf-layout > * { min-width: 0; }
  .tf-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; width: 100%; min-width: 0; max-width: 100%; }
  .tf-filters .tf-filter-select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 30px 10px 11px; font-size: 14px; }
  .tf-filters .tf-filter-search { grid-column: 1 / -1; width: 100%; max-width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
  .tf-filters .tf-filter-type { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; width: 100%; min-width: 0; }
  .tf-filter-type .tf-type-btn { flex: 1 0 auto; min-height: 44px; padding: 8px 12px; }

  .sc-filter-bar .sc-league-btn, .sc-live-toggle, .rs-page-tabs a { min-height: 44px; }
  .tm-tabs .trn-tab, .trn-tabs .trn-tab, .mt-tabs .mt-tab { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; }
  .tm-tabs, .trn-tabs, .mt-tabs { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }

  /* League identity first, then navigation and the already-existing partner strip. */
  .dsn-main > .dsn-container:has(> #trnHero) { display: flex; flex-direction: column; }
  .dsn-main > .dsn-container:has(> #trnHero) > * { order: 10; min-width: 0; }
  .dsn-main > .dsn-container:has(> #trnHero) > .trn-breadcrumb { order: 0; }
  .dsn-main > .dsn-container:has(> #trnHero) > .trn-page-h1 { order: 1; }
  .dsn-main > .dsn-container:has(> #trnHero) > #trnHero { order: 2; }
  .dsn-main > .dsn-container:has(> #trnHero) > .trn-cta-links { order: 3; }
  .dsn-main > .dsn-container:has(> #trnHero) > .trn-league-bar { order: 4; }
  .dsn-main > .dsn-container:has(> #trnHero) > .bm-strip { order: 5; }
  .trn-league-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    max-width: 100%;
    padding-bottom: 5px;
    overscroll-behavior-x: contain;
  }
  .trn-league-bar .trn-league-bar__item { flex: 0 0 auto; min-height: 44px; padding: 9px 12px; }
  .trn-league-bar:has(> .trn-league-choices) { flex-direction: column; overflow: visible; }
  .trn-league-bar > .trn-league-choices { display: flex; flex: 1 1 auto; width: 100%; min-width: 0; flex-wrap: nowrap; gap: 7px; overflow-x: auto; padding-bottom: 5px; overscroll-behavior-x: contain; }
  .trn-league-bar .trn-league-bar__more { position: relative; flex: 0 0 auto; width: 100%; min-height: 44px; background: #1f2937; justify-content: center; white-space: normal; }
  .trn-cta-links .trn-cta-links__btn { min-height: 44px; }
  .trn-leagues-overlay .trn-leagues-overlay__close { width: 44px; height: 44px; }
  .trn-leagues-overlay__search { min-height: 44px; font-size: 16px; }
  .trn-leagues-overlay__item { min-height: 44px; }

  /* Retain the familiar team-score-team composition on narrow screens. */
  .seo-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
    align-items: center;
    gap: 8px 10px;
    padding: 18px 14px;
    margin-bottom: 16px;
  }
  .seo-hero > .seo-hero__team { grid-column: 1; grid-row: 1 / span 3; min-width: 0; gap: 8px; align-self: center; }
  .seo-hero > .seo-hero__team--away { grid-column: 3; }
  .seo-hero .seo-hero__crest { width: 46px; height: 46px; }
  .seo-hero .seo-hero__team-name { font-size: 13px; line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; }
  .seo-hero > .seo-hero__center { display: contents; }
  .seo-hero__center > .seo-hero__score { grid-column: 2; grid-row: 1; font-size: 32px; margin: 0; align-self: end; white-space: nowrap; text-align: center; }
  .seo-hero__center > .seo-hero__score-label { grid-column: 2; grid-row: 2; font-size: 12px; line-height: 1.4; margin: 0; text-align: center; }
  .seo-hero__center > .seo-hero__meta { grid-column: 1 / -1; grid-row: 4; flex-wrap: wrap; font-size: 12px; line-height: 1.45; gap: 4px 8px; margin-top: 4px; }
  .seo-hero__center > .seo-match-centre { grid-column: 1 / -1; grid-row: 5; min-height: 44px; margin-top: 4px; padding: 10px 12px; text-align: center; }
  .seo-hero__center > .seo-match-centre__hint { grid-column: 1 / -1; grid-row: 6; margin: 0; font-size: 11px; line-height: 1.4; text-align: center; }

  .mt-hero { padding: 18px 14px; margin-bottom: 16px; }
  .mt-hero .mt-hero__competition { margin-bottom: 14px; line-height: 1.4; }
  .mt-hero .mt-hero__teams { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; }
  .mt-hero .mt-hero__team { min-width: 0; gap: 8px; }
  .mt-hero .mt-hero__team-name { font-size: 13px; overflow-wrap: anywhere; }
  .mt-hero .mt-hero__crest { width: 44px; height: 44px; }
  .mt-hero .mt-hero__meta { gap: 8px 12px; margin-top: 14px; flex-wrap: wrap; }

  /* Consent stays explicit and readable in both DLE and custom page shells. */
  .dsn-cookie { padding: 12px 0 calc(12px + env(safe-area-inset-bottom,0px)); }
  .dsn-cookie .dsn-cookie__inner { display: flex; flex-direction: column; align-items: stretch; gap: 9px; padding: 0 14px; }
  .dsn-cookie .dsn-cookie__text { flex: none; min-width: 0; margin: 0; font-size: 12px; line-height: 1.45; }
  .dsn-cookie .dsn-cookie__btns { display: flex; width: 100%; gap: 8px; }
  .dsn-cookie .dsn-cookie__btn { flex: 1 1 0; min-height: 44px; padding: 10px 12px; font-size: 13px; }
  .dsn-cookie .dsn-cookie__btn--decline { color: #d1d5db; }
}

@media (max-width: 768px) {
  .pd-layout { grid-template-columns: minmax(0,1fr); }
  .pd-vb-grid { grid-template-columns: minmax(0,1fr); }
}

/* Keep the partner name readable even with long translated CTA labels. */
@media (max-width: 600px) {
  .seo-partner, .mt-partner { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px 12px; }
  .seo-partner > .seo-partner__logo, .mt-partner > .mt-partner__logo { grid-column: 1; grid-row: 1; }
  .seo-partner > .seo-partner__info, .mt-partner > .mt-partner__info { grid-column: 2; grid-row: 1; min-width: 0; }
  .seo-partner > .seo-partner__info:first-child, .mt-partner > .mt-partner__info:first-child { grid-column: 1 / -1; }
  .seo-partner .seo-partner__label, .seo-partner .seo-partner__name,
  .mt-partner .mt-partner__label, .mt-partner .mt-partner__name { overflow-wrap: anywhere; }
  .seo-partner > .seo-partner__link, .mt-partner > .mt-partner__link { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 44px; white-space: normal; text-align: center; }
  .seo-partner > .seo-partner__disc, .mt-partner > .mt-partner__disc { grid-column: 1 / -1; grid-row: 3; min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  .pd-page-title { font-size: 22px; }
  .seo-hero { gap: 7px; padding: 16px 12px; }
  .seo-hero .seo-hero__crest { width: 40px; height: 40px; }
  .seo-hero .seo-hero__team-name { font-size: 12px; }
  .seo-hero__center > .seo-hero__score { font-size: 28px; }
  .acc-filter-bar .acc-filter-group { flex-basis: 110px; }
}

/* Player pages use their own tab classes, alongside the shared team/match tabs. */
@media (max-width: 900px) {
  .pl-tabs { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }
  .pl-tabs .pl-tab { min-height: 44px; padding: 10px 14px; font-size: 13px; }
}

@media (max-width:900px){.dsn-bk-promo__copy{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}}
