/**
 * public/css/hz-auth.css — shared auth-modal styles.
 *
 * Single source for the email-OTP + Google sign-in modal, used by the
 * marketing pages (the pre-login page, terms, privacy). Written to be
 * self-sufficient: accent/shadow tokens fall back to literals so the modal
 * looks correct regardless of which page's :root it lands in.
 */
/* Overlay: safe-area padding so the card + controls never sit under a notch or
   the home indicator (notched iPhones, landscape). */
.hz-auth-modal{position:fixed;inset:0;background:rgba(4,8,18,.86);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);z-index:100;display:none;align-items:center;justify-content:center;padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
.hz-auth-modal.open{display:flex}
.hz-auth-modal .modal-card{width:100%;max-width:420px;background:var(--surface,#0A1428);color:var(--text,#EEF3FF);border:1px solid var(--ring,var(--blueLine,color-mix(in srgb, var(--hz-brand-blue) 28%, transparent)));border-radius:var(--hz-radius-28,28px);padding:32px 28px 24px;box-shadow:var(--shadow,0 30px 90px rgba(0,0,0,.52)),var(--glow,0 0 36px color-mix(in srgb, var(--hz-brand-blue) 28%, transparent));position:relative;max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* 44×44 hit target (WCAG 2.5.5 / Apple HIG) — it's the primary dismiss on touch. */
.hz-auth-modal .modal-close{position:absolute;inset-inline-end: 12px;top:12px;background:rgba(255,255,255,.06);border:1px solid var(--line,rgba(255,255,255,.08));color:var(--muted,#91A2BE);width:44px;height:44px;border-radius:var(--hz-radius-12,12px);font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.hz-auth-modal .modal-card h2{font-family:var(--fontD,var(--hz-font-display,sans-serif));font-size:1.5rem;margin-bottom:7px}
.hz-modal-sub{color:var(--muted,#91A2BE);font-size:.9rem;line-height:1.55;margin-bottom:22px}
/* The line that replaces Google inside an app's embedded browser (hz-webview.js). */
.hz-modal-note{color:var(--muted,#91A2BE);font-size:.82rem;line-height:1.5;margin:0 0 14px}
/* The sign-up gift's amount (hz-signup-gift.js): "50 ⭐ Stars" is never broken across lines. */
.hz-gift-amount{white-space:nowrap}
/* Primary action buttons (Send code / Sign in). Self-contained so the modal is
   correctly branded on EVERY page: the marketing site migrated its page buttons
   to the .hz-btn system and no longer defines .btn/.btn-primary, so a modal that
   leaned on those would render as an unstyled grey browser button. These rules
   own the look regardless of the host page. */
.hz-auth-modal .btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:var(--hz-radius-14,14px);font-family:inherit;font-weight:800;font-size:1rem;line-height:1;cursor:pointer;-webkit-appearance:none;appearance:none;transition:filter .18s,transform .18s,box-shadow .2s,opacity .18s}
.hz-auth-modal .btn-primary{background:var(--grad,linear-gradient(135deg,var(--accent,var(--hz-brand-blue)),var(--accent2,var(--hz-brand-cyan))));color:#fff;box-shadow:var(--glow,0 12px 34px color-mix(in srgb, var(--hz-brand-blue) 32%, transparent))}
.hz-auth-modal .btn-primary:hover:not(:disabled){filter:brightness(1.06);transform:translateY(-1px)}
.hz-auth-modal .btn-primary:active:not(:disabled){transform:translateY(0)}
.hz-auth-modal .btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}
@media(prefers-reduced-motion:reduce){.hz-auth-modal .btn{transition:none}.hz-auth-modal .btn-primary:hover:not(:disabled){transform:none}}
.hz-social{display:flex;flex-direction:column;align-items:center}
/* Google renders its button in a cross-origin <iframe>. Chrome paints an opaque
   WHITE backdrop under such an iframe when the iframe's OWN document resolves to
   a light color-scheme (Google's does; we cannot change a cross-origin document
   from here, and setting color-scheme/background on the iframe element has no
   effect — both verified). That white shows as a rectangle around the black pill.
   Fix (independent of GIS internals, all platforms):
     • clip-path on the iframe insets a few px top/bottom — cropping the white
       bands — and re-rounds to a pill (`round`), cropping the white corners too.
       inset() works from the iframe's OWN box, so it is robust to however GIS
       positions the button inside it (GIS uses an asymmetric margin:-2px).
     • overflow:hidden + pill radius on the container crops the horizontal
       overhang (GIS margin:-10px) and is a belt-and-suspenders backstop. */
.hz-social-btn{position:relative;width:100%;display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:var(--hz-radius-pill,999px)}
.hz-social-btn iframe{-webkit-clip-path:inset(3px 0 round 999px);clip-path:inset(3px 0 round 999px)}
/* Reserve the button height while loading so the skeleton has a footprint and the
   button does not shift in when it paints. */
.hz-social--loading .hz-social-btn{min-height:40px}
/* While loading we (a) hold Google's rendered content transparent and (b) paint
   an opaque shimmer skeleton over the exact footprint — so there is no white
   flash and no layout shift (the space is reserved) — then cross-fade to the
   real button once it has painted. The loading white is hidden by BOTH opacity
   and stacking; the loaded white is cropped by the clip above. Works on every
   platform, independent of GIS internals. See hz-auth.js _hzRevealGoogleWhenReady. */
.hz-social-btn::before{content:'';position:absolute;inset:0;z-index:2;border-radius:var(--hz-radius-pill,999px);background:linear-gradient(90deg,#0d1730 25%,#182543 37%,#0d1730 63%);background-size:400% 100%;animation:hzSkeleton 1.4s ease-in-out infinite;opacity:0;transition:opacity .25s ease;pointer-events:none}
.hz-social--loading .hz-social-btn::before{opacity:1}
.hz-social-btn>*{transition:opacity .25s ease}
.hz-social--loading .hz-social-btn>*{opacity:0}
@keyframes hzSkeleton{0%{background-position:100% 50%}100%{background-position:0 50%}}
.hz-divider{display:flex;align-items:center;gap:12px;width:100%;margin:18px 0 16px;color:var(--muted,#91A2BE);font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.hz-divider::before,.hz-divider::after{content:'';flex:1;height:1px;background:var(--line,rgba(255,255,255,.08))}
.hz-err{color:#ff6b6b;font-size:.84rem;margin-bottom:10px;min-height:1.2em;display:none}
.hz-err.show{display:block}
/* font-size MUST be ≥16px: iOS Safari force-zooms the viewport on focus of any
   smaller input (this is the first field every iPhone user taps). */
.hz-auth-modal .field{width:100%;height:50px;border-radius:var(--hz-radius-14,14px);border:1px solid var(--line,rgba(255,255,255,.08));background:rgba(255,255,255,.04);color:var(--text,#EEF3FF);padding:0 15px;font-size:16px;outline:none;margin-bottom:12px;transition:border-color .2s,box-shadow .2s}
.hz-auth-modal .field:focus{border-color:var(--ring,var(--blueLine,color-mix(in srgb, var(--hz-brand-blue) 28%, transparent)));box-shadow:0 0 0 3px color-mix(in srgb, var(--hz-brand-blue) 12%, transparent)}
.hz-auth-modal .field::placeholder{color:var(--muted,#91A2BE);opacity:1}
.hz-otp-row{display:flex;gap:8px;justify-content:center;margin:20px 0 18px}
.hz-otp-input{width:46px;height:58px;border-radius:var(--hz-radius-14,14px);background:rgba(255,255,255,.04);border:1.5px solid var(--line,rgba(255,255,255,.08));color:var(--text,#EEF3FF);font-size:1.55rem;font-weight:800;text-align:center;font-family:monospace;transition:.15s border-color,.15s background;caret-color:transparent}
.hz-otp-input:focus{outline:none;border-color:var(--accent,var(--blue,var(--hz-brand-blue)));background:color-mix(in srgb, var(--hz-brand-blue) 8%, transparent)}
.hz-otp-input.filled{border-color:var(--ring,var(--blueLine,color-mix(in srgb, var(--hz-brand-blue) 28%, transparent)));background:color-mix(in srgb, var(--hz-brand-blue) 6%, transparent)}
/* Larger vertical hit area for the inline text buttons (Resend / Change email). */
.hz-text-btn{background:none;border:none;color:var(--accent2,var(--cyan,var(--hz-brand-cyan)));font:inherit;font-size:.86rem;font-weight:800;cursor:pointer;padding:6px 4px;min-height:32px;text-decoration:underline;text-underline-offset:3px;transition:opacity .15s}
.hz-text-btn:hover{opacity:.75}
.hz-resend-row{text-align:center;margin-top:14px;font-size:.86rem;color:var(--muted,#91A2BE)}
.hz-spinner{display:inline-block;width:17px;height:17px;border:2.5px solid rgba(255,255,255,.28);border-top-color:#fff;border-radius:50%;animation:hzSpin .7s linear infinite;vertical-align:middle}
@keyframes hzSpin{to{transform:rotate(360deg)}}
/* Legal notice: lift contrast + size to meet WCAG 1.4.3 on the dark surface. */
.hz-auth-modal .legal{font-size:.75rem;color:var(--muted,#91A2BE);text-align:center;margin:18px auto 0;text-wrap:balance;max-width:320px}
/* The gift line's footnote (what Stars are): the window's last words, in the legal line's type, right under it,
   a step quieter — the design system's meta grey (AA on both cards). */
.hz-auth-modal .legal.hz-stars-note{margin-top:6px;color:var(--hz-text-meta,#9292A8)}
/* Respect reduced-motion: slow the spinner rather than a fast continuous spin. */
@media(prefers-reduced-motion:reduce){.hz-spinner{animation-duration:1.6s}.hz-social-btn::before{animation:none;transition:none}.hz-social-btn>*{transition:none}}
@media(max-width:480px){
  .hz-otp-input{width:40px;height:50px;font-size:1.3rem;border-radius:var(--hz-radius-12,12px)}
  .hz-otp-row{gap:6px}
}
@media(max-width:360px){
  .hz-otp-input{width:32px;height:44px;font-size:1.1rem;border-radius:var(--hz-radius-10,10px)}
  .hz-otp-row{gap:4px}
}
/* Full-width primary buttons and the resend-row separator (were inline styles). */
.hz-auth-modal .btn-block{width:100%;height:50px}
.hz-resend-sep{color:var(--dim,#52617B);margin:0 8px}

/* ═══════════════════════════════════════════════════════════════════════════
   The "app" look — <body data-hz-auth-look="app"> (hz-auth.js).
   The same card the app's own sign-in shows (public/js/addons/login-addon.js,
   .lm-*): envelope tile, 28px title, blue button, a bottom sheet on phones,
   white in the light theme and ink in the dark — the design-system tokens
   (tokens.css) flip with [data-theme], exactly as they do for the app. When
   the app's card changes, change this block with it: the two are one design.
   ═══════════════════════════════════════════════════════════════════════════ */
.hz-auth-modal--app{
  --hza-card:#0d0d18;
  --hza-text:var(--hz-text,#EDEDF8);
  --hza-subtle:var(--hz-text-subtle,#363658);
  --hza-sub:color-mix(in srgb,var(--hza-text) 58%,var(--hza-subtle));
  --hza-line:var(--hz-border,rgba(255,255,255,.055));
  --hza-field:var(--hz-surface-raised,#101024);
  --hza-accent:var(--hz-brand);
  --hza-close:rgba(255,255,255,.07);
  --hza-close-hover:rgba(255,255,255,.13);
  --hza-otp:rgba(255,255,255,.05);
  --hza-otp-line:rgba(255,255,255,.12);
  --hza-divider:color-mix(in srgb,var(--hza-text) 14%,transparent);
  background:var(--hz-overlay-scrim,rgba(0,0,0,.6));
  backdrop-filter:var(--hz-overlay-blur,blur(12px));-webkit-backdrop-filter:var(--hz-overlay-blur,blur(12px));
  /* Clear the cookie banner while it is up (cookie-consent.js publishes its height). */
  padding-bottom:calc(max(20px,env(safe-area-inset-bottom)) + var(--hz-consent-h,0px));
  font-family:inherit;
}
[data-theme="light"] .hz-auth-modal--app{
  --hza-card:#fff;
  --hza-close:rgba(0,0,0,.06);
  --hza-close-hover:rgba(0,0,0,.12);
  --hza-otp:rgba(0,0,0,.04);
  --hza-otp-line:rgba(0,0,0,.1);
  --hza-divider:rgba(0,0,0,.14);
}
.hz-auth-modal--app .modal-card{
  max-width:480px;background:var(--hza-card);color:var(--hza-text);
  border:var(--hz-elevation-border,1px solid rgba(255,255,255,.08));
  border-radius:var(--hz-radius-28,28px);padding:40px 36px 32px;
  box-shadow:var(--hz-modal-shadow,0 24px 80px rgba(0,0,0,.55),0 4px 16px rgba(0,0,0,.25));
}
.hz-auth-modal--app .modal-close{
  top:16px;inset-inline-end: 16px;width:36px;height:36px;border-radius:50%;border:0;
  background:var(--hza-close);color:var(--hza-subtle);font-size:13px;
  transition:background .13s,color .13s;-webkit-tap-highlight-color:transparent;
}
/* 36px to look like the app's; the hit area stays 44px (WCAG 2.5.5). */
.hz-auth-modal--app .modal-close::after{content:'';position:absolute;inset:-4px;border-radius:50%}
.hz-auth-modal--app .modal-close:hover{background:var(--hza-close-hover);color:var(--hza-text)}
.hz-auth-icon{
  width:64px;height:64px;border-radius:var(--hz-radius-20,20px);margin-bottom:24px;
  display:flex;align-items:center;justify-content:center;
  background:var(--hz-action-gradient);box-shadow:0 8px 24px color-mix(in srgb, var(--hz-blue-action) 35%, transparent);
}
.hz-auth-icon svg{width:28px;height:28px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hz-auth-modal--app .modal-card h2{font-family:inherit;font-size:28px;font-weight:700;letter-spacing:-.7px;line-height:1.2;margin:0 0 8px;color:var(--hza-text)}
.hz-auth-modal--app .hz-modal-sub{font-size:16px;line-height:1.45;color:var(--hza-sub);margin:0}
.hz-auth-modal--app #hzStep2 .hz-modal-sub strong{color:var(--hza-text)}
.hz-auth-modal--app .hz-modal-note{margin:18px 0 0;font-size:13px;line-height:1.45;color:var(--hza-sub)}
/* Google: 48px, and the dark-card crop of GIS's white backdrop only in dark —
   on a light card the 'outline' button's own hairline sits at the very edge
   and a crop would eat it (login-addon.js does the same). */
.hz-auth-modal--app .hz-social{margin-top:26px}
.hz-auth-modal--app .hz-social-btn{min-height:48px}
[data-theme="light"] .hz-auth-modal--app .hz-social-btn{overflow:visible}
[data-theme="light"] .hz-auth-modal--app .hz-social-btn iframe{-webkit-clip-path:none;clip-path:none}
.hz-auth-modal--app .hz-social-btn::before{background:linear-gradient(90deg,#15152a 25%,#1e1e38 37%,#15152a 63%);background-size:400% 100%}
[data-theme="light"] .hz-auth-modal--app .hz-social-btn::before{background:linear-gradient(90deg,#eef0f4 25%,#f7f8fa 37%,#eef0f4 63%);background-size:400% 100%}
.hz-auth-modal--app .hz-divider{margin:22px 0 18px;font-size:11px;font-weight:700;color:color-mix(in srgb,var(--hza-text) 52%,var(--hza-subtle))}
.hz-auth-modal--app .hz-divider::before,.hz-auth-modal--app .hz-divider::after{background:var(--hza-divider)}
.hz-auth-modal--app .hz-err{
  font-size:13px;line-height:1.4;color:var(--hz-danger,#F47373);
  background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.2);
  border-radius:var(--hz-radius-10,10px);padding:10px 14px;margin:0 0 14px;
}
.hz-auth-modal--app .hz-err.show{margin-top:20px}
/* Guidance, not a failure (hz-retry.js: "use the latest code"). */
.hz-err.is-note{color:inherit}
.hz-auth-modal--app .hz-err.is-note{color:var(--hza-text,inherit);background:color-mix(in srgb, var(--hz-brand) 7%, transparent);border-color:color-mix(in srgb, var(--hz-brand) 18%, transparent)}
.hz-text-btn:disabled{opacity:.45;cursor:default;text-decoration:none}
/* 16px text: below it iOS Safari zooms the page on focus. */
.hz-auth-modal--app .field{
  height:56px;margin:28px 0 14px;padding:0 18px;border-radius:var(--hz-radius-12,12px);
  border:1px solid var(--hza-line);background:var(--hza-field);color:var(--hza-text);
  font-family:inherit;font-size:16px;caret-color:var(--hza-accent);
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.hz-auth-modal--app .field:hover{border-color:color-mix(in srgb,var(--hza-subtle) 55%,transparent)}
.hz-auth-modal--app .field:focus{border-color:var(--hza-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--hza-accent) 12%,transparent)}
[data-theme="light"] .hz-auth-modal--app .field:focus{border-color:var(--hz-brand);background:color-mix(in srgb, var(--hz-brand) 5%, transparent)}
.hz-auth-modal--app .field::placeholder{color:color-mix(in srgb,var(--hza-text) 42%,var(--hza-subtle));opacity:.86}
.hz-auth-modal--app #hzStep3 .field{margin-top:22px}
.hz-auth-modal--app .btn-primary{
  height:56px;margin-top:10px;gap:8px;border-radius:var(--hz-radius-16,16px);
  background:var(--hz-action-gradient);
  font-size:15px;font-weight:600;box-shadow:0 4px 20px color-mix(in srgb, var(--hz-brand) 40%, transparent);
}
.hz-auth-modal--app .btn-primary:hover:not(:disabled){filter:none;opacity:.93;box-shadow:0 6px 24px color-mix(in srgb, var(--hz-brand) 50%, transparent)}
.hz-auth-modal--app .btn-primary svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.hz-auth-modal--app .hz-otp-row{gap:clamp(4px,2vw,8px);margin:22px 0 14px}
.hz-auth-modal--app .hz-otp-input{
  flex:1;min-width:32px;max-width:46px;height:clamp(48px,14vw,58px);
  font-size:clamp(18px,5vw,22px);font-weight:700;border-radius:var(--hz-radius-12,12px);
  background:var(--hza-otp);border:1.5px solid var(--hza-otp-line);color:var(--hza-text);caret-color:var(--hza-accent);
}
.hz-auth-modal--app .hz-otp-input:focus{border-color:var(--hza-accent);background:color-mix(in srgb, var(--hz-brand) 8%, transparent);box-shadow:0 0 0 3px color-mix(in srgb, var(--hz-brand) 20%, transparent)}
.hz-auth-modal--app .hz-otp-input.filled{border-color:color-mix(in srgb, var(--hz-brand) 35%, transparent);background:var(--hza-otp)}
.hz-auth-modal--app .hz-resend-row{margin-top:16px;font-size:13px;color:var(--hza-sub)}
.hz-auth-modal--app .hz-resend-sep{color:var(--hza-subtle)}
.hz-auth-modal--app .hz-text-btn{color:var(--hza-accent);font-size:13px;font-weight:500;text-decoration:none;min-height:44px;padding:0 4px}
.hz-auth-modal--app .legal{margin-top:20px;font-size:12px;line-height:1.5;color:var(--hza-sub)}
/* Phones: the app's bottom sheet. */
@media (max-width:599px){
  .hz-auth-modal--app{align-items:flex-end}
  .hz-auth-modal--app .modal-card{
    border-end-start-radius: 0;border-end-end-radius: 0;
    padding:32px 24px max(28px,env(safe-area-inset-bottom));
  }
  .hz-auth-icon{margin-bottom:20px}
  .hz-auth-modal--app .modal-card h2{font-size:25px}
  .hz-auth-modal--app .hz-modal-sub{font-size:15px}
}
@media(prefers-reduced-motion:reduce){.hz-auth-modal--app .btn-primary:hover:not(:disabled){transform:none}}
