{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkout-stepper-card",
  "type": "registry:component",
  "title": "Checkout Stepper Card",
  "description": "One centered card that walks through Details, Payment and Confirm with a glowing progress track. Steps slide in from the direction you travel, each step validates before moving on, and the review step links back to edit.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "checkout",
    "checkout",
    "stepper",
    "wizard",
    "subscription",
    "card",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/checkout-stepper-card",
  "files": [
    {
      "path": "registry/hyperblur/checkout-stepper-card.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/checkout-stepper-card.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type CheckoutStepperCycle = \"monthly\" | \"yearly\";\n\nexport interface CheckoutStepperValues {\n  name: string;\n  email: string;\n  company: string;\n  seats: number;\n  cycle: CheckoutStepperCycle;\n  cardBrand: string;\n  cardLast4: string;\n  total: number;\n}\n\nexport interface CheckoutStepperCardProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  product?: string;\n  plan?: string;\n  monthlyPrice?: number;\n  yearlyPrice?: number;\n  defaultSeats?: number;\n  defaultStep?: number;\n  currency?: string;\n  onStepChange?: (step: number) => void;\n  onComplete?: (values: CheckoutStepperValues) => void;\n  accent?: string;\n}\n\nconst onlyDigits = (v: string) => v.replace(/\\D/g, \"\");\n\nfunction luhn(v: string) {\n  const d = onlyDigits(v);\n  if (d.length < 13) return false;\n  let sum = 0;\n  let dbl = false;\n  for (let i = d.length - 1; i >= 0; i -= 1) {\n    let n = d.charCodeAt(i) - 48;\n    if (dbl) {\n      n *= 2;\n      if (n > 9) n -= 9;\n    }\n    sum += n;\n    dbl = !dbl;\n  }\n  return sum % 10 === 0;\n}\n\nfunction brandOf(v: string) {\n  const d = onlyDigits(v);\n  if (/^4/.test(d)) return \"Visa\";\n  if (/^(5[1-5]|2[2-7])/.test(d)) return \"Mastercard\";\n  if (/^3[47]/.test(d)) return \"Amex\";\n  return \"Card\";\n}\n\nconst stepLabels = [\"Details\", \"Payment\", \"Confirm\"];\n\nconst css = `\n.hb-qg3 {\n  --hb-qg3-accent: #06b6d4;\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  isolation: isolate;\n  overflow: hidden;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-qg3 *, .hb-qg3 *::before, .hb-qg3 *::after { box-sizing: border-box; }\n.hb-qg3::before { content: \"\"; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent); -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent); }\n.hb-qg3::after { content: \"\"; position: absolute; left: 50%; top: 18%; width: 620px; height: 420px; transform: translateX(-50%); z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-qg3-accent) 22%, transparent), transparent); filter: blur(10px); }\n.hb-qg3-inner { max-width: 1120px; margin: 0 auto; padding: clamp(44px, 8cqw, 96px) clamp(14px, 4cqw, 32px); display: grid; justify-items: center; }\n.hb-qg3-card { width: 100%; max-width: 520px; border-radius: 22px; border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(23,23,23,.92), rgba(14,14,14,.96)); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 40px 90px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4); overflow: hidden; }\n.hb-qg3-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.06); }\n.hb-qg3-prod { display: flex; align-items: center; gap: 12px; }\n.hb-qg3-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--hb-qg3-accent) 18%, #111); border: 1px solid color-mix(in srgb, var(--hb-qg3-accent) 40%, transparent); color: var(--hb-qg3-accent); }\n.hb-qg3-mark svg { width: 18px; height: 18px; }\n.hb-qg3-prod b { display: block; font-size: 15px; font-weight: 600; }\n.hb-qg3-prod small { font-size: 12px; color: #8f8f8f; }\n.hb-qg3-price { text-align: right; font-variant-numeric: tabular-nums; }\n.hb-qg3-price b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }\n.hb-qg3-price small { font-size: 11px; color: #8f8f8f; }\n.hb-qg3-stepwrap { position: relative; }\n.hb-qg3-steps { list-style: none; margin: 0; padding: 18px 24px 4px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }\n.hb-qg3-track { position: absolute; left: calc(24px + 16.66%); right: calc(24px + 16.66%); top: 31px; height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }\n.hb-qg3-track i { display: block; height: 100%; background: var(--hb-qg3-accent); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px var(--hb-qg3-accent); }\n.hb-qg3-step { display: grid; justify-items: center; gap: 8px; font-size: 12px; color: #6b6b6b; position: relative; transition: color .3s; }\n.hb-qg3-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #111; border: 1.5px solid rgba(255,255,255,.14); font-size: 12px; font-weight: 600; transition: background .3s, border-color .3s, color .3s, box-shadow .3s; }\n.hb-qg3-step[data-state=\"current\"] { color: #ededed; }\n.hb-qg3-step[data-state=\"current\"] .hb-qg3-dot { border-color: var(--hb-qg3-accent); color: var(--hb-qg3-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-qg3-accent) 18%, transparent); }\n.hb-qg3-step[data-state=\"done\"] { color: #a1a1a1; }\n.hb-qg3-step[data-state=\"done\"] .hb-qg3-dot { background: var(--hb-qg3-accent); border-color: var(--hb-qg3-accent); color: #031317; }\n.hb-qg3-body { padding: 20px 24px 24px; overflow: hidden; }\n.hb-qg3-pane { display: grid; gap: 14px; }\n.hb-qg3-pane[data-dir=\"next\"] { animation: hb-qg3-next .45s cubic-bezier(.2,.8,.2,1); }\n.hb-qg3-pane[data-dir=\"prev\"] { animation: hb-qg3-prev .45s cubic-bezier(.2,.8,.2,1); }\n@keyframes hb-qg3-next { from { opacity: 0; transform: translateX(28px); } }\n@keyframes hb-qg3-prev { from { opacity: 0; transform: translateX(-28px); } }\n.hb-qg3-h { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; outline: none; }\n.hb-qg3-sub { margin: -8px 0 2px; font-size: 13px; color: #8f8f8f; }\n.hb-qg3-field { display: grid; gap: 6px; min-width: 0; }\n.hb-qg3-label { font-size: 12px; color: #a1a1a1; }\n.hb-qg3-input { width: 100%; height: 42px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: #0a0a0a; color: #ededed; font: inherit; font-size: 14px; padding: 0 12px; outline: none; transition: border-color .2s, box-shadow .2s; }\n.hb-qg3-input::placeholder { color: #555; }\n.hb-qg3-input:focus { border-color: var(--hb-qg3-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-qg3-accent) 22%, transparent); }\n.hb-qg3-input[aria-invalid=\"true\"] { border-color: #f87171; }\n.hb-qg3-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }\n.hb-qg3-err { font-size: 12px; color: #f87171; }\n.hb-qg3-seats { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: #0d0d0d; }\n.hb-qg3-seats span { font-size: 13px; color: #a1a1a1; }\n.hb-qg3-counter { display: flex; align-items: center; gap: 4px; }\n.hb-qg3-counter button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: #171717; color: #ededed; font: inherit; font-size: 16px; cursor: pointer; }\n.hb-qg3-counter button:hover { background: #1f1f1f; }\n.hb-qg3-counter output { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-qg3-cycle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n.hb-qg3-cyc { text-align: left; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: #0a0a0a; color: #ededed; font: inherit; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; transition: border-color .2s, background .2s; }\n.hb-qg3-cyc b { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }\n.hb-qg3-cyc small { font-size: 12px; color: #8f8f8f; }\n.hb-qg3-cyc em { font-style: normal; font-size: 10px; font-weight: 700; color: #031317; background: var(--hb-qg3-accent); padding: 1px 6px; border-radius: 999px; }\n.hb-qg3-cyc[aria-checked=\"true\"] { border-color: var(--hb-qg3-accent); background: color-mix(in srgb, var(--hb-qg3-accent) 8%, #0a0a0a); }\n.hb-qg3-review { list-style: none; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; overflow: hidden; }\n.hb-qg3-review li { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; font-size: 13px; }\n.hb-qg3-review li + li { border-top: 1px solid rgba(255,255,255,.06); }\n.hb-qg3-review span { color: #8f8f8f; }\n.hb-qg3-review b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-qg3-edit { background: none; border: 0; color: var(--hb-qg3-accent); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 4px; }\n.hb-qg3-tot { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; }\n.hb-qg3-tot span { font-size: 13px; color: #a1a1a1; }\n.hb-qg3-tot b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }\n.hb-qg3-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: #8f8f8f; cursor: pointer; }\n.hb-qg3-agree input { accent-color: var(--hb-qg3-accent); margin: 1px 0 0; width: 15px; height: 15px; }\n.hb-qg3-nav { display: flex; gap: 10px; margin-top: 4px; }\n.hb-qg3-back { height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #ededed; font: inherit; font-size: 14px; cursor: pointer; }\n.hb-qg3-back:hover { background: rgba(255,255,255,.05); }\n.hb-qg3-next { flex: 1; height: 46px; border-radius: 12px; border: 0; background: var(--hb-qg3-accent); color: #031317; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 30px -14px var(--hb-qg3-accent); transition: filter .2s, transform .15s; }\n.hb-qg3-next:hover { filter: brightness(1.08); }\n.hb-qg3-next:active { transform: translateY(1px); }\n.hb-qg3-next[disabled] { opacity: .5; cursor: not-allowed; }\n.hb-qg3-next svg { width: 14px; height: 14px; transition: transform .2s; }\n.hb-qg3-next:hover svg { transform: translateX(2px); }\n.hb-qg3-back:focus-visible, .hb-qg3-next:focus-visible, .hb-qg3-cyc:focus-visible, .hb-qg3-counter button:focus-visible, .hb-qg3-edit:focus-visible { outline: 2px solid var(--hb-qg3-accent); outline-offset: 2px; }\n.hb-qg3-done { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 0 8px; animation: hb-qg3-next .45s cubic-bezier(.2,.8,.2,1); }\n.hb-qg3-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #031317; background: var(--hb-qg3-accent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--hb-qg3-accent) 15%, transparent), 0 0 40px color-mix(in srgb, var(--hb-qg3-accent) 50%, transparent); }\n.hb-qg3-done h3 { margin: 10px 0 0; font-size: 20px; letter-spacing: -0.02em; }\n.hb-qg3-done p { margin: 0; color: #8f8f8f; font-size: 13px; max-width: 340px; }\n.hb-qg3-foot { margin: 16px 0 0; font-size: 12px; color: #6b6b6b; display: flex; align-items: center; gap: 6px; }\n.hb-qg3-foot svg { width: 12px; height: 12px; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-qg3 *, .hb-qg3 *::before, .hb-qg3 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nexport function CheckoutStepperCard({\n  product = \"Relay\",\n  plan = \"Team plan\",\n  monthlyPrice = 18,\n  yearlyPrice = 15,\n  defaultSeats = 5,\n  defaultStep = 0,\n  currency = \"USD\",\n  onStepChange,\n  onComplete,\n  accent = \"#06b6d4\",\n  className = \"\",\n  style,\n  ...rest\n}: CheckoutStepperCardProps) {\n  const uid = React.useId();\n  const money = React.useMemo(() => new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency }), [currency]);\n  const [step, setStep] = React.useState(Math.max(0, Math.min(2, defaultStep)));\n  const [dir, setDir] = React.useState<\"next\" | \"prev\" | \"none\">(\"none\");\n  const [done, setDone] = React.useState(false);\n  const [name, setName] = React.useState(\"Priya Raman\");\n  const [email, setEmail] = React.useState(\"priya@halcyon.io\");\n  const [company, setCompany] = React.useState(\"Halcyon Labs\");\n  const [seats, setSeats] = React.useState(defaultSeats);\n  const [cycle, setCycle] = React.useState<CheckoutStepperCycle>(\"yearly\");\n  const [card, setCard] = React.useState(\"\");\n  const [expiry, setExpiry] = React.useState(\"\");\n  const [cvc, setCvc] = React.useState(\"\");\n  const [agree, setAgree] = React.useState(false);\n  const [errors, setErrors] = React.useState<Record<string, string>>({});\n  const headRef = React.useRef<HTMLHeadingElement>(null);\n  const moved = React.useRef(false);\n\n  React.useEffect(() => {\n    if (moved.current) headRef.current?.focus();\n  }, [step, done]);\n\n  const unit = cycle === \"yearly\" ? yearlyPrice : monthlyPrice;\n  const total = cycle === \"yearly\" ? unit * seats * 12 : unit * seats;\n\n  const go = (next: number) => {\n    moved.current = true;\n    setDir(next > step ? \"next\" : \"prev\");\n    setStep(next);\n    onStepChange?.(next);\n  };\n\n  const check = () => {\n    const e: Record<string, string> = {};\n    if (step === 0) {\n      if (name.trim().length < 2) e.name = \"Enter your name.\";\n      if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/.test(email.trim())) e.email = \"Enter a valid work email.\";\n    }\n    if (step === 1) {\n      if (!luhn(card)) e.card = \"This card number does not pass validation.\";\n      if (!/^(0[1-9]|1[0-2]) \\/ \\d{2}$/.test(expiry)) e.expiry = \"Use MM / YY.\";\n      if (onlyDigits(cvc).length < 3) e.cvc = \"3 or 4 digits.\";\n    }\n    setErrors(e);\n    return Object.keys(e).length === 0;\n  };\n\n  const next = () => {\n    if (!check()) return;\n    if (step < 2) {\n      go(step + 1);\n      return;\n    }\n    moved.current = true;\n    setDone(true);\n    onComplete?.({\n      name: name.trim(),\n      email: email.trim(),\n      company: company.trim(),\n      seats,\n      cycle,\n      cardBrand: brandOf(card),\n      cardLast4: onlyDigits(card).slice(-4),\n      total,\n    });\n  };\n\n  const inv = (k: string) => (errors[k] ? \"true\" : undefined);\n  const last4 = onlyDigits(card).slice(-4);\n  const vars = { \"--hb-qg3-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-qg3 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-checkout-stepper-card\" precedence=\"default\">{css}</style>\n      <div className=\"hb-qg3-inner\">\n        <div className=\"hb-qg3-card\">\n          <div className=\"hb-qg3-head\">\n            <div className=\"hb-qg3-prod\">\n              <span className=\"hb-qg3-mark\" aria-hidden=\"true\">\n                <svg viewBox=\"0 0 18 18\" fill=\"none\"><path d=\"M3 9h4l2-5 2 10 2-5h2\" stroke=\"currentColor\" strokeWidth=\"1.7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n              </span>\n              <span>\n                <b>{product} {plan}</b>\n                <small>{seats} seats, billed {cycle}</small>\n              </span>\n            </div>\n            <div className=\"hb-qg3-price\">\n              <b>{money.format(total)}</b>\n              <small>{cycle === \"yearly\" ? \"per year\" : \"per month\"}</small>\n            </div>\n          </div>\n          <div className=\"hb-qg3-stepwrap\">\n          <span className=\"hb-qg3-track\" aria-hidden=\"true\"><i style={{ transform: `scaleX(${done ? 1 : step / 2})` }} /></span>\n          <ol className=\"hb-qg3-steps\" aria-label=\"Checkout progress\">\n            {stepLabels.map((label, i) => {\n              const state = done || i < step ? \"done\" : i === step ? \"current\" : \"todo\";\n              return (\n                <li key={label} className=\"hb-qg3-step\" data-state={state} aria-current={state === \"current\" ? \"step\" : undefined}>\n                  <span className=\"hb-qg3-dot\">\n                    {state === \"done\" ? (\n                      <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\"><path d=\"M2.5 6.2l2.3 2.3 4.7-5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n                    ) : i + 1}\n                  </span>\n                  {label}\n                </li>\n              );\n            })}\n          </ol>\n          </div>\n          <div className=\"hb-qg3-body\">\n            {done ? (\n              <div className=\"hb-qg3-done\" role=\"status\">\n                <span className=\"hb-qg3-ok\">\n                  <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n                </span>\n                <h3 ref={headRef} tabIndex={-1} className=\"hb-qg3-h\">Welcome to {product}, {name.trim().split(\" \")[0]}</h3>\n                <p>{company.trim() || \"Your workspace\"} is on the {plan} with {seats} seats. Invites go out to your team as soon as you add them.</p>\n              </div>\n            ) : (\n              <form\n                key={step}\n                className=\"hb-qg3-pane\"\n                data-dir={dir}\n                noValidate\n                onSubmit={(e) => {\n                  e.preventDefault();\n                  next();\n                }}\n              >\n                {step === 0 ? (\n                  <>\n                    <h3 ref={headRef} tabIndex={-1} className=\"hb-qg3-h\">Your details</h3>\n                    <p className=\"hb-qg3-sub\">We send the invoice and workspace invite here.</p>\n                    <div className=\"hb-qg3-two\">\n                      <div className=\"hb-qg3-field\">\n                        <label className=\"hb-qg3-label\" htmlFor={`${uid}-name`}>Full name</label>\n                        <input id={`${uid}-name`} className=\"hb-qg3-input\" autoComplete=\"name\" value={name} aria-invalid={inv(\"name\")} onChange={(e) => setName(e.target.value)} />\n                        {errors.name ? <span className=\"hb-qg3-err\">{errors.name}</span> : null}\n                      </div>\n                      <div className=\"hb-qg3-field\">\n                        <label className=\"hb-qg3-label\" htmlFor={`${uid}-company`}>Company</label>\n                        <input id={`${uid}-company`} className=\"hb-qg3-input\" autoComplete=\"organization\" value={company} onChange={(e) => setCompany(e.target.value)} />\n                      </div>\n                    </div>\n                    <div className=\"hb-qg3-field\">\n                      <label className=\"hb-qg3-label\" htmlFor={`${uid}-email`}>Work email</label>\n                      <input id={`${uid}-email`} className=\"hb-qg3-input\" type=\"email\" autoComplete=\"email\" value={email} aria-invalid={inv(\"email\")} onChange={(e) => setEmail(e.target.value)} />\n                      {errors.email ? <span className=\"hb-qg3-err\">{errors.email}</span> : null}\n                    </div>\n                    <div className=\"hb-qg3-seats\">\n                      <span>Seats</span>\n                      <div className=\"hb-qg3-counter\">\n                        <button type=\"button\" aria-label=\"Remove a seat\" onClick={() => setSeats((s) => Math.max(1, s - 1))}>-</button>\n                        <output aria-live=\"polite\">{seats}</output>\n                        <button type=\"button\" aria-label=\"Add a seat\" onClick={() => setSeats((s) => Math.min(500, s + 1))}>+</button>\n                      </div>\n                    </div>\n                  </>\n                ) : null}\n                {step === 1 ? (\n                  <>\n                    <h3 ref={headRef} tabIndex={-1} className=\"hb-qg3-h\">Payment</h3>\n                    <p className=\"hb-qg3-sub\">Test mode. Nothing is charged and nothing leaves this page.</p>\n                    <div className=\"hb-qg3-cycle\" role=\"radiogroup\" aria-label=\"Billing cycle\">\n                      {([\"monthly\", \"yearly\"] as const).map((c) => (\n                        <button key={c} type=\"button\" role=\"radio\" aria-checked={cycle === c} className=\"hb-qg3-cyc\" onClick={() => setCycle(c)}>\n                          <b>{c === \"monthly\" ? \"Monthly\" : \"Yearly\"}{c === \"yearly\" ? <em>-{Math.round((1 - yearlyPrice / monthlyPrice) * 100)}%</em> : null}</b>\n                          <small>{money.format(c === \"monthly\" ? monthlyPrice : yearlyPrice)} per seat / month</small>\n                        </button>\n                      ))}\n                    </div>\n                    <div className=\"hb-qg3-field\">\n                      <label className=\"hb-qg3-label\" htmlFor={`${uid}-card`}>Card number</label>\n                      <input\n                        id={`${uid}-card`}\n                        className=\"hb-qg3-input\"\n                        inputMode=\"numeric\"\n                        autoComplete=\"cc-number\"\n                        placeholder=\"4242 4242 4242 4242\"\n                        value={card}\n                        aria-invalid={inv(\"card\")}\n                        onChange={(e) => setCard(onlyDigits(e.target.value).slice(0, 19).replace(/(\\d{4})(?=\\d)/g, \"$1 \"))}\n                      />\n                      {errors.card ? <span className=\"hb-qg3-err\">{errors.card}</span> : null}\n                    </div>\n                    <div className=\"hb-qg3-two\">\n                      <div className=\"hb-qg3-field\">\n                        <label className=\"hb-qg3-label\" htmlFor={`${uid}-exp`}>Expiry</label>\n                        <input\n                          id={`${uid}-exp`}\n                          className=\"hb-qg3-input\"\n                          inputMode=\"numeric\"\n                          autoComplete=\"cc-exp\"\n                          placeholder=\"MM / YY\"\n                          value={expiry}\n                          aria-invalid={inv(\"expiry\")}\n                          onChange={(e) => {\n                            const d = onlyDigits(e.target.value).slice(0, 4);\n                            setExpiry(d.length > 2 ? `${d.slice(0, 2)} / ${d.slice(2)}` : d);\n                          }}\n                        />\n                        {errors.expiry ? <span className=\"hb-qg3-err\">{errors.expiry}</span> : null}\n                      </div>\n                      <div className=\"hb-qg3-field\">\n                        <label className=\"hb-qg3-label\" htmlFor={`${uid}-cvc`}>CVC</label>\n                        <input id={`${uid}-cvc`} className=\"hb-qg3-input\" inputMode=\"numeric\" autoComplete=\"cc-csc\" placeholder=\"123\" value={cvc} aria-invalid={inv(\"cvc\")} onChange={(e) => setCvc(onlyDigits(e.target.value).slice(0, 4))} />\n                        {errors.cvc ? <span className=\"hb-qg3-err\">{errors.cvc}</span> : null}\n                      </div>\n                    </div>\n                  </>\n                ) : null}\n                {step === 2 ? (\n                  <>\n                    <h3 ref={headRef} tabIndex={-1} className=\"hb-qg3-h\">Confirm and start</h3>\n                    <ul className=\"hb-qg3-review\">\n                      <li><span>Account</span><b>{name.trim()}, {email.trim()}</b><button type=\"button\" className=\"hb-qg3-edit\" onClick={() => go(0)}>Edit</button></li>\n                      <li><span>Plan</span><b>{plan}, {seats} seats</b><button type=\"button\" className=\"hb-qg3-edit\" onClick={() => go(0)}>Edit</button></li>\n                      <li><span>Payment</span><b>{brandOf(card)} ending {last4 || \"----\"}</b><button type=\"button\" className=\"hb-qg3-edit\" onClick={() => go(1)}>Edit</button></li>\n                    </ul>\n                    <div className=\"hb-qg3-tot\">\n                      <span>Due today</span>\n                      <b>{money.format(total)}</b>\n                    </div>\n                    <label className=\"hb-qg3-agree\">\n                      <input type=\"checkbox\" checked={agree} onChange={(e) => setAgree(e.target.checked)} />\n                      I agree that {product} renews this plan every {cycle === \"yearly\" ? \"year\" : \"month\"} until I cancel.\n                    </label>\n                  </>\n                ) : null}\n                <div className=\"hb-qg3-nav\">\n                  {step > 0 ? <button type=\"button\" className=\"hb-qg3-back\" onClick={() => go(step - 1)}>Back</button> : null}\n                  <button type=\"submit\" className=\"hb-qg3-next\" disabled={step === 2 && !agree}>\n                    {step === 2 ? `Start subscription` : `Continue to ${stepLabels[step + 1].toLowerCase()}`}\n                    <svg viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\"><path d=\"M3 7h8M7.5 3.5L11 7l-3.5 3.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n                  </button>\n                </div>\n              </form>\n            )}\n            <p className=\"hb-qg3-foot\">\n              <svg viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\"><rect x=\"2\" y=\"5\" width=\"8\" height=\"6\" rx=\"1.5\" stroke=\"currentColor\" strokeWidth=\"1.3\" /><path d=\"M4 5V3.6a2 2 0 014 0V5\" stroke=\"currentColor\" strokeWidth=\"1.3\" /></svg>\n              Cancel any time from workspace settings. Prices in {currency}.\n            </p>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}