/* SGF Schedule — Public page. Warm peach + orange, matches the festival design. */
:root {
  --bg-1: #f6eef7;
  --bg-2: #fbeadd;
  --orange: #f5852b;
  --orange-deep: #e0742a;
  --orange-soft: #f8c9a3;
  --orange-tint: #fdeadb;
  --blue: #2b53d0;
  --blue-deep: #1f3fa8;
  --ink: #4a3b33;
  --muted: #bca595;
  --card: #ffffff;
  --line: #f3d9c4;
  --focus: var(--orange);
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}
/* Decorative top rule from the design */
body::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 30;
  background: var(--orange);
}

.layout { display: grid; grid-template-columns: 150px 1fr; gap: 8px; max-width: 1240px; margin: 0 auto; padding: 24px 24px 80px; }

/* ---- Left date rail ---- */
.rail { position: sticky; top: 28px; align-self: start; display: flex; flex-direction: column; gap: 10px; }
.rail-item {
  font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1;
  color: var(--orange-soft); background: none; border: none; text-align: left; padding: 4px 0;
  cursor: pointer; transition: color .12s, transform .12s; letter-spacing: .01em;
}
.rail-item:hover { color: var(--orange); transform: translateX(2px); }
.rail-item.active { color: var(--orange); font-weight: 700; }
.rail-item .lbl { display: inline-block; }
.rail-item.active .lbl { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.rail-item .sub { display: block; font-family: var(--font-body); font-weight: 500; font-size: 11px;
  color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 7px; }
.rail-item.active .sub { color: var(--orange-deep); }

/* ---- Day header ---- */
.day-header { display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 6px 8px 22px; flex-wrap: wrap; }
.day-header h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 6vw, 54px);
  color: var(--orange); margin: 0; letter-spacing: .01em; }
.day-header .time-range { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6vw, 58px);
  color: transparent; -webkit-text-stroke: 2px var(--orange-soft); text-stroke: 2px var(--orange-soft);
  letter-spacing: .02em; white-space: nowrap; }

/* ---- Audience filter chips ---- */
.audience-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 8px 20px; }
.aud-chip { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .02em;
  padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--orange-soft); background: var(--card);
  color: var(--orange-deep); cursor: pointer; }
.aud-chip:hover { border-color: var(--orange); }
.aud-chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }

.cards { display: flex; flex-direction: column; gap: 22px; }

/* ---- Event card ---- */
.pcard { background: var(--card); border: 1.5px solid var(--line); border-radius: 20px;
  padding: 16px 18px 14px; box-shadow: 0 10px 30px rgba(224, 116, 42, .08); }
.pcard-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcard-time { font-weight: 700; color: var(--ink); font-size: 15px; }
.pcard-top .spacer { flex: 1; }
.badge-makers { display: inline-flex; align-items: center; gap: 5px; background: var(--orange);
  color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 7px 14px; border-radius: 999px; }
.btn-tickets { display: inline-flex; align-items: center; background: var(--blue); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .02em;
  padding: 8px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.btn-tickets:hover { background: var(--blue-deep); }
.btn-tickets[aria-disabled='true'] { background: var(--orange-soft); pointer-events: none; }

.pcard-title { font-family: var(--font-display); font-weight: 600; color: var(--orange);
  font-size: clamp(22px, 3vw, 30px); margin: 12px 0 2px; line-height: 1.05; text-transform: uppercase; }
.pcard-sub { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

.pcard-body { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: stretch; }
.pcard-img { border-radius: 12px; overflow: hidden; background: var(--orange-tint); aspect-ratio: 3 / 2; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-about h3 { font-family: var(--font-display); font-weight: 600; color: var(--orange-deep);
  font-size: 20px; margin: 0 0 6px; }
.pcard-about p { margin: 0; color: var(--orange-deep); opacity: .92; font-size: 15px; line-height: 1.5; }

.pcard-foot { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px;
  border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.pcard-foot .cell { display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 10px; color: var(--orange-deep); font-weight: 600; font-size: 14px; letter-spacing: .02em;
  text-align: center; }
.pcard-foot .cell + .cell { border-left: 1.5px solid var(--line); }
.pcard-foot .ico { font-size: 15px; }

.empty-public { text-align: center; color: var(--orange-deep); padding: 70px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: var(--card); border: 1.5px dashed var(--line); border-radius: 20px; }
.empty-public p { margin: 0; font-size: 18px; font-weight: 500; }
.btn-notify { display: inline-flex; align-items: center; background: var(--orange); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .02em;
  padding: 10px 22px; border-radius: 999px; text-decoration: none; }
.btn-notify:hover { background: var(--orange-deep); }
.loading-public { text-align: center; color: var(--orange-deep); padding: 80px 20px; }

/* Sample/preview banner — only shown when the page is opened with ?data=sample */
.sample-banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  background: #2a2a33; color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); border: 1.5px solid var(--orange); }
.sample-banner a { color: var(--orange); text-decoration: underline; white-space: nowrap; }
.sample-banner a:hover { color: #fff; }
/* Push the page down so the fixed banner never covers the day picker / header. */
body.sample-active .layout { padding-top: 64px; }

/* Brand badge (bottom-left) + venue map link (bottom-right) */
.brand-badge { position: fixed; left: 16px; bottom: 16px; z-index: 25;
  display: inline-flex; align-items: center; gap: 8px; background: #2a2a33; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); text-decoration: none; }
.brand-badge .dot { color: var(--orange); }
.map-badge { left: auto; right: 16px; background: var(--orange); }
.map-badge:hover { background: var(--orange-deep); }

/* Mobile day picker — hidden on desktop/tablet, shown in place of the rail
   below the phone breakpoint (see the 600px query). */
.mobile-day-picker { display: none; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; padding: 20px 16px 90px; }
  .rail { position: static; flex-direction: row; overflow-x: auto; gap: 16px; padding-bottom: 8px; }
  .rail-item { font-size: 22px; white-space: nowrap; }
  .rail-item .sub { display: inline; margin: 0 0 0 6px; }
  .pcard-body { grid-template-columns: 1fr; }
  .pcard-img { max-width: 100%; }
}

/* Phone-sized viewports: swap the horizontal-scroll rail for a single dropdown. */
@media (max-width: 600px) {
  .rail { display: none; }
  .mobile-day-picker { display: block; margin-bottom: 16px; }
  .mobile-day-picker select {
    width: 100%; font-family: var(--font-display); font-weight: 600; font-size: 18px;
    color: var(--orange-deep); background-color: var(--card); border: 2px solid var(--orange-soft);
    border-radius: 14px; padding: 12px 40px 12px 16px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23e0742a' d='M5 7l5 6 5-6z'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  }
  .mobile-day-picker select:focus { outline: 2px solid var(--orange); outline-offset: 2px; }
}
