/* Reserve a real toolbar track; absolute icons overlapped the final odds label. */
.layout_main_center .play-match-league .tr-match-head > .media-position-icon {
  position: static;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  box-sizing: border-box;
  padding: 0 4px;
  align-self: stretch;
  justify-content: flex-end;
}

/* The captured template already contains an empty 44px toolbar placeholder. */
.layout_main_center .play-match-league .tr-match-head > .relative-position:empty:has(+ .media-position-icon) {
  display: none;
}

.layout_main_center .play-match-league .tr-match-head > .play-name {
  min-width: 0;
}

/* Captured fixed odds widths must leave room for the visible media toolbar. */
@media (min-width: 901px) {
  .layout_main_center .c-match-item > .col,
  .layout_main_center .c-match-item .match-handicap {
    min-width: 0;
  }
  .layout_main_center .c-match-item .handicap-wrap {
    width: 100%;
    min-width: 0;
  }
  .layout_main_center .c-match-item .handicap-col {
    flex: 1 1 0;
    min-width: 0;
  }
  .layout_main_center .c-match-item > .media-col {
    flex: 0 0 32px;
    width: 32px !important;
    min-width: 32px !important;
  }

  /* Reference layout: league title, then a separate 24px market heading row. */
  .layout_main_center .match-list-card.tid_title_num:has(.play-name > .bet-col0) {
    height: 58px !important;
    max-height: 58px !important;
  }
  .layout_main_center .match-list-card.tid_title_num:has(.play-name > .bet-col0) > .list-card-inner {
    height: 58px;
  }
  .layout_main_center .play-match-league .tr-match-head:has(> .play-name > .bet-col0) {
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr) 32px;
    grid-template-rows: 34px 24px;
    height: 58px;
    align-items: center;
    border: 0;
    box-shadow: inset 0 1px #fff, inset 0 -1px #dee4f2;
  }
  .layout_main_center .play-match-league:has(.play-name > .bet-col0) {
    height: 58px;
  }
  .layout_main_center .play-match-league .tr-match-head:has(> .play-name > .bet-col0) > .leagues-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    width: calc(100% - 65px) !important;
    min-width: 0;
  }
  .layout_main_center .play-match-league .tr-match-head:has(> .play-name > .bet-col0) > .media-position-icon {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 65px;
    min-width: 65px;
  }
  .layout_main_center .play-match-league .tr-match-head > .play-name:has(> .bet-col0) {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr) minmax(0, 1.125fr) minmax(0, 1.25fr));
    gap: 4px;
    width: 100%;
    height: 24px;
    padding: 0 4px 0 0;
    line-height: 24px;
    box-sizing: border-box;
  }
  .layout_main_center .play-match-league .play-name > [class*="bet-col"] {
    width: 100% !important;
    min-width: 0;
    font-size: 12px;
    text-align: center;
  }

  body.body--light .layout_main_center .play-match-league .tr-match-head:has(> .play-name > .bet-col0) {
    background: linear-gradient(to bottom, #f6f9ff 0 33px, #dee4f2 33px 34px, #f0f6ff 34px 58px) !important;
  }

  /* A folded league has no market labels: collapse all four height owners. */
  .layout_main_center .match-list-card.tid_title_num:has(.leagues-wrap[aria-expanded="false"]),
  .layout_main_center .match-list-card.tid_title_num:has(.leagues-wrap[aria-expanded="false"]) > .list-card-inner,
  .layout_main_center .play-match-league:has(.leagues-wrap[aria-expanded="false"]),
  .layout_main_center .play-match-league .tr-match-head:has(> .leagues-wrap[aria-expanded="false"]) {
    height: 34px !important;
    max-height: 34px !important;
  }
  .layout_main_center .play-match-league .tr-match-head:has(> .leagues-wrap[aria-expanded="false"]) {
    grid-template-rows: 34px;
  }
  .layout_main_center .play-match-league .tr-match-head:has(> .leagues-wrap[aria-expanded="false"]) > .play-name {
    display: none;
  }
  body.body--light .layout_main_center .play-match-league .tr-match-head:has(> .leagues-wrap[aria-expanded="false"]) {
    background: #f6f9ff !important;
  }

  /* Share precisely the same team, six market and media tracks with the header. */
  .layout_main_center .c-match-item .match-handicap-item > .basic-col {
    width: 212px !important;
    min-width: 212px;
    flex: 0 0 212px;
  }
  .layout_main_center .c-match-item .match-handicap > .handicap-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr) minmax(0, 1.125fr) minmax(0, 1.25fr));
    gap: 4px;
    padding: 0 4px 0 0;
    box-sizing: border-box;
  }
  .layout_main_center .c-match-item .handicap-col > .bet-item-wrap {
    width: 100% !important;
    padding: 2px 0;
    box-sizing: border-box;
  }
  .layout_main_center .c-match-item .handicap-col > .bet-item-wrap:first-child {
    padding-top: 8px;
  }
  .layout_main_center .c-match-item .handicap-col > .bet-item-wrap:last-child {
    padding-bottom: 8px;
  }
  .layout_main_center .c-match-item .handicap-col > .bet-item-wrap > .c-bet-item.empty {
    height: 32px;
  }
  .layout_main_center .c-match-item .handicap-col > .bet-item-wrap > .c-bet-item {
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
    box-sizing: border-box;
  }
  .layout_main_center .c-match-item .team-item > .team-logo-wrap {
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 18px;
    padding: 0 8px 0 0;
    box-sizing: border-box;
    justify-content: center;
  }
  .layout_main_center .c-match-item .team-logo-wrap > .team-icon {
    flex: 0 0 18px;
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    margin: 0 !important;
    object-fit: contain;
  }
  .layout_main_center .ref-extra-score-board {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: 208px repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 0 36px 8px 0;
  }
  .layout_main_center .ref-extra-score-board .ref-extra-team {
    padding-left: 38px;
  }
  body.body--light .layout_main_center .c-match-item .handicap-col:nth-child(-n + 3) > .bet-item-wrap > .c-bet-item:not(.up):not(.down):not(.active) {
    background-color: #fafcff;
  }
  body.body--light .layout_main_center .c-match-item .handicap-col:nth-child(n + 4) > .bet-item-wrap > .c-bet-item:not(.up):not(.down):not(.active) {
    background-color: #eff8ff;
  }
}

/* Correct-score headings and quotes follow the reference's six main tracks. */
@media (min-width: 901px) {
  .layout_main_center .ref-extra-score-board {
    grid-template-columns: 208px repeat(2, minmax(0, 1fr));
    column-gap: 4px;
  }
  .layout_main_center .ref-extra-score-period {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.125fr) minmax(0, 1.25fr);
    column-gap: 4px;
  }
  .layout_main_center .ref-extra-score-column {
    grid-template-rows: 24px;
    grid-auto-rows: 34px;
    row-gap: 8px;
  }
  .layout_main_center .ref-extra-score-column > .ref-extra-heading {
    display: block;
    height: 24px;
    min-height: 24px;
    padding: 0 2px;
    line-height: 24px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
  .layout_main_center .ref-extra-score-board > .ref-extra-teams > .ref-extra-heading {
    height: 24px;
    margin-bottom: 8px;
  }
  .layout_main_center .ref-extra-score-board .ref-extra-team {
    padding-left: 32px;
    min-height: 42px;
    font-size: 12px;
    color: inherit;
  }
  .layout_main_center .ref-extra-score-board .ref-extra-cell {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
  }
  .layout_main_center .ref-extra-score-other {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.125fr) minmax(0, 1.25fr);
    margin-top: 8px;
  }
}
