/*
 * The schedule: a heading, sport and competition chips, then a list per day
 * under a heading that stays in view while its day scrolls past. Fixture
 * rows come from competition.css; here they gain the competition and
 * Subscribe. On phones those sit under the title.
 */

.schedule {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px var(--gutter) 64px;
}

/* Chips: rows that wrap, or on phones one row that scrolls sideways. */
.filters {
  margin: 20px calc(var(--gutter) * -1) 0;
}

.filters + .filters {
  margin-top: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 2px var(--gutter) 6px;
  list-style: none;
  scrollbar-width: thin;
}

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-chip);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 120ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

/* The same small press as buttons. */
.chip:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .chip:active {
    transform: none;
  }
}

.chip[aria-current="page"] {
  border-color: var(--button);
  background: var(--button);
  color: var(--button-ink);
}

.chips-small .chip {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
}

@media (hover: hover) {
  .chip:not([aria-current="page"]):hover {
    background: color-mix(in srgb, var(--ink) 8%, transparent);
  }
}

.schedule .fixture-list {
  margin-top: 36px;
}

/* A day's heading stays at the top while its fixtures scroll under it. */
.schedule .group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 12px;
  background: var(--bg);
  font-size: 30px;
}

.schedule .fixture-group + .fixture-group {
  margin-top: 36px;
}

.schedule .fixture {
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 260px) auto;
  gap: 4px 24px;
  align-items: center;
}

.when-clock {
  display: block;
}

.when-clock :is(.when-time, .when-allday) {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.comp-chip {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent);
}

@media (hover: hover) {
  .comp-chip:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* Subscribe as a link-weight button: one per row would be too loud filled. */
.link-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 16px/1.2 var(--font-body);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.schedule-none {
  margin-top: 36px;
  color: var(--muted);
  font-size: 18px;
}

.week-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 32px;
}

.week-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font: 700 18px/1 var(--font-display);
  letter-spacing: 0.03em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (width <= 760px) {
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .schedule .fixture {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 2px 14px;
    align-items: start;
  }

  .schedule .fixture > :is(.comp-chip, .link-button) {
    grid-column: 2;
    justify-self: start;
  }

  .when-clock :is(.when-time, .when-allday) {
    font-size: 24px;
  }

  .schedule .group-title {
    font-size: 26px;
  }
}
