/* =========================================================
   STADIUM DAYLIGHT — Fixtures page (/fixtures) styles
   Match-card styling lives in match_card.css.
   Tokens: tokens.css. Conventions: BEM, mobile-first.
   ========================================================= */

.fixtures-page {
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.fixtures-page__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.fixtures-page__heading {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "SOFT" 100, "opsz" 96;
}

/* ----- Filter form ------------------------------------------ */

/* On phones the filter form is collapsed behind a toggle to reclaim
   vertical space; the summary is the only thing shown until tapped.
   On wider screens the summary is hidden and the form is force-shown
   (see the min-width media query below). */
/* Period window control (Aankomend / Eerder / Alle): a full-width segmented
   pill on phones, natural width on wider screens. The active segment is filled
   with the pitch accent. */
.fixtures-page__period {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  align-self: stretch;
}
.fixtures-page__period-segment {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  background: var(--surface);
  border-left: 1px solid var(--border);
}
.fixtures-page__period-segment:first-child { border-left: 0; }
.fixtures-page__period-segment:hover { background: var(--border-soft); }
.fixtures-page__period-segment:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px; /* keep the ring inside; the container clips overflow */
}
/* Active segment mirrors btn-primary (dark fill, chalk text) for a legible,
   on-brand selected state. The :hover override keeps it filled — without it the
   higher-specificity base :hover would wash the fill to near-white under the
   chalk text. */
.fixtures-page__period-segment--active,
.fixtures-page__period-segment--active:hover {
  background: var(--ink);
  color: var(--chalk);
}

.fixtures-page__filters-disclosure {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.fixtures-page__filters-toggle {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.fixtures-page__filters-toggle::-webkit-details-marker { display: none; }
.fixtures-page__filters-toggle svg { width: 16px; height: 16px; }

/* Single-row flex layout: each filter cell flexes from a 160px base,
   the action buttons sit inline at auto width with `align-items: end`
   so the icon buttons land on the input baseline. Wraps onto multiple
   rows on narrow viewports. */
.fixtures-page__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.fixtures-page__filter {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.fixtures-page__filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.fixtures-page__filter-input,
.fixtures-page__filter-select {
  width: 100%;
  font-size: 16px;
}
.fixtures-page__filter-input--team {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 9ch;
}

.fixtures-page__actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* ----- Date groups ------------------------------------------ */

.fixtures-page__date-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.fixtures-page__date-heading {
  font-family: var(--font-display);
  font-size: clamp(16px, 3vw, 18px);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.fixtures-page__matches {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ----- Empty state ------------------------------------------ */

.fixtures-page__empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--slate);
  font-size: 14px;
}

/* ----- Wider screens ---------------------------------------- */

@media (min-width: 481px) {
  .fixtures-page { padding: var(--space-lg) var(--space-md); }

  /* Force the filter form open regardless of the <details> state: hide the
     toggle and reveal the content under both the legacy child-hiding model
     and the newer ::details-content model. */
  .fixtures-page__filters-toggle { display: none; }
  .fixtures-page__filters-disclosure > .fixtures-page__filters { display: flex; }
  .fixtures-page__filters-disclosure::details-content { content-visibility: visible; }
}
