/* The filter bar over the match centre: when, whose, which competition and
   which team, in one row that wraps on a phone. Every control is the same
   38px tall, so the row reads as one bar. */

.pitch-site--app .match-filters {
  --match-filters-height: 38px;

  align-items: center;
  border-bottom: 2px solid var(--ps-ink);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
}

.pitch-site--app .match-filters__segment {
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  box-sizing: border-box;
  display: inline-flex;
  flex-shrink: 0;
  height: var(--match-filters-height);
  padding: 2px;
}

.pitch-site--app .match-filters__option {
  border-radius: 999px;
  color: var(--ps-ink);
  align-items: center;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 600;
  justify-content: center;
  padding-inline: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.pitch-site--app .match-filters__option:hover {
  background: var(--ps-paper-deep);
}

.pitch-site--app .match-filters__option[aria-current] {
  background: var(--ps-ink);
  color: var(--ps-cream);
}

.pitch-site--app .match-filters__field {
  align-items: center;
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  box-sizing: border-box;
  display: flex;
  gap: 8px;
  height: var(--match-filters-height);
  padding-inline: 14px;
}

.pitch-site--app .match-filters__field:focus-within {
  border-color: var(--theme-primary);
}

.pitch-site--app .match-filters__field:has(:focus-visible) {
  outline: var(--focus-ring-size) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.pitch-site--app .match-filters__field--select {
  flex: 0 1 15rem;
  min-width: 11rem;
  padding-inline-end: 6px;
}

.pitch-site--app .match-filters__field--search {
  flex: 1 1 14rem;
}

.pitch-site--app .match-filters__select,
.pitch-site--app .match-filters__select:focus,
.pitch-site--app .match-filters__input,
.pitch-site--app .match-filters__input:focus {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ps-ink);
  font: inherit;
  font-size: 14px;
  min-height: 0;
  min-width: 0;
  outline: none;
  padding: 0;
  width: 100%;
}

.pitch-site--app .match-filters__select {
  cursor: pointer;
  font-weight: 600;
}

.pitch-site--app .match-filters__icon {
  color: var(--ps-ink-soft);
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.pitch-site--app .match-filters__chip {
  align-items: center;
  background: var(--ps-yellow);
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  color: var(--ps-ink);
  box-sizing: border-box;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 6px;
  height: var(--match-filters-height);
  padding-inline: 12px;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .pitch-site--app .match-filters__segment {
    flex: 1 1 auto;
  }

  .pitch-site--app .match-filters__option {
    flex: 1;
    text-align: center;
  }

  .pitch-site--app .match-filters__field--select,
  .pitch-site--app .match-filters__field--search {
    flex: 1 1 100%;
  }
}

/* The list itself: a day at a time under a heading that stays at the top of
   the window while its matches scroll past, then a competition, then one row
   per match with the home side on the left of the score and the away side on
   its right, so every score in the list sits in the same column. */

.pitch-site--app .match-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pitch-site--app .match-day__heading {
  align-items: baseline;
  background: var(--ps-paper);
  border-bottom: 2px solid var(--ps-ink);
  display: flex;
  font-size: 18px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: -0.01em;
  margin: 0;
  padding-block: 8px 6px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.pitch-site--app .match-day__kicker {
  color: var(--ps-red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pitch-site--app .match-group__heading {
  margin: 0;
  padding-block: 14px 4px;
}

.pitch-site--app .match-group__competition {
  align-items: center;
  color: var(--ps-ink-soft);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.pitch-site--app .match-group__competition:hover {
  color: var(--ps-ink);
  text-decoration: underline;
}

.pitch-site--app .match-group__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pitch-site--app .match-group__rows > li + li {
  border-top: 1px solid var(--color-border-subtle);
}

.pitch-site--app .match-row {
  --match-row-side: 8.5rem;

  align-items: center;
  border-radius: 6px;
  color: var(--ps-ink);
  column-gap: 14px;
  display: grid;
  grid-template-columns: var(--match-row-side) minmax(0, 1fr) 4.25rem minmax(0, 1fr) var(--match-row-side);
  min-height: 46px;
  padding: 6px 8px;
  text-decoration: none;
}

.pitch-site--app .match-row:hover {
  background: var(--ps-paper-deep);
  color: var(--ps-ink);
}

.pitch-site--app .match-row__when {
  color: var(--ps-ink-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pitch-site--app .match-row__team {
  align-items: center;
  display: flex;
  font-size: 15px;
  font-weight: 500;
  gap: 10px;
  min-width: 0;
}

.pitch-site--app .match-row__team--home {
  justify-content: flex-end;
  text-align: right;
}

.pitch-site--app .match-row__team .crest {
  flex-shrink: 0;
}

.pitch-site--app .match-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-site--app :is(.match-row--home-won .match-row__team--home, .match-row--away-won .match-row__team--away) {
  font-weight: 700;
}

.pitch-site--app :is(.match-row--home-won .match-row__team--away, .match-row--away-won .match-row__team--home) {
  color: var(--ps-ink-soft);
}

.pitch-site--app .match-row__score {
  background: var(--ps-ink);
  border-radius: 6px;
  color: var(--ps-cream);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  justify-self: center;
  line-height: 1;
  min-width: 3.25rem;
  padding: 7px 8px;
  text-align: center;
  white-space: nowrap;
}

.pitch-site--app .match-row__score--kickoff {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--color-border);
  color: var(--ps-ink);
  font-family: var(--font-mono);
  font-weight: 600;
}

.pitch-site--app .match-row__score--note {
  font-size: 12px;
  line-height: 1.2;
  padding-inline: 4px;
  white-space: normal;
}

.pitch-site--app .match-row--live .match-row__score {
  background: var(--ps-red);
}

.pitch-site--app .match-row:hover .match-row__score {
  background: var(--ps-yellow);
  color: var(--ps-ink);
}

.pitch-site--app .match-row__extra {
  align-items: center;
  color: var(--ps-ink-soft);
  display: flex;
  font-family: var(--font-mono);
  font-size: 12px;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.pitch-site--app .match-row__extra .form-result {
  flex-shrink: 0;
}

.pitch-site--app .match-list__more:not(:empty) {
  display: flex;
  justify-content: center;
}

.pitch-site--app .match-list__more a {
  border: 2px solid var(--ps-ink);
  border-radius: 999px;
  color: var(--ps-ink);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  text-decoration: none;
}

.pitch-site--app .match-list__more a:hover {
  background: var(--ps-paper-deep);
}

@media (max-width: 50rem) {
  .pitch-site--app .match-row {
    column-gap: 8px;
    grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem minmax(0, 1fr);
    padding-inline: 4px;
  }

  .pitch-site--app .match-row__extra {
    display: none;
  }

  .pitch-site--app .match-row__team {
    font-size: 14px;
    gap: 6px;
  }

  .pitch-site--app .match-row__score {
    font-size: 14px;
    min-width: 0;
    padding-inline: 6px;
  }
}

/* On a phone the names need the room, so the kick-off time goes and a match
   under way shows only by its red score. */
@media (max-width: 30rem) {
  .pitch-site--app .match-row {
    grid-template-columns: minmax(0, 1fr) 3.5rem minmax(0, 1fr);
  }

  .pitch-site--app .match-row__when {
    display: none;
  }
}
