/* =====================================================================
   AMM Hub - customer pages (used with Site.Master).
   Requires hub-base.css. A club can recolour its pages by setting
   --accent / --accent-ink / --accent-soft on body (Site.Master does
   this from the club's brand colour). ASCII only.
   ===================================================================== */

/* Default brand colour for the club website (red, as in the designs).
   A club's own colour (web.config AmmHubBrandColour) still overrides this,
   because the master page sets it on body. */
:root{--accent:#B3261E;--accent-ink:#FFFFFF;--accent-soft:#F8E2DF}

/* ---------- page frame ---------- */
.site{max-width:1000px;margin:0 auto;padding:20px 16px 60px}
.site-frame{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.site-nav{display:flex;align-items:center;gap:6px;padding:12px 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.club{font:700 17px var(--f-display);margin-right:auto;display:flex;gap:8px;align-items:center;text-decoration:none;color:var(--ink)}
.club i{width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--surface);display:grid;place-items:center;font-style:normal;font-size:11px;overflow:hidden;flex:none}
.club img{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none}
.site-links{display:flex;gap:4px}
.site-links a{padding:7px 11px;border-radius:7px;font-weight:600;color:var(--muted);font-size:14px;text-decoration:none;white-space:nowrap}
.site-links a:hover{color:var(--ink)}
.site-links a.on{color:var(--ink);background:var(--surface-2)}

/* standalone microsite top bar (no hub navigation) */
.ms-top{display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line)}
.ms-top .club{font-size:16px}
.ms-foot,.site-foot{padding:18px 24px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:var(--surface-2);display:flex;gap:10px;flex-wrap:wrap}
.site-foot a{color:var(--muted)}

/* ---------- headers and sections ---------- */
.hero{padding:44px 24px 26px}
.hero h1{font-size:34px;line-height:1.1;max-width:20ch;text-shadow:0 1px 8px rgba(0,0,0,.25)}
.hero p{max-width:56ch;margin-top:10px;font-size:16px;opacity:.95}
.hero .label{color:rgba(255,255,255,.85)}
.hero-top{padding:14px 24px 0;background:var(--surface)}
.sect{padding:22px 24px;border-top:1px solid var(--line)}
.prose{max-width:66ch;display:flex;flex-direction:column;gap:10px}
.ticks{list-style:none;padding:0;margin:4px 0 0;display:grid;gap:6px}
.ticks li{display:flex;gap:10px}
.ticks li::before{content:"";flex:none;width:16px;height:16px;margin-top:3px;border-radius:50%;background:var(--ink);box-shadow:inset 0 0 0 5px var(--surface)}
.step{display:flex;gap:10px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.step .no{width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--surface);display:grid;place-items:center;font:600 12px var(--f-display);flex:none}
.ended{padding:60px 24px;text-align:center}

/* ---------- listing tiles ---------- */
.ev-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.ev-tile{border:1px solid var(--line);border-radius:12px;overflow:hidden;cursor:pointer;background:var(--surface);text-align:left;padding:0;display:flex;flex-direction:column;text-decoration:none;color:var(--ink)}
.ev-tile:hover{border-color:var(--accent)}
.ev-tile .hdr{height:120px;padding:14px;display:flex;align-items:flex-end}
.ev-tile .hdr h3{font-size:18px;color:#fff}
.ev-tile .body{padding:12px 14px;display:flex;flex-direction:column;gap:4px;font-size:14px}

/* ---------- sales: book-early strip ---------- */
.early{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#111;color:#fff;padding:14px 24px;font-size:15px}
.early b{color:#fff}
.early-pct{display:inline-block;background:#fff;color:#111;font:800 13px var(--f-display);padding:3px 8px;border-radius:4px;margin-right:8px;text-transform:uppercase}
.early-left{margin-left:auto;font-family:var(--f-mono);font-size:13px;opacity:.8}

/* ---------- sales: live bookings feed ---------- */
.pulse-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px;align-items:stretch}
.pulse-stats{background:#111;color:#fff;border-radius:14px;padding:20px;display:flex;flex-direction:column;gap:10px}
.pulse-stats .muted{color:rgba(255,255,255,.72)}
.big{font:800 64px/.9 var(--f-display);font-stretch:75%;letter-spacing:-.01em}
.meter{height:10px;border-radius:5px;background:rgba(255,255,255,.18);overflow:hidden}
.meter i{display:block;height:100%;background:#fff;border-radius:5px}
.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.kpis b{display:block;font:700 24px var(--f-display);font-variant-numeric:tabular-nums}
.kpis span{font-size:12px;opacity:.75;line-height:1.3;display:block}
.live{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}
.live i{width:8px;height:8px;border-radius:50%;background:#3ddc84}
.heat{margin-left:auto;background:#fff;color:#111;font:800 12px var(--f-display);text-transform:uppercase;letter-spacing:.03em;padding:4px 9px;border-radius:4px}
.byday{display:grid;gap:6px;margin-top:4px;font-size:13px}
.byday div{display:grid;grid-template-columns:96px minmax(0,1fr) 40px;gap:10px;align-items:center}
.byday .m{height:6px;border-radius:3px;background:rgba(255,255,255,.15);overflow:hidden}
.byday .m i{display:block;height:100%;background:#fff}
.byday .mono{text-align:right;opacity:.8}
.feed{border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.feed ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.feed li{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:10px;align-items:center;font-size:14px;border-radius:8px}
.feed .who{min-width:0}
.av{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font:700 12px var(--f-display);letter-spacing:.02em;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.av.anon{background:var(--surface-2);color:var(--muted);border:1px dashed var(--line)}
.ago{font-size:12px;color:var(--muted);font-family:var(--f-mono);white-space:nowrap}
@media (prefers-reduced-motion:no-preference){
  .live i{animation:hub-ping 1.6s ease-out infinite}
  @keyframes hub-ping{0%{box-shadow:0 0 0 0 rgba(61,220,132,.65)}100%{box-shadow:0 0 0 9px rgba(61,220,132,0)}}
  .feed li.new{animation:hub-newrow 2.4s ease}
  @keyframes hub-newrow{0%{background:#fff3c4;transform:translateY(-4px)}100%{background:transparent;transform:none}}
}

/* ---------- holiday camps ---------- */
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;padding:16px 24px;border-top:1px solid var(--line);background:var(--surface-2)}
.facts div{display:flex;flex-direction:column;gap:2px;font-size:14px;min-width:0}
.camp-day{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.camp-day-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.fullday{margin-left:auto}
.fullday.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.sess{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px;padding:12px}
.child-card{border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:12px}

/* ---------- people rows (family / children bookings) ---------- */
.person{display:grid;grid-template-columns:minmax(0,2fr) 100px auto;gap:8px;align-items:end;margin-bottom:8px}

/* ---------- responsive ---------- */
@media (max-width:760px){.pulse-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:700px){
  .site{padding:12px 12px 40px}
  .site-nav{padding:10px 14px;gap:8px}
  .club{width:100%}
  .site-links{width:100%;flex-wrap:wrap;margin:0 -4px}
  .hero-top{padding:12px 16px 0}
  .early{padding:12px 16px;font-size:14px}
  .early-left{margin-left:0}
  .facts{padding:14px 16px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .camp-day-head .fullday{margin-left:0;width:100%}
  .sess{grid-template-columns:minmax(0,1fr)}
  .big{font-size:52px}
  .kpis b{font-size:20px}
  .feed li{grid-template-columns:32px minmax(0,1fr);row-gap:0}
  .feed .ago{grid-column:2}
  .person{grid-template-columns:minmax(0,1fr) 72px auto}
}
@media (max-width:560px){.hero h1{font-size:26px}.hero{padding:32px 16px 20px}.sect{padding:18px 16px}}

/* ---------- camp booking (AmmHubWebsite) ---------- */
.choice input[type=checkbox],.fullday input[type=checkbox]{position:absolute;opacity:0;pointer-events:none}
label.choice{position:relative}
label.choice.off,label.fullday.off{opacity:.5;cursor:not-allowed}
label.choice:focus-within,label.fullday:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.choice .left{font-size:12px;color:var(--muted)}
.choice .left.full{color:var(--bad)}
.child-card[hidden]{display:none}
.reveal[hidden]{display:none}
.alert{border-radius:10px;padding:12px 14px;font-size:14px;margin:0 24px 0}
.alert.ok{background:var(--ok-soft);color:var(--ok)}
.alert.warn{background:var(--warn-soft);color:var(--warn)}
.alert.bad{background:var(--bad-soft);color:var(--bad)}
.pay-note{font-size:12px;color:var(--muted);margin-top:8px;text-align:center}
.done{padding:36px 24px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.kv{display:grid;grid-template-columns:160px minmax(0,1fr);gap:6px 14px;font-size:14px}
.kv dt{color:var(--muted)}
.kv dd{margin:0}
@media (max-width:560px){.kv{grid-template-columns:minmax(0,1fr)}.kv dt{margin-top:6px}}

/* ---------- terms on booking and confirmation pages (Core/HubTerms.cs) ---------- */
/* everything under the step title lines up with the title (badge 32px + gap 12px), one spacing between parts */
.terms-body{display:flex;flex-direction:column;gap:14px;padding-left:44px}
.terms-body>*:not(dialog){margin:0}
.terms-list{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:24px;row-gap:10px;margin:0 0 14px}
.terms-body .terms-list{margin:0}
.terms-list>div{display:contents}
.terms-list dt{font-weight:700;font-size:14px;line-height:1.5}
.terms-list dd{margin:0;font-size:14px;line-height:1.5}
.terms-list:empty{display:none}
.terms-box{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface-2);font-size:13px;line-height:1.55;margin-bottom:14px}
.terms-box h4{font-size:14px;margin:0 0 8px}
.terms-box p{margin:0 0 8px}
.terms-box:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.terms-body .terms-agree{font-weight:600;padding:12px 14px;margin:0}
.terms-done{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:var(--surface)}
.terms-done h3{font-size:17px;margin:0 0 10px}

/* full terms: a link that opens a pop-up (or opens in place without JavaScript) */
.terms-read{margin:0 0 14px}
.terms-body .terms-read{margin:0;align-self:flex-start;max-width:100%}
.terms-body .terms-read[open]:not(.is-modal){align-self:stretch}
.terms-read>summary{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-weight:600;font-size:14px;color:var(--accent);
  padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);list-style:none}
.terms-read>summary::-webkit-details-marker{display:none}
.terms-read>summary:hover{border-color:var(--accent)}
.terms-read>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.terms-read:not(.is-modal)[open]>summary{margin-bottom:10px}
.terms-read .terms-box{margin-bottom:0}
.terms-modal{width:min(720px,calc(100vw - 32px));max-height:min(86vh,900px);padding:0;border:0;border-radius:18px;
  background:var(--surface);color:inherit;box-shadow:0 24px 70px rgba(0,0,0,.3);overflow:hidden}
.terms-modal[open]{display:flex;flex-direction:column}
.terms-modal::backdrop{background:rgba(15,15,20,.55)}
.tm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line)}
.tm-head h3{margin:0;font-size:19px}
.tm-x{flex:none;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-size:22px;line-height:1;cursor:pointer;color:inherit}
.tm-x:hover{border-color:var(--accent)}
.tm-body{flex:1;min-height:0;overflow:auto;padding:18px 22px;font-size:15px;line-height:1.6;overscroll-behavior:contain}
.tm-body p{margin:0 0 12px}
.tm-body:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}
.tm-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--line);background:var(--surface-2)}
html:has(.terms-modal[open]){overflow:hidden}
@media (max-width:560px){
  .terms-body{padding-left:0}
  .terms-list{grid-template-columns:minmax(0,1fr);row-gap:2px}
  .terms-list>div+div>dt{margin-top:8px}
  .terms-read>summary{display:flex}
  .terms-modal{width:100vw;max-width:100vw;max-height:92vh;margin:auto 0 0;border-radius:18px 18px 0 0}
  .tm-head,.tm-body,.tm-foot{padding-left:16px;padding-right:16px}
  .tm-foot .btn{flex:1}
}
