/* SHEET AND SCRIM: the one bottom sheet. A bottom sheet on a phone, a centred dialog from 900px.
   Used by the booking, training and special pages. A page adds its own content (headings, forms, the ticket) and
   only tunes the dialog width with --sheet-w. Markup: <div class="scrim" id="scrim"></div> then <div class="sheet"> with
   <div class="grip"></div> first. JS toggles .on on both.
   Tuned through variables, never by restyling .sheet: --scrim (the dark overlay, colour-tokens.css), --sheet-w (dialog
   width), --sheet-max (a max width on the phone sheet) and --sheet-pad (its padding on a phone). */
.scrim{
  position:fixed;inset:0;z-index:50;background:var(--scrim);
  opacity:0;pointer-events:none;transition:opacity 240ms var(--out);
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:51;
  max-width:var(--sheet-max,none);margin:0 auto;
  max-height:92vh;overflow-y:auto;overscroll-behavior:contain;
  background:var(--surface);
  border-radius:18px 18px 0 0;border-top:1px solid var(--border);
  padding:var(--sheet-pad,8px 18px calc(22px + env(safe-area-inset-bottom)));
  transform:translateY(101%);
  transition:transform 300ms var(--out);
}
.sheet.on{transform:translateY(0)}
.grip{width:38px;height:4px;border-radius:99px;background:var(--border);margin:0 auto 14px}
@media(min-width:900px){
  .sheet{
    left:50%;top:50%;right:auto;bottom:auto;
    width:var(--sheet-w,400px);max-height:88vh;
    border-radius:14px;border:1px solid var(--border);
    transform:translate(-50%,-46%) scale(.97);opacity:0;
    transition:transform 240ms var(--out),opacity 240ms var(--out);
    padding:20px 22px 24px;
  }
  .sheet.on{transform:translate(-50%,-50%) scale(1);opacity:1}
  .grip{display:none}
}
/* Reduced motion: no slide. The sheet fades. A nested query rather than a blanket transform:none, so the
   desktop dialog keeps its centring transform. */
@media(prefers-reduced-motion:reduce){
  .scrim{transition-duration:200ms!important}
  .sheet{transform:translateY(0)!important;opacity:0;transition:opacity 200ms var(--out)!important}
  .sheet.on{opacity:1}
  @media(min-width:900px){.sheet{transform:translate(-50%,-50%) scale(1)!important}}
}
