/* ==========================================================================
   Schedule page (events.php)
   One responsive list: "Next on the floor" panel, filters + month jump,
   month sections of date-led rows, and a Championships feature band.
   Tokens: --theme-primary (royal), --theme-lilac (sky), --theme-midnight (navy), mint #87ebcf.
   ========================================================================== */

.sched { --sched-mint: #87ebcf; --sched-gold: #f2c14e; padding-top: 8px; padding-bottom: 56px; }
.sched [hidden] { display: none !important; }

/* ---------- Shared bits ---------- */
.sched-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sched-kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sched-mint); box-shadow: 0 0 0 4px rgba(135, 235, 207, .2); }
.sched-tag { display: inline-flex; align-items: center; padding: 3px 9px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; vertical-align: middle; }
.sched-tag--live { background: var(--sched-mint); color: var(--theme-midnight); }
.sched-tag--next { margin-left: 8px; background: var(--theme-primary); color: #fff; }

/* ---------- Next on the floor ---------- */
.sched-next { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: center;
  margin: 0 0 32px; padding: 32px 36px; color: #fff;
  background: radial-gradient(700px 320px at 0% 0%, rgba(34, 152, 224, .35), transparent 60%), linear-gradient(120deg, var(--theme-midnight), #1c3a78 70%, var(--theme-primary)); }
.sched-next .sched-kicker { color: var(--sched-mint); }
.sched-next h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; color: #fff; }
.sched-next h2 span { display: block; font-family: var(--public-accent-font, Georgia, serif); font-style: italic; font-weight: 400; font-size: .62em; letter-spacing: -.01em; color: var(--sched-mint); }
.sched-next__count { margin: 10px 0 0; color: rgba(255, 255, 255, .78); font-size: 1rem; }
.sched-next__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sched-next__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 16px; padding: 14px 18px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); transition: background .15s, border-color .15s; }
.sched-next__list a:hover, .sched-next__list a:focus-visible { background: rgba(255, 255, 255, .16); border-color: rgba(135, 235, 207, .6); color: #fff; }
.sched-next__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.sched-next__meta { grid-row: 2; font-size: .88rem; color: rgba(255, 255, 255, .72); }
.sched-next__list i { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--sched-mint); font-size: 1.1rem; }
.sched-next--done { grid-template-columns: minmax(0, 1fr) auto; }
.sched-next__results { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; background: var(--sched-mint); color: var(--theme-midnight); font-weight: 700; text-decoration: none; white-space: nowrap; }
.sched-next__results:hover { background: #fff; color: var(--theme-midnight); }

/* ---------- Toolbar: filters + month jump ---------- */
.sched-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 0 0 12px; padding: 0 0 18px; border-bottom: 1px solid var(--theme-border); }
.sched-filters { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--theme-border); background: #fff; }
.sched-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 0; border-right: 1px solid var(--theme-border); background: transparent; color: var(--theme-ink); font: 600 .92rem/1 var(--font-body, sans-serif); cursor: pointer; }
.sched-filter:last-child { border-right: 0; }
.sched-filter span { min-width: 24px; padding: 3px 6px; background: var(--theme-soft); color: var(--theme-muted); font-size: .75rem; text-align: center; }
.sched-filter:hover { background: var(--theme-soft); }
.sched-filter.is-active { background: var(--theme-primary); color: #fff; }
.sched-filter.is-active span { background: rgba(255, 255, 255, .2); color: #fff; }
.sched-filter:focus-visible, .sched-jump a:focus-visible, .sched-item__link:focus-visible { outline: 3px solid var(--sched-gold); outline-offset: 2px; }
.sched-jump { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .92rem; }
.sched-jump a { padding: 6px 0; color: var(--theme-muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.sched-jump a:hover { color: var(--theme-primary); border-bottom-color: var(--theme-primary); }
.sched-jump i { color: #c99a1a; }

/* ---------- Month sections ---------- */
.sched-month, .sched-champs { scroll-margin-top: 110px; }
.sched-month { margin-top: 28px; }
.sched-month__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--theme-ink); }
.sched-month__head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; color: var(--theme-ink); }
.sched-month__head h2 span { font-family: var(--public-accent-font, Georgia, serif); font-style: italic; font-weight: 400; color: var(--theme-accent); letter-spacing: -.01em; }
.sched-month__count { margin: 0; color: var(--theme-muted); font-size: .9rem; font-weight: 600; }

/* ---------- Rows ---------- */
.sched-list { list-style: none; margin: 0; padding: 0; }
.sched-item { border-bottom: 1px solid var(--theme-border); }
.sched-item__link { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto 168px; align-items: center; gap: 22px; padding: 16px 12px 16px 0; color: var(--theme-ink); text-decoration: none; transition: background .15s; }
.sched-item__link:hover { background: rgba(var(--theme-primary-rgb), .04); color: var(--theme-ink); }
.sched-item__link:hover .sched-item__title { color: var(--theme-primary); }
.sched-item__link:hover .sched-item__cta { gap: 10px; }

.sched-date { display: grid; justify-items: center; align-content: center; min-height: 84px; padding: 8px 4px; background: #fff; border: 1px solid var(--theme-border); border-top: 4px solid var(--theme-primary); line-height: 1; }
.sched-date__dow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-muted); }
.sched-date__day { margin: 5px 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 2rem; letter-spacing: -.03em; color: var(--theme-ink); }
.sched-date__mon { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-accent); }

