/* Booking, camp registration, manage-my-booking and gallery pages.
   Uses the tokens from site.css (--bg, --ink, --gold, --line, --display, --sans, --mono). */

.app-section { padding: 0 0 120px; }
.app-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(26,22,20,.06); min-height: 520px; }
.app-aside { background: var(--dark); color: #eee6e2; padding: 32px 28px; display: grid; align-content: start; gap: 18px; position: relative; overflow: hidden; }
.app-aside::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(207,183,143,.22), transparent 70%); pointer-events: none; }
.app-aside h2 { font: 400 34px/0.95 var(--display); text-transform: uppercase; color: #faf5f5; }
.app-aside .eyebrow-sm, .app-label { font: 600 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.app-aside dl { display: grid; gap: 12px; margin: 0; }
.app-aside dt { font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #a39893; }
.app-aside dd { margin: 2px 0 0; font-weight: 600; color: #faf5f5; }
.app-aside p { color: #c9bfba; font-size: 14px; line-height: 1.6; }
.app-main { padding: 32px; min-width: 0; }
.app-main h3 { font: 400 28px/1 var(--display); text-transform: uppercase; margin-bottom: 6px; }
.app-sub { color: var(--ink-dim); margin-bottom: 22px; }

.steps { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.steps button { border: 0; background: var(--bg-2); color: var(--ink-dim); border-radius: 999px; padding: 7px 14px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.steps button[aria-current="step"] { background: var(--ink); color: var(--bg); }
.steps button:disabled { cursor: default; opacity: .55; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.choice { text-align: left; border: 1px solid var(--line-strong); background: #fff; border-radius: 12px; padding: 20px; cursor: pointer; display: grid; gap: 8px; transition: transform .2s, border-color .2s, box-shadow .2s; font: inherit; color: inherit; }
.choice:hover, .choice:focus-visible { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 14px 30px rgba(26,22,20,.08); outline: none; }
.choice.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice strong { font: 400 24px/1 var(--display); text-transform: uppercase; }
.choice .meta { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
.choice p { color: var(--ink-dim); font-size: 14px; line-height: 1.55; }
.choice .price { font-weight: 800; }
.coach-choice { grid-template-columns: 56px 1fr; align-items: center; column-gap: 14px; }
.coach-choice img, .coach-choice .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; grid-row: span 2; background: var(--bg-2); display: grid; place-items: center; font: 400 22px var(--display); color: var(--court); }
.coach-choice strong { font-size: 20px; }

.picker { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; }
.cal-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month-head strong { font: 400 22px var(--display); text-transform: uppercase; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 20px; transition: border-color .15s; }
.cal-nav:hover:not(:disabled) { border-color: var(--ink); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal-grid .dow { font: 600 10px var(--mono); letter-spacing: .12em; color: var(--ink-mute); padding: 4px 0 8px; }
.cal-grid .d { aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font-weight: 600; color: var(--ink-mute); cursor: default; position: relative; font-size: 15px; }
.cal-grid .d.has { background: var(--gold-soft); color: var(--ink); cursor: pointer; font-weight: 800; transition: background .15s, transform .15s; }
.cal-grid .d.has:hover { background: rgba(207,183,143,.38); transform: scale(1.06); }
.cal-grid .d.sel { background: var(--ink) !important; color: var(--bg); }
.cal-grid .d.today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.times { display: grid; gap: 8px; align-content: start; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.times h4 { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.time { border: 1px solid var(--gold); color: var(--ink); background: #fff; border-radius: 10px; padding: 12px; font-weight: 800; cursor: pointer; transition: background .15s, color .15s, transform .15s; display: flex; justify-content: space-between; align-items: center; }
.time:hover { background: var(--gold-soft); transform: translateX(2px); }
.time.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.time small { font: 600 10px var(--mono); letter-spacing: .06em; color: inherit; opacity: .7; }
.tz-note { font: 500 12px var(--mono); color: var(--ink-dim); margin-top: 14px; }
.empty-note { color: var(--ink-dim); font-size: 14px; padding: 12px 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.f { display: grid; gap: 6px; }
.f > span { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.f input, .f select, .f textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; font: 500 16px var(--sans); background: #fff; color: var(--ink); min-height: 48px; transition: border-color .15s, box-shadow .15s; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--court); box-shadow: 0 0 0 3px var(--gold-soft); }
.f .err { color: #a3352b; font-size: 13px; }
.f.has-err input, .f.has-err select { border-color: #a3352b; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.agree { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); cursor: pointer; }
.agree input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--ink); }
.athlete { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; position: relative; background: #fff; }
.athlete-head { display: flex; justify-content: space-between; align-items: center; }
.athlete-head strong { font: 400 20px var(--display); text-transform: uppercase; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; color: var(--ink); font-size: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.form-error { background: #f8e1de; color: #a3352b; border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.form-note { background: var(--gold-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; }

.done { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 20px 0; }
.done .check-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-size: 34px; animation: pop-in .5s cubic-bezier(.2,1.4,.4,1) both; }
.done h3 { font-size: 40px; }
.done-card { width: 100%; max-width: 520px; text-align: left; background: var(--bg); border-radius: 12px; padding: 18px 20px; display: grid; gap: 10px; }
.done-card div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 15px; }
.done-card span:first-child { font: 600 10px/1.8 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } }

.spots-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(207,183,143,.2); color: #f1e2c4; }
.spots-pill.is-low { background: rgba(232,140,80,.2); color: #f4c49a; }
.spots-pill.is-full { background: rgba(255,255,255,.1); color: #d8cfcb; }
.spots-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.camp-list { display: grid; gap: 12px; }

/* manage */
.manage-card { max-width: 720px; margin: 0 auto; }
.status-pill { display: inline-block; border-radius: 999px; padding: 5px 12px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: #e3f1e8; color: #2f7a4f; }
.status-pill.cancelled { background: #f8e1de; color: #a3352b; }
.status-pill.waitlisted, .status-pill.held { background: #f8ecd6; color: #8a5a12; }

/* gallery page */
.gallery-page { padding: 0 0 120px; }
.gallery-album { margin-bottom: 72px; }
.gallery-album-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.gallery-album-head h2 { font: 400 clamp(32px, 4vw, 52px)/1 var(--display); text-transform: uppercase; }
.gallery-album-head p { color: var(--ink-dim); flex: 1 1 280px; }
.gallery-count { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.gallery-grid { columns: 3 280px; column-gap: 14px; }
.gallery-item { break-inside: avoid; margin: 0 0 14px; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.gallery-open { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; overflow: hidden; }
.gallery-open img { width: 100%; height: auto; display: block; transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s; }
.gallery-open:hover img, .gallery-open:focus-visible img { transform: scale(1.04); filter: saturate(1.08); }
.gallery-item figcaption { padding: 10px 12px; font-size: 14px; color: var(--ink-dim); }
.gallery-empty { text-align: center; padding: 80px 20px; border: 1px dashed var(--line-strong); border-radius: 14px; display: grid; gap: 10px; justify-items: center; }
.gallery-empty h2 { font: 400 40px/1 var(--display); text-transform: uppercase; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,9,8,.94); display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 24px; animation: fade-in .2s ease-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 6px; animation: zoom-in .3s cubic-bezier(.2,.8,.2,1); }
.lightbox p { color: #ddd3cf; margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; cursor: pointer; transition: background .15s; }
.lightbox button:hover { background: rgba(207,183,143,.35); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.96); } }

/* sponsor logos (rendered by the Worker into the homepage grid) */
.sponsor.has-logo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.sponsor .sponsor-logo { max-width: 70%; max-height: 64px; width: auto; height: auto; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .85; transition: filter .3s, opacity .3s; }
.sponsor:hover .sponsor-logo { filter: none; opacity: 1; }
.camp.camp-empty .camp-date em { font-size: .9em; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-aside { padding: 24px 20px; }
  .app-aside h2 { font-size: 28px; }
  .picker { grid-template-columns: 1fr; }
  .times { max-height: none; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .times h4 { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .app-main { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .app-section { padding-bottom: 80px; }
  .done-card div { grid-template-columns: 1fr; gap: 2px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .choice, .time, .gallery-open img, .done .check-mark, .lightbox, .lightbox img, .spots-pill i { transition: none !important; animation: none !important; }
}
