/* Phone-specific layout fixes kept separate from the mirrored theme. */
@media (max-width: 575.98px) {
  section[aria-labelledby="sukan-h2"] .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  section[aria-labelledby="sukan-h2"] table,
  section[aria-labelledby="sukan-h2"] .table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  section[aria-labelledby="sukan-h2"] thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  section[aria-labelledby="sukan-h2"] tbody,
  section[aria-labelledby="sukan-h2"] tr,
  section[aria-labelledby="sukan-h2"] td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  section[aria-labelledby="sukan-h2"] tbody tr {
    margin: 0 0 1rem !important;
    padding: .75rem 1rem !important;
    border: 1px solid rgb(14 163 236 / .28) !important;
    border-radius: .9rem !important;
    background: #f8f9fa !important;
    color: #1d262a !important;
    box-shadow: 0 8px 22px rgb(0 0 0 / .14);
  }

  section[aria-labelledby="sukan-h2"] tbody td {
    padding: .55rem 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgb(29 38 42 / .12) !important;
    color: #1d262a !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  section[aria-labelledby="sukan-h2"] tbody td:last-child {
    border-bottom: 0 !important;
  }

  section[aria-labelledby="sukan-h2"] tbody td::before {
    display: block;
    margin-bottom: .2rem;
    color: #1b728e;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  section[aria-labelledby="sukan-h2"] tbody td:nth-child(1)::before {
    content: "League / Tournament";
  }

  section[aria-labelledby="sukan-h2"] tbody td:nth-child(2)::before {
    content: "Period / Season";
  }

  section[aria-labelledby="sukan-h2"] tbody td:nth-child(3)::before {
    content: "Common Bet Types";
  }

  /* Override the mirrored theme's high-specificity table colour rules. */
  html body.surface-page main section[aria-labelledby="sukan-h2"] .table-responsive table.table tbody tr {
    background: #141a1c !important;
    color: #f8f9fa !important;
  }

  html body.surface-page main section[aria-labelledby="sukan-h2"] .table-responsive table.table tbody tr td {
    background: transparent !important;
    color: #f8f9fa !important;
    -webkit-text-fill-color: #f8f9fa !important;
    border-bottom-color: rgb(248 249 250 / .14) !important;
  }

  html body.surface-page main section[aria-labelledby="sukan-h2"] .table-responsive table.table tbody tr td::before {
    color: #5eb5e8 !important;
    -webkit-text-fill-color: #5eb5e8 !important;
  }
}

/* Editable content imagery uses one predictable 1:1 replacement slot. */
img.template-square-image {
  display: block;
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
}

figure.template-square-frame,
.image-frame.template-square-frame,
.media-frame.template-square-frame {
  display: block !important;
  width: min(100%, 800px) !important;
  aspect-ratio: 1 / 1 !important;
  margin-inline: auto !important;
  overflow: hidden !important;
}

figure.template-square-frame > img.template-square-image,
.image-frame.template-square-frame > img.template-square-image,
.media-frame.template-square-frame > img.template-square-image {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
}

@media (max-width: 575.98px) {
  .hero-image-badges {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem !important;
    width: 100%;
  }

  .hero-image-badges .badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: .5rem .35rem !important;
    font-size: .75rem !important;
    white-space: nowrap;
  }

  .page-hero > .container.hero-content,
  .hero-section > .container.hero-content {
    width: 100% !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .page-hero .row,
  .hero-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .page-hero .row > [class*="col-"],
  .hero-section .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-hero :is(h1, h2, p, ul),
  .hero-section :is(h1, h2, p, ul) {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }
}
