/* ==========================================================
   schedule.css — /schedule/ (Future Live) + /past_live/ (Step 5.1A)

   Garage Print / punk gig-flyer treatment for the Schedule list.
   Loaded only on the schedule archive + the Past Live page
   (inc/enqueue.php). The information architecture, class hooks and
   STAQE data authority are unchanged — this file only restyles the
   markup emitted by:
     archive-schedule.php / page-past.php
     template-parts/schedule-toggle-nav.php
     template-parts/schedule-list.php
     template-parts/schedule-slot-line.php
   ========================================================== */

.schedule-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 60px) 24px 110px;
}

/* ---------------- page heading ---------------- */

.sched-head {
  position: relative;
  margin-bottom: 26px;
}
.sched-head .reg-mark { top: -6px; right: 0; }
.sched-head-kicker { margin: 0 0 14px; }

.sched-head-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 15vw, 168px);
  line-height: 0.78;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--paper);
}

/* ---------------- Future / Past toggle ---------------- */

.sched-toggle-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 34px;
  padding: 0;
  list-style: none;
}
.sched-toggle-nav li { margin: 0; }

.sched-toggle-nav a,
.sched-toggle-nav span {
  display: inline-block;
  font-family: var(--font-util);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 20px;
  border: 2px solid var(--line-ink);
  color: var(--paper-dim);
  background: var(--ink-2);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.sched-toggle-nav a:hover,
.sched-toggle-nav a:focus-visible {
  color: var(--paper);
  border-color: var(--paper);
  outline: none;
  transform: translateY(-1px);
}
/* the tab you are on — a stamped-in admission mark */
.sched-toggle-nav [aria-current="page"] {
  color: var(--paper);
  background: var(--red);
  border-color: var(--paper);
  border-style: solid;
  opacity: 1;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
/* no posts on the other side yet — inert, clearly not a link */
.sched-toggle-nav span:not([aria-current]) {
  opacity: 0.5;
  border-style: dashed;
}

/* ---------------- empty state ---------------- */

.sched-empty {
  font-family: var(--font-util);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey);
  border-left: 3px solid var(--red);
  padding: 12px 0 12px 16px;
}

/* ---------------- the flyer wall ---------------- */

.sched-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-top: 2px solid var(--line-ink);
  padding-top: 28px;
}

.sched-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 240px) 1fr;
  gap: 26px;
  padding: 22px;
  background: var(--ink-2);
  border: 2px solid var(--line-ink);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.5);
  /* #schedule-<ID> anchor landing: adds to html{scroll-padding-top:--header-h}
     so the fixed header never covers the targeted card. */
  scroll-margin-top: 24px;
}
/* no event photo -> the body takes the whole card */
.sched-card:not(:has(.sched-card-photo)) { grid-template-columns: 1fr; }
.sched-card.is-soldout { border-color: var(--red); }

/* pinned flyer — Garage Print frame, full-colour artwork (Step 5.1C1) */
.sched-card-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 6px;
  background: var(--ink);
  border: 1px solid var(--line-ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}
.sched-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the flyer/photo shows in its original colour on every device */
  filter: none;
}
.sched-card-photo:hover,
.sched-card-photo:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.sched-card-body { min-width: 0; }

/* SOLD OUT / status — .tag-soldout is defined in base.css (rotated stamp) */
.sched-card-body > .tag-soldout {
  margin-bottom: 12px;
}

.sched-card-date {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--red-ink);
}

.sched-card-place {
  margin: 0 0 10px;
  font-family: var(--font-util);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--paper);
}

.sched-card-title {
  margin: 0 0 14px;
  /* readable heavy body type — JA legibility, matches .article-title */
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.4;
  color: var(--paper);
}

/* time / price block — a torn-off ticket stub of facts */
.sched-card-time,
.sched-card-price,
.sched-card-time--structured,
.sched-card-price--structured,
.sched-card-timenote,
.sched-card-drink,
.sched-card-free {
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 3px solid var(--red);
  font-family: var(--font-util);
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-dim);
}
.sched-card-timenote { color: var(--grey); font-size: 12px; }
.sched-card-drink    { color: var(--grey); font-size: 12px; }

.sched-slot-label {
  font-family: var(--font-util);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red-ink);
}

.sched-card-anno,
.sched-card-other {
  margin: 10px 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.7;
  color: var(--grey);
}

.sched-card-cast {
  margin: 12px 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  color: var(--paper-dim);
}
.sched-card-cast-label {
  display: inline-block;
  font-family: var(--font-util);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red-ink);
  margin-right: 8px;
}

/*
 * cf_time / cf_price / cf_anno / cf_free / cf_cast / cf_other legacy values can
 * carry black inline colour from the old WYSIWYG. Force inheritance so they stay
 * readable on the ink ground (PHP does not rewrite the HTML). Kept from the
 * pre-5.1 archive.css rule.
 */
.sched-card-time *,
.sched-card-price *,
.sched-card-anno *,
.sched-card-free *,
.sched-card-cast *,
.sched-card-other * {
  color: inherit !important;
}

/* image galleries (cf_images + released extra images) */
.sched-card-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.sched-card-gallery-thumb {
  display: block;
  width: 72px;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 4px;
  background: var(--ink);
  border: 1px solid var(--line-ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}
.sched-card-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;   /* full-colour, matching the main flyer */
}
.sched-card-gallery-thumb:hover,
.sched-card-gallery-thumb:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ticket / playguide area */
.sched-card-reserve {
  margin: 16px 0 0;
}
.sched-card-playguides {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.btn-playguide {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 16px;
}
.btn-playguide-note {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
  opacity: 0.72;
}

/* ---------------- lightbox ---------------- */

.sched-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(9, 8, 7, 0.92);
}
.sched-modal.is-open { display: flex; }
.sched-modal-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 3px solid var(--paper);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
}
.sched-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  background: var(--ink);
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sched-modal-close:hover { background: var(--red); }
body.sched-modal-open { overflow: hidden; }

/* ---------------- responsive ---------------- */

@media (max-width: 760px) {
  .sched-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
  }
  .sched-card-photo { max-width: 320px; }
}

@media (max-width: 700px) {
  /* the modal is disabled below 700px (schedule-modal.js) — show images inline */
  .sched-card-photo,
  .sched-card-gallery-thumb {
    aspect-ratio: auto;
    width: 100%;
    height: auto;
    cursor: default;
  }
  .sched-card-gallery-thumb { width: 110px; }
  .sched-card-photo img,
  .sched-card-gallery-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 600px) {
  .schedule-wrap { padding: calc(var(--header-h) + 40px) 16px 80px; }
  .sched-list { gap: 22px; }
}
