/* echivo.app — the registration popup (v26b, evreg-form.js), on the event page and on /tickets.
   Shell = the Heart2Heart booking sheet (components.css .v2-sheet: bottom sheet on phones, centred dialog ≥768 px,
   92dvh, safe-area padding); this file gives it the dusk skin: a solid ink panel (#0b1020, the same surface as the old
   inline form card, so every colour below keeps its measured WCAG AA contrast) with the gold accent.
   Text on #0b1020: labels / inputs #f6f3ec (17:1), hints .62 white (7:1), errors #ff9aa6 (9.4:1), field borders
   .42 white (≥ 3:1). Inputs are 16 px (no iOS zoom). Motion: sheet slides up / dialog fades + scales in, transform and
   opacity only; none under html.lite or reduced motion. */
.erp{--er-card:#0b1020;--er-err:#ff9aa6;color:var(--text,#f6f3ec)}
.erp .v2-sheet__scrim{background:rgba(5,7,13,.74)}
/* overflow:hidden boxes can still be scrolled by focus()/scrollIntoView (the header would slide out of the panel):
   clip them instead, so only the body scrolls */
.erp,.erp .v2-sheet__panel{overflow:hidden;overflow:clip}
.erp .v2-sheet__panel{background:var(--er-card);color:var(--text);color-scheme:dark;font-size:16px;line-height:1.5;-webkit-text-size-adjust:100%;
  box-shadow:0 0 0 1px rgba(245,200,130,.18),0 -24px 60px -20px rgba(0,0,0,.8);
  /* phones: above the on-screen keyboard (evreg-form.js writes the visual viewport into --erp-kb / --erp-vvh) */
  margin-bottom:var(--erp-kb,0px);max-height:min(92vh,calc(var(--erp-vvh,100vh) - 8px));max-height:min(92dvh,calc(var(--erp-vvh,100dvh) - 8px))}
.erp .v2-sheet__panel::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(245,200,130,.55),transparent)}
.erp .v2-sheet__grip::before{background:rgba(255,255,255,.3)}
.erp .v2-sheet__head{padding:4px 10px 6px var(--gutter);min-height:52px;border-bottom:1px solid rgba(255,255,255,.07)}
.erp .v2-sheet__title{font-size:1.6rem;line-height:1.1;font-weight:900;letter-spacing:-.025em;color:var(--text)}
.erp .v2-icon-btn{color:var(--text);border-radius:999px}
@media (hover:hover){.erp .v2-icon-btn:hover{background:rgba(255,255,255,.08)}}
.erp .v2-icon-btn:focus-visible{outline:2px solid #fff;outline-offset:1px}
.erp .v2-sheet__body{padding-top:14px;padding-bottom:max(28px,calc(env(safe-area-inset-bottom,0px) + 20px));scroll-padding-block:16px}
.erp *,.erp *::before,.erp *::after{box-sizing:border-box}

/* the event this form is for */
.erp-event{margin:0;display:grid;gap:2px;padding:0 0 14px;border-bottom:1px solid rgba(255,255,255,.12)}
.erp-event strong{font-size:1rem;line-height:1.35;font-weight:800;color:var(--gold)}
.erp-event span{font-size:.9rem;line-height:1.4;font-weight:550;color:rgba(246,243,236,.78)}
.erp-event span:empty{display:none}

/* ---- the form (moved here from the old inline card; same values) ---- */
.erp .er-form{margin-top:18px;display:grid;gap:var(--sp-4,16px)}
.erp .er-form[hidden]{display:none}
.erp .er-row2{display:grid;gap:var(--sp-4,16px)}
@media (min-width:360px){.erp .er-row2{grid-template-columns:1fr 1fr;gap:12px}}
.erp .v2-label{color:var(--text);font-weight:650}
.erp .v2-input{height:52px;background-color:#151b30;border-color:rgba(255,255,255,.42);color:var(--text);border-radius:14px;font-size:16px}
.erp .v2-input:focus{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold),0 0 0 4px rgba(245,200,130,.28)}
.erp .v2-input[aria-invalid="true"]{border-color:var(--er-err);box-shadow:0 0 0 1px var(--er-err)}
.erp .v2-input[aria-invalid="true"]:focus{box-shadow:0 0 0 1px var(--er-err),0 0 0 4px rgba(255,154,166,.26)}
.erp .v2-input:-webkit-autofill{-webkit-text-fill-color:var(--text);box-shadow:0 0 0 1000px #151b30 inset;caret-color:var(--text)}
.erp .v2-hint{color:rgba(246,243,236,.62)}
.erp .v2-error{color:var(--er-err);font-weight:550}
.erp .v2-alert{background:#3a1622;color:#ffd0d6;border:1px solid rgba(255,154,166,.5)}
.erp .er-select{padding-right:40px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F6F3EC' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center}
.erp .er-select:invalid{color:rgba(246,243,236,.62)}
.erp .er-select option{background:#151b30;color:#f6f3ec}
.erp .er-checks{display:grid;gap:12px;margin-top:4px}
.erp .er-check{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;align-items:start}
.erp .er-check label{font-size:.875rem;line-height:1.5;color:rgba(246,243,236,.8);cursor:pointer}
.erp .er-check a,.erp .er-fine a{color:var(--gold);font-weight:700;text-decoration:underline;text-underline-offset:2px}
/* inline links: a 44 px tall tap target without changing the line (padding + equal negative margin) */
.erp .er-check a,.erp .er-fine a{display:inline-block;padding:12px 3px;margin:-12px -3px;line-height:1.5}
.erp .er-fine a{padding:13px 4px;margin:-13px -4px}
.erp .er-check a:focus-visible,.erp .er-fine a:focus-visible{outline:2px solid #fff;outline-offset:-8px;border-radius:6px}
/* the checkbox itself is a 44×44 target (10 px of transparent margin around the drawn 24 px box) */
.erp .er-check input{appearance:none;-webkit-appearance:none;width:44px;height:44px;margin:-11px -10px -9px;border:0;border-radius:12px;cursor:pointer;background:transparent;
  display:grid;place-items:center;position:relative}
.erp .er-check input::before{content:"";grid-area:1/1;width:24px;height:24px;border-radius:7px;border:1.5px solid rgba(255,255,255,.6);background:#151b30;box-sizing:border-box;
  transition:background-color .15s,border-color .15s}
.erp .er-check input::after{content:"";grid-area:1/1;width:11px;height:6px;border:solid #1a1206;border-width:0 0 2.5px 2.5px;transform:translateY(-1px) rotate(-45deg);opacity:0}
.erp .er-check input:checked::before{background:var(--gold);border-color:var(--gold)}
.erp .er-check input:checked::after{opacity:1}
.erp .er-check input:focus-visible{outline:none}
.erp .er-check input:focus-visible::before{outline:3px solid #fff;outline-offset:2px}
.erp .er-check input[aria-invalid="true"]::before{border-color:var(--er-err);box-shadow:0 0 0 1px var(--er-err)}
.erp .er-checks .v2-error{margin:-4px 0 0 36px}
.erp .er-submit{width:100%;min-height:56px;margin-top:6px}
.erp .btn[aria-busy="true"]{cursor:progress;opacity:.85}
.erp .btn[aria-busy="true"]::before{content:"";width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:v2-spin .7s linear infinite;flex:none}
html.lite .erp .btn[aria-busy="true"]::before{animation-duration:1.4s}
@media (prefers-reduced-motion:reduce){.erp .btn[aria-busy="true"]::before{animation:none;border-right-color:currentColor;opacity:.5}}
.erp .er-fine{margin:0;font-size:.8rem;line-height:1.5;color:rgba(246,243,236,.62)}
.erp .er-note{margin:18px 0 4px;padding:14px 16px;border-radius:14px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);font-size:.95rem;line-height:1.45;color:var(--text);font-weight:600}
.erp .er-note:focus{outline:none}
.erp .er-note[hidden]{display:none}

/* ---- success ---- */
.erp .er-done{margin-top:20px;display:grid;gap:10px;justify-items:start}
.erp .er-done[hidden]{display:none}
.erp .er-done .v2-success-check{width:48px;height:48px}
.erp .er-done .v2-success-check circle{fill:var(--gold)}
.erp .er-done .v2-success-check path{stroke:#1a1206}
.erp .er-done__title{margin:4px 0 0;font-size:1.6rem;line-height:1.1;font-weight:900;letter-spacing:-.025em;color:var(--text)}
.erp .er-done__title:focus{outline:none}
.erp .er-done__text{margin:0;font-size:1rem;line-height:1.5;color:var(--text);font-weight:600}
.erp .er-done__mail{margin:0;font-size:.92rem;line-height:1.5;color:rgba(246,243,236,.78)}
.erp .er-done__meta{margin:4px 0 0;padding:12px 14px;border-radius:14px;background:rgba(245,200,130,.12);border:1px solid rgba(245,200,130,.4);color:#ffe4b5;font-size:.875rem;line-height:1.45;font-weight:600;justify-self:stretch}
.erp .er-done__meta:empty{display:none}
.erp .er-done__act{justify-self:stretch;display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:6px 0 2px}
.erp .er-done__act .btn{width:100%;min-height:52px;padding-inline:1em;font-size:.98rem}

/* ---- desktop / tablet: centred dialog, fades and scales in ---- */
@media (min-width:768px){
  .erp .v2-sheet__panel{width:520px;margin-bottom:0;max-height:min(820px,92vh);max-height:min(820px,92dvh);
    box-shadow:0 0 0 1px rgba(245,200,130,.2),0 50px 120px -30px rgba(0,0,0,.9);transform:translateY(10px) scale(.97)}
  .erp.is-open .v2-sheet__panel{transform:none}
  .erp .v2-sheet__head{padding:20px 14px 10px 28px}
  .erp .v2-sheet__body{padding:16px 28px 28px}
}

/* ---- no motion: lite devices and reduced motion (the sheet just appears / disappears) ---- */
html.lite:has(.erp){--dur-sheet:0ms}
html.lite .erp .v2-sheet__panel,html.lite .erp .v2-sheet__scrim,html.rm .erp .v2-sheet__panel,html.rm .erp .v2-sheet__scrim{transition:none}
html.lite .erp .er-check input::before,html.rm .erp .er-check input::before,html.lite .erp .v2-input,html.rm .erp .v2-input{transition:none}
html.lite .erp .v2-success-check path,html.rm .erp .v2-success-check path{animation:none;stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){ .erp .v2-sheet__panel,.erp .v2-sheet__scrim{transition:none} }
@media (forced-colors:active){ .erp .v2-sheet__panel{border:1px solid CanvasText} .erp .er-check input::before{border:1px solid CanvasText} }