.sched-item__main { display: grid; gap: 6px; min-width: 0; }
.sched-item__title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; color: var(--theme-ink); transition: color .15s; overflow-wrap: anywhere; }
.sched-item__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--theme-muted); font-size: .92rem; }
.sched-item__meta .is-tba { font-style: italic; }
.sched-item__side { display: grid; justify-items: end; gap: 10px; }
.sched-type { padding: 4px 10px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; }
.sched-type--guard { color: var(--theme-primary); }
.sched-type--perc { color: #7a3fb0; }
.sched-type--full { color: var(--theme-accent); }
.sched-type--champs { color: #8a6a0c; background: #fff6dc; }
.sched-item__cta { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--theme-primary); transition: gap .15s; }

.sched-item__photo { position: relative; display: block; width: 168px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--theme-soft); }
.sched-item__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sched-item__credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: .68rem; line-height: 1.2; color: #fff;
  background: linear-gradient(transparent, rgba(19, 39, 68, .85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Next-up and past states */
.sched-item.is-next .sched-item__link { background: rgba(var(--theme-primary-rgb), .06); box-shadow: inset 4px 0 0 var(--theme-primary); padding-left: 14px; }
.sched-item.is-next .sched-date { border-top-color: var(--sched-mint); background: var(--theme-midnight); border-color: var(--theme-midnight); }
.sched-item.is-next .sched-date__day { color: #fff; }
.sched-item.is-next .sched-date__dow { color: rgba(255, 255, 255, .7); }
.sched-item.is-next .sched-date__mon { color: var(--sched-mint); }
.sched-item.is-past .sched-date { border-top-color: var(--theme-border); background: transparent; }
.sched-item.is-past :is(.sched-date__day, .sched-item__title) { color: var(--theme-muted); }
.sched-item.is-past .sched-item__photo img { filter: grayscale(.7); opacity: .75; }

/* ---------- Championships band ---------- */
.sched-champs { margin-top: 44px; padding: 28px 32px 12px; color: #fff; background: linear-gradient(135deg, var(--theme-midnight), #1c3a78); }
.sched-champs__head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.sched-champs__icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; background: var(--sched-gold); color: var(--theme-midnight); font-size: 1.6rem; }
.sched-champs .sched-kicker { margin: 0 0 4px; color: var(--sched-gold); }
.sched-champs h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; color: #fff; }
.sched-champs h2 em { font-family: var(--public-accent-font, Georgia, serif); font-weight: 400; color: var(--sched-mint); }
.sched-champs .sched-item { border-bottom-color: rgba(255, 255, 255, .14); }
.sched-champs .sched-item:last-child { border-bottom: 0; }
.sched-champs .sched-item__link { color: #fff; }
.sched-champs .sched-item__link:hover { background: rgba(255, 255, 255, .06); }
.sched-champs .sched-item__link:hover .sched-item__title { color: var(--sched-mint); }
.sched-champs .sched-date { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); border-top-color: var(--sched-gold); }
.sched-champs .sched-date__day, .sched-champs .sched-item__title { color: #fff; }
.sched-champs :is(.sched-date__dow, .sched-item__meta) { color: rgba(255, 255, 255, .72); }
.sched-champs .sched-date__mon { color: var(--sched-gold); }
.sched-champs .sched-type--champs { color: var(--theme-midnight); background: var(--sched-gold); border-color: var(--sched-gold); }
.sched-champs .sched-item__cta { color: var(--sched-mint); }

.sched-empty { margin: 32px 0; padding: 24px; text-align: center; color: var(--theme-muted); background: #fff; border: 1px dashed var(--theme-border); }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .sched-item__link { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .sched-item__photo { display: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  .sched { padding-bottom: 36px; }
  .sched-next { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; padding: 24px 20px; }
  .sched-next--done { grid-template-columns: 1fr; }
  .sched-toolbar { display: grid; gap: 12px; }
  .sched-filters { display: grid; grid-template-columns: repeat(3, auto); width: 100%; }
  .sched-filter { justify-content: center; padding: 8px 10px; font-size: .85rem; }
  .sched-jump { gap: 2px 14px; font-size: .88rem; }
  .sched-month__head h2 { font-size: 26px; }
  .sched-item__link { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 14px 4px 14px 0; }
  .sched-item.is-next .sched-item__link { padding-left: 10px; }
  .sched-date { min-height: 68px; }
  .sched-date__day { font-size: 1.6rem; margin: 3px 0 2px; }
  .sched-item__title { font-size: 1.05rem; }
  .sched-item__meta { font-size: .85rem; }
  .sched-item__side { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
  .sched-tag--next { margin-left: 6px; }
  .sched-champs { padding: 20px 16px 6px; margin-left: -4px; margin-right: -4px; }
  .sched-champs__icon { width: 46px; height: 46px; font-size: 1.3rem; }
}
