/* ============================================================================
   WEST COAST ATHLETICS — schedule.css
   Page-level styles for the Class Schedule page (schedule.php template) ONLY.
   Enqueued via is_page_template('schedule.php'). No global rules here.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   SECTION 01 — Schedule Hero (compact)
   --------------------------------------------------------------------------- */
.schedule-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(27, 27, 27, 0.8) 0%,
      rgba(27, 27, 27, 0.92) 100%
    ),
    radial-gradient(
      90% 90% at 50% 0%,
      rgba(242, 217, 82, 0.2) 0%,
      transparent 55%
    ),
    url(../Images/IMG_0742.PNG) center 38% / cover no-repeat,
    var(--c-black);
  border-bottom: 1px solid var(--c-crimson-dim);
}
.schedule-hero__inner {
  max-width: 820px;
  margin-inline: auto;
  padding-block: var(--space-xl);
  text-align: center;
}
.schedule-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-crimson);
  margin-bottom: var(--space-sm);
}
.schedule-hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--c-crimson);
}
.schedule-hero h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.schedule-hero__body {
  max-width: 640px;
  margin: var(--space-md) auto 0;
}

/* ---------------------------------------------------------------------------
   SECTION 02 — Weekly Schedule (day-by-day, filterable)
   --------------------------------------------------------------------------- */
.weekly .section-head {
  margin-inline: auto;
  text-align: center;
}

/* Program filter chips */
.sched-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}
.sched-filter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-silver-lt);
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  transition:
    color var(--ease),
    border-color var(--ease),
    background var(--ease),
    transform var(--ease);
}
.sched-filter:hover,
.sched-filter:focus {
  background: transparent;
  color: var(--c-white);
  border-color: var(--c-crimson);
  transform: translateY(-1px);
}
.sched-filter.is-active {
  color: var(--c-on-accent);
  background: var(--c-crimson);
  border-color: var(--c-crimson);
}

/* Program filters + Print toolbar */
.sched-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.sched-controls .sched-filters {
  margin-bottom: 0;
}
.sched-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-crimson);
  background: transparent;
  border: 1px solid var(--c-crimson-dim);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  transition:
    color var(--ease),
    border-color var(--ease),
    transform var(--ease);
}
.sched-print:hover,
.sched-print:focus {
  background: transparent;
  color: var(--c-white);
  border-color: var(--c-crimson);
  transform: translateY(-1px);
}

/* Weekly table (day columns) */
.sched-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.sched-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--c-charcoal) !important;
  border: 0 !important;
  margin: 0 !important;
}
/* Caption is visually hidden on screen (the section heading already labels it)
   and revealed only when printing. */
.sched-table__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sched-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-white);
  background: var(--c-steel);
  padding: 14px 12px;
  text-align: center;
  border-bottom: 2px solid var(--c-crimson);
  border-right: 1px solid var(--c-border);
}
.sched-table thead th:last-child {
  border-right: 0;
}
.sched-table td {
  vertical-align: top;
  width: 14.28%;
  border: 0;
  padding: var(--space-sm);
  border-right: 1px solid var(--c-border);
}
.sched-table td:last-child {
  border-right: 0;
}
/* Column striping so uneven day lengths read as intentional columns */
.sched-table td:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Class block inside a day cell */
.sched-class {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: var(--space-sm);
  background: var(--c-black);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-crimson);
  border-radius: var(--radius-sm);
}
.sched-class:last-child {
  margin-bottom: 0;
}
.sched-class__time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1px;
  color: var(--c-crimson);
}
.sched-class__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c-white);
}
/* Class type — small crimson caption under the name */
.sched-class__type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c-crimson-lt);
}
/* Level shown as a small gold tag */
.sched-class__level {
  align-self: flex-start;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c-crimson);
  background: var(--c-crimson-dim);
  border: 1px solid rgba(242, 217, 82, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
}

/* The HTML `hidden` attribute must beat the explicit display values above —
   otherwise filtered-out classes and toggled dashes stay visible. */
.sched-class[hidden],
.sched-none[hidden] {
  display: none !important;
}

/* Empty-cell dash */
.sched-none {
  display: block;
  text-align: center;
  color: var(--c-silver);
  font-size: 20px;
  line-height: 1;
  padding: var(--space-md) 0;
}

.sched-empty {
  padding: var(--space-lg);
  text-align: center;
  color: var(--c-silver);
}

/* "All Levels Welcome" note directly under the timetable */
.sched-levels-note {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c-crimson);
}

/* Personal training windows callout */
.pt-windows {
  margin-top: var(--space-md);
  background: var(--c-charcoal);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-crimson);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
}
.pt-windows h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
}
.pt-windows__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md) var(--space-xl);
}
.pt-window__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-crimson);
  margin-bottom: var(--space-xs);
}
.pt-window__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-window__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.pt-window__list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.pt-window__day {
  color: var(--c-silver-lt);
  font-size: 14px;
}
.pt-window__time {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--c-crimson);
}

