/* The Matches homepage also uses this footer, before any table mode is selected. */
body:not(:has(#modeButtons [data-mode="handicaps"].selected):has(#handicapTable.handicap-table)) .site-footer .ppg-note,
body:has([data-bt-next-home="matches"].selected) .site-footer .ppg-note {
  display: none !important;
}

/* Reserve a price and a badge line even when the selected bookmaker has no quote. */
:is(#handicapTable.standard-table, .split-phase-table, .cup-league-table)
  :is(th, td):is(.outright-team-odds, .cup-table-odds) {
  --standings-odds-badge-height: 13px;
  --standings-odds-badge-gap: 2px;
}

#bt-uefa-section :is(.cup-standings, .cup-table-controls ~ .cup-league-table) .cup-table-odds {
  width: clamp(74px, 14%, 122px);
  box-sizing: border-box;
}

#bt-uefa-section :is(.cup-standings, .cup-player-controls + .cup-table-wrap .cup-league-table, .cup-table-controls ~ .cup-league-table)
  .cup-odds-price {
  display: flex;
  min-block-size: calc(1lh + var(--standings-odds-badge-gap) + var(--standings-odds-badge-height));
  contain: inline-size;
}

#bt-uefa-section :is(.cup-standings, .cup-player-controls + .cup-table-wrap .cup-league-table, .cup-table-controls ~ .cup-league-table)
  .cup-player-price-books {
  block-size: var(--standings-odds-badge-height);
}

/* A bookmaker may also supply a different player field in Full Market.
   Give the header the same column widths regardless of that field. */
#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table {
  table-layout: fixed;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th {
  box-sizing: border-box;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:first-child {
  width: 6%;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:nth-child(2) {
  width: 32%;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:nth-child(4) {
  width: 4%;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table
  thead th:is(.cup-table-wide, :nth-last-child(4)) {
  width: 7%;
}

#bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th.cup-table-odds {
  width: 84px;
}

#tableContainer.player-odds-mode #handicapTable.top-scorer-table
  :is(.player-odds-price-cell, .outright-player-odds) {
  --player-odds-badge-height: 11px;
}

#tableContainer.player-odds-mode #handicapTable.top-scorer-table td:is(.player-odds-price-cell, .outright-player-odds)
  :is(.player-odds-price, .player-odds-sus, .player-odds-unavailable, .outright-odds-price) {
  display: block;
  line-height: 1.05;
  min-block-size: 14px;
  contain: inline-size;
}

#tableContainer.player-odds-mode #handicapTable.top-scorer-table td:is(.player-odds-price-cell, .outright-player-odds)
  :is(.player-odds-best-provider-logos, .outright-odds-provider-logos, .outright-odds-book) {
  block-size: var(--player-odds-badge-height);
  min-block-size: var(--player-odds-badge-height);
  margin-block-start: 2px;
  flex-wrap: nowrap;
  contain: inline-size;
}

#tableContainer.player-odds-mode #handicapTable.top-scorer-table
  td:is(.player-odds-price-cell, .outright-player-odds)
  :is(.player-odds-best-provider-logos, .outright-odds-provider-logos) img {
  flex-shrink: 0;
}

#tableContainer.player-odds-mode #handicapTable.top-scorer-table
  td:is(.player-odds-price-cell, .outright-player-odds):not(:has(
    .player-odds-best-provider-logos, .outright-odds-provider-logos, .outright-odds-book
  ))::after {
  content: "";
  display: block;
  block-size: var(--player-odds-badge-height);
  margin-block-start: 2px;
}

:is(#handicapTable.standard-table, .split-phase-table) td.outright-team-odds
  :is(.outright-odds-price, .outright-odds-provider-logos, .outright-odds-book) {
  contain: inline-size;
}

:is(#handicapTable.standard-table, .split-phase-table) td.outright-team-odds
  .outright-odds-price {
  min-block-size: 14px;
}

:is(#handicapTable.standard-table, .split-phase-table) td.outright-team-odds
  :is(.outright-odds-provider-logos, .outright-odds-book) {
  block-size: var(--standings-odds-badge-height);
  min-block-size: var(--standings-odds-badge-height);
  margin-block-start: var(--standings-odds-badge-gap);
  flex-wrap: nowrap;
}

:is(#handicapTable.standard-table, .split-phase-table)
  td.outright-team-odds:not(:has(.outright-odds-provider-logos, .outright-odds-book))::after {
  content: "";
  display: block;
  block-size: var(--standings-odds-badge-height);
  margin-block-start: var(--standings-odds-badge-gap);
}

@media (max-width: 700px) {
  #bt-uefa-section :is(.cup-standings, .cup-table-controls ~ .cup-league-table) .cup-table-odds {
    width: 58px;
  }

  #tableContainer.player-odds-mode #handicapTable.top-scorer-table
    :is(.player-odds-price-cell, .outright-player-odds) {
    --player-odds-badge-height: 9px;
    min-inline-size: 56px;
  }
}

@media (max-width: 480px) {
  #bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:first-child {
    width: 10%;
  }

  #bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:nth-child(4) {
    width: 6%;
  }

  #bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th:nth-last-child(4) {
    width: 12%;
  }

  #bt-uefa-section .cup-player-controls + .cup-table-wrap .cup-league-table thead th.cup-table-odds {
    width: 60px;
  }
}
