/* ---------- Competition overview: the matchday on the turf ----------
   Shared by the web app and the public site: the facts, the table with each
   team's form, one round of fixtures to step through and the season leaders,
   on the dark chrome panels of the stage. */

.pitch-site .stage__main:has(.competition-matchday) .stage__overlay {
  margin-bottom: 0;
}

.pitch-site .competition-matchday {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: auto;
  margin-inline: auto;
  max-width: 84rem;
  min-width: 0;
  pointer-events: auto;
  width: 100%;
}

.pitch-site .competition-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.pitch-site .competition-facts__chip {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  color: var(--ps-cream);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  white-space: nowrap;
}

.pitch-site .competition-matchday__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.pitch-site .competition-matchday__panel {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 12px;
  box-shadow: var(--ps-chrome-shadow);
  color: var(--ps-cream);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px 10px;
}

.pitch-site .competition-matchday__head {
  align-items: center;
  border-bottom: 1px solid rgb(255 251 240 / 0.14);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 26px;
  padding-bottom: 8px;
}

.pitch-site .competition-matchday__label {
  align-items: baseline;
  color: var(--ps-yellow);
  display: flex;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  gap: 8px;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.pitch-site .competition-matchday__label-link {
  color: inherit;
  text-decoration: none;
}

.pitch-site .competition-matchday__label-link:hover {
  text-decoration: underline;
}

.pitch-site .competition-matchday__table .competition-table + .competition-matchday__head {
  margin-top: 16px;
}

/* A tournament's bracket, re-inked for the dark panel. */
.pitch-site .competition-matchday__table .bracket,
.pitch-site .competition-matchday__table .tie-rounds {
  --color-border-subtle: rgb(255 251 240 / 0.14);
  --color-ink-medium: var(--ps-cream-soft);
  --color-surface-2: rgb(255 251 240 / 0.05);
  color: var(--ps-cream);
}

.pitch-site .competition-matchday__count {
  color: var(--ps-cream-soft);
}

.pitch-site .competition-matchday__foot {
  display: flex;
  justify-content: flex-end;
}

.pitch-site .competition-matchday__more {
  border-bottom: 1px solid rgb(255 251 240 / 0.35);
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.pitch-site .competition-matchday__more:hover {
  border-bottom-color: var(--ps-yellow);
  color: var(--ps-yellow);
}

.pitch-site .competition-matchday__empty {
  color: var(--ps-cream-soft);
  margin: 0;
}

/* The table: position, team, played, goal difference, points and form. */

.pitch-site .competition-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.pitch-site .competition-table th {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0 5px 6px;
  text-align: start;
  text-transform: uppercase;
}

.pitch-site .competition-table td {
  border-top: 1px solid rgb(255 251 240 / 0.07);
  padding: 3px 5px;
}

.pitch-site .competition-table tbody tr:hover td {
  background: rgb(255 251 240 / 0.05);
}

.pitch-site .competition-table .competition-table__pos {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  text-align: end;
  width: 1.5rem;
}

.pitch-site .competition-table__team {
  max-width: 0;
  width: 100%;
}

.pitch-site .competition-table__team-link {
  align-items: center;
  color: var(--ps-cream);
  display: flex;
  font-weight: 600;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.pitch-site .competition-table__team-link:hover {
  color: var(--ps-yellow);
}

.pitch-site .competition-table__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-site .competition-table .competition-table__num {
  color: var(--ps-cream-soft);
  font-variant-numeric: tabular-nums;
  text-align: end;
  white-space: nowrap;
}

.pitch-site .competition-table .competition-table__points {
  color: var(--ps-cream);
  font-weight: 700;
}

.pitch-site .competition-table .competition-table__form {
  padding-inline-start: 12px;
  white-space: nowrap;
}

.pitch-site .competition-form {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.pitch-site .competition-form .form-result {
  color: var(--ps-cream);
  font-size: 10px;
  height: 18px;
  min-inline-size: 18px;
  text-decoration: none;
}

.pitch-site .competition-form .form-result--d {
  background-color: rgb(255 251 240 / 0.26);
}

.pitch-site .competition-form .form-result:hover {
  outline: 2px solid var(--ps-yellow);
  outline-offset: 1px;
}

/* Before the first result the table is a list of who takes part. */

.pitch-site .competition-crests {
  display: grid;
  gap: 4px 14px;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  margin: 0;
  padding: 0;
}

.pitch-site .competition-crests__team {
  align-items: center;
  border-radius: 8px;
  color: var(--ps-cream);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px;
  text-decoration: none;
}

.pitch-site .competition-crests__team:hover {
  background: rgb(255 251 240 / 0.08);
  color: var(--ps-yellow);
}

.pitch-site .competition-crests__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One round of fixtures, swapped in place by the arrows beside its title. */

.pitch-site .competition-round {
  display: block;
}

.pitch-site .competition-round[busy] .competition-matchday__panel {
  opacity: 0.6;
  transition: opacity 0.15s ease 0.1s;
}

.pitch-site .competition-round__title {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.pitch-site .competition-round__current {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pitch-site .competition-round__steps {
  display: flex;
  gap: 6px;
}

.pitch-site .competition-round__step {
  align-items: center;
  border: 1.5px solid rgb(255 251 240 / 0.32);
  border-radius: 6px;
  color: var(--ps-cream);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.pitch-site .competition-round__step svg {
  fill: none;
  height: 12px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 12px;
}

.pitch-site a.competition-round__step:hover {
  border-color: var(--ps-yellow);
  color: var(--ps-yellow);
}

.pitch-site .competition-round__step[aria-disabled="true"] {
  opacity: 0.3;
}

.pitch-site .competition-round .schedule-day {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pitch-site .competition-round .fixture {
  color: var(--ps-cream);
  font-size: 13px;
  gap: 8px;
  padding: 5px 6px;
}

.pitch-site .competition-round .fixture:hover {
  background: rgb(255 251 240 / 0.08);
  color: var(--ps-yellow);
}

.pitch-site .competition-round .fixture__time {
  color: var(--ps-cream-soft);
  font-size: 11.5px;
}

.pitch-site .competition-round .fixture__score {
  color: var(--ps-yellow);
  min-width: 2.5rem;
}

.pitch-site .competition-round .fixture__status {
  display: none;
}

/* The season leaders, side by side in one strip. */

.pitch-site .competition-leaders {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin: 0;
  padding: 0;
}

.pitch-site .competition-leaders__item {
  background: rgb(255 251 240 / 0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
}

.pitch-site .competition-leaders__label {
  color: var(--ps-cream-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pitch-site a.competition-leaders__label:hover {
  color: var(--ps-yellow);
}

.pitch-site .competition-leaders__line {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.pitch-site .competition-leaders__player {
  align-items: center;
  color: var(--ps-cream);
  display: flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.pitch-site .competition-leaders__player:hover {
  color: var(--ps-yellow);
}

.pitch-site .competition-leaders__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-site .competition-leaders__value {
  color: var(--ps-yellow);
  flex: none;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* On the public site: the trail back and the other competitions in the country. */

.pitch-site .competition-matchday .breadcrumbs__link,
.pitch-site .competition-matchday .breadcrumbs__item + .breadcrumbs__item::before {
  color: var(--ps-cream-soft);
}

.pitch-site .competition-matchday .breadcrumbs__link:hover {
  color: var(--ps-yellow);
}

.pitch-site .competition-matchday .breadcrumbs__current {
  color: var(--ps-cream);
}

.pitch-site .competition-related {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pitch-site .competition-related__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.pitch-site .competition-related__link {
  backdrop-filter: blur(6px);
  background: var(--ps-chrome);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  color: var(--ps-cream);
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  text-decoration: none;
}

.pitch-site .competition-related__link:hover {
  border-color: var(--ps-yellow);
  color: var(--ps-yellow);
}

@media (min-width: 40.001rem) {
  .pitch-site .competition-round .fixture {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

@media (min-width: 64rem) {
  .pitch-site .competition-matchday__grid {
    align-items: start;
    grid-template-areas: "table" "leaders";
  }

  .pitch-site .competition-matchday__grid--with-round {
    grid-template-areas: "table round" "leaders leaders";
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
  }

  .pitch-site .competition-matchday__round {
    grid-area: round;
  }

  .pitch-site .competition-matchday__table {
    grid-area: table;
  }

  .pitch-site .competition-matchday__leaders {
    grid-area: leaders;
  }
}

/* With room for three columns the leaders stand beside the round rather
   than below the table, so a wide screen sees the whole matchday at once. */
@media (min-width: 110rem) {
  .pitch-site .competition-matchday__grid--with-round {
    grid-template-areas: "table round leaders";
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem) minmax(15rem, 17rem);
  }

  .pitch-site .competition-matchday__grid--with-round .competition-leaders {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On the full stage the overview scrolls inside the stage, clear of the view
   links in the top-left corner on both sides so it stays under the title. */
@media (min-width: 75rem) {
  .pitch-site .competition-matchday {
    flex: 0 1 auto;
    max-width: min(84rem, calc(100% - 2 * clamp(190px, 16vw, 290px)));
    min-height: 0;
    overflow-y: auto;
    padding: 0 8px 8px 0;
    scrollbar-width: thin;
  }
}

@media (max-width: 30rem) {
  .pitch-site .competition-form .form-result:nth-child(n + 4) {
    display: none;
  }

  .pitch-site .competition-table th:nth-child(3),
  .pitch-site .competition-table td:nth-child(3) {
    display: none;
  }
}