@media (max-width: 560px) {
  .pt-windows__grid {
    grid-template-columns: 1fr;
  }
}

.weekly__cta {
  text-align: center;
  margin-top: var(--space-lg);
}


@media (max-width: 767px) {
  .sched-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: auto;
    padding-bottom: 15px;
  }
}

/* ---------------------------------------------------------------------------
   SECTION 03 — Class Descriptions Quick-Reference (accordion)
   --------------------------------------------------------------------------- */
.quickref {
  background: var(--c-charcoal);
}
.quickref .section-head {
  margin-inline: auto;
  text-align: center;
}
.qr-list {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.qr-item {
  background: var(--c-black);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qr-item summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  list-style: none;
}
.qr-item summary::-webkit-details-marker {
  display: none;
}
.qr-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  color: var(--c-white);
  letter-spacing: 0.5px;
  flex: 1;
}
.qr-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-crimson);
  background: var(--c-crimson-dim);
  border: 1px solid rgba(242, 217, 82, 0.3);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  white-space: nowrap;
}
.qr-chevron {
  color: var(--c-crimson);
  transition: transform var(--ease);
}
.qr-item[open] .qr-chevron {
  transform: rotate(180deg);
}
.qr-body {
  padding: 0 var(--space-lg) var(--space-lg);
}
.qr-body p {
  color: var(--c-silver);
  font-size: 15px;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   SECTION 04 — Private Sessions
   --------------------------------------------------------------------------- */
.private {
  text-align: center;
  background:
    linear-gradient(
      180deg,
      rgba(242, 217, 82, 0.1) 0%,
      rgba(27, 27, 27, 0.95) 70%
    ),
    var(--c-black);
  border-block: 1px solid var(--c-crimson-dim);
}
.private__inner {
  max-width: 720px;
  margin-inline: auto;
}
.private h2 {
  margin-bottom: var(--space-md);
}
.private__body {
  margin: 0 auto var(--space-lg);
  max-width: 600px;
}
.private__contact {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-silver);
  margin-top: var(--space-md);
}
.private__contact a {
  color: var(--c-silver);
}
.private__contact a:hover {
  color: var(--c-crimson);
}

/* ---------------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .qr-item summary {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------------------------------------
   PRINT — the Print button triggers window.print(); this leaves only the
   weekly table on the page (landscape), ink-friendly black on white.
   --------------------------------------------------------------------------- */
@media print {
  @page {
    size: landscape;
    margin: 12mm;
  }

  /* Hide everything except the schedule table + its heading */
  .site-header,
  .site-footer,
  .schedule-hero,
  .sched-locations,
  .sched-controls,
  .pt-windows,
  .weekly__cta,
  .quickref,
  .private,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
  .weekly {
    padding: 0 !important;
  }
  .weekly .section-head .section-label,
  .weekly .section-head .body-copy {
    display: none !important;
  }
  .weekly .section-head h2 {
    color: #000 !important;
    text-align: left;
  }

  .sched-table-wrap {
    overflow: visible !important;
    border: 0 !important;
  }
  .sched-table {
    min-width: 0 !important;
    width: 100% !important;
    background: #fff !important;
  }
  .sched-table__caption {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    caption-side: top;
    text-align: left;
    color: #000 !important;
    margin-bottom: 6px;
  }
  .sched-table thead th {
    color: #000 !important;
    background: #eee !important;
    border: 1px solid #999 !important;
  }
  .sched-table td {
    border: 1px solid #999 !important;
  }
  .sched-class {
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-left: 3px solid #000 !important;
    page-break-inside: avoid;
  }
  .sched-class__time {
    color: #000 !important;
  }
  .sched-class__name {
    color: #000 !important;
  }
  .sched-class__level {
    color: #333 !important;
  }
}

/* ---------------------------------------------------------------------------
   CLASS BOOKING POPUP — opens on a class click; embeds the GHL form with the
   Selected Class / Selected Time prefilled via URL query params.
   --------------------------------------------------------------------------- */
.sched-class {
  cursor: pointer;
}
.sched-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.sched-modal[hidden] {
  display: none;
}
.sched-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.sched-modal__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--c-charcoal);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
}
.sched-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-steel);
  color: var(--c-white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.sched-modal__close:hover,
.sched-modal__close:focus {
  background: var(--c-crimson);
  color: var(--c-on-accent);
}
.sched-modal__title {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 20px;
  padding-right: 40px;
}
.sched-modal__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c-crimson);
  margin-bottom: var(--space-md);
}
.sched-modal__form iframe {
  display: block;
  width: 100%;
}
