{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-support-cards",
  "type": "registry:component",
  "title": "Contact Support Cards",
  "description": "Three support channel cards for docs, priority support and community with response-time chips and a pointer tilt, followed by a minimal inline question field.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "contact",
    "contact",
    "support",
    "help center",
    "cards",
    "tilt",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/contact-support-cards",
  "files": [
    {
      "path": "registry/hyperblur/contact-support-cards.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/contact-support-cards.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ContactSupportLink {\n  label: string;\n  href: string;\n}\n\nexport interface ContactSupportChannel {\n  icon: \"docs\" | \"community\" | \"priority\";\n  title: string;\n  description: string;\n  response: string;\n  points: string[];\n  cta: ContactSupportLink;\n  badge?: string;\n  featured?: boolean;\n}\n\nexport interface ContactSupportValues {\n  question: string;\n}\n\nexport interface ContactSupportCardsProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  channels?: ContactSupportChannel[];\n  askLabel?: string;\n  askPlaceholder?: string;\n  successMessage?: string;\n  onSubmit?: (values: ContactSupportValues) => void | Promise<unknown>;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-kf7-rise {\n  from { opacity: 0; translate: 0 18px; }\n  to { opacity: 1; translate: 0 0; }\n}\n@keyframes hb-kf7-in {\n  from { opacity: 0; transform: translate3d(0, 6px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-kf7-ping {\n  0% { transform: scale(1); opacity: .7; }\n  100% { transform: scale(2.6); opacity: 0; }\n}\n@keyframes hb-kf7-spin { to { transform: rotate(360deg); } }\n@keyframes hb-kf7-fill {\n  from { transform: scaleX(0); }\n  to { transform: scaleX(var(--hb-kf7-v, .3)); }\n}\n.hb-kf7 {\n  --hb-kf7-accent: #a78bfa;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 72px 16px 80px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kf7 *, .hb-kf7 *::before, .hb-kf7 *::after { box-sizing: border-box; }\n.hb-kf7::before {\n  content: \"\";\n  position: absolute;\n  top: -180px;\n  left: 50%;\n  z-index: -1;\n  width: 900px;\n  height: 480px;\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-kf7-accent) 14%, transparent), transparent);\n  transform: translateX(-50%);\n}\n.hb-kf7-inner { max-width: 1120px; margin: 0 auto; }\n.hb-kf7-head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 44px; text-align: center; }\n.hb-kf7-eyebrow { margin: 0; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: rgba(255, 255, 255, .03); color: #a1a1a1; font-size: 12px; font-weight: 550; }\n.hb-kf7-title { margin: 0; font-size: clamp(32px, 6cqw, 54px); font-weight: 650; line-height: 1.02; letter-spacing: -.045em; }\n.hb-kf7-sub { max-width: 520px; margin: 0; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-kf7-grid { display: grid; grid-template-columns: 1fr; gap: 14px; perspective: 1200px; }\n.hb-kf7-card {\n  --hb-kf7-rx: 0deg;\n  --hb-kf7-ry: 0deg;\n  --hb-kf7-mx: 50%;\n  --hb-kf7-my: 0%;\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  padding: 24px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 22px;\n  background: linear-gradient(180deg, #141414, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 30px 60px -40px rgba(0, 0, 0, .9);\n  transform: rotateX(var(--hb-kf7-rx)) rotateY(var(--hb-kf7-ry));\n  transform-style: preserve-3d;\n  transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .3s ease;\n  animation: hb-kf7-rise .7s cubic-bezier(.2, .8, .2, 1) both;\n  animation-delay: calc(var(--hb-kf7-i) * 110ms);\n  will-change: transform;\n}\n.hb-kf7-card[data-live=\"true\"] { transition: transform .08s linear, border-color .3s ease; }\n.hb-kf7-card::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  background: radial-gradient(420px circle at var(--hb-kf7-mx) var(--hb-kf7-my), rgba(255, 255, 255, .06), transparent 45%);\n  opacity: 0;\n  transition: opacity .3s ease;\n  pointer-events: none;\n}\n.hb-kf7-card:hover { border-color: rgba(255, 255, 255, .16); }\n.hb-kf7-card:hover::before { opacity: 1; }\n.hb-kf7-card[data-featured=\"true\"] {\n  border-color: color-mix(in srgb, var(--hb-kf7-accent) 45%, transparent);\n  background:\n    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--hb-kf7-accent) 16%, transparent), transparent 60%),\n    linear-gradient(180deg, #15131b, #0e0e10);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 80px -40px color-mix(in srgb, var(--hb-kf7-accent) 60%, transparent);\n}\n.hb-kf7-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; transform: translateZ(30px); }\n.hb-kf7-icon {\n  display: grid;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 13px;\n  background: linear-gradient(160deg, #222, #141414);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);\n  color: #ededed;\n}\n.hb-kf7-card[data-featured=\"true\"] .hb-kf7-icon { border-color: color-mix(in srgb, var(--hb-kf7-accent) 45%, transparent); color: var(--hb-kf7-accent); }\n.hb-kf7-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: rgba(255, 255, 255, .03); color: #d4d4d4; font-size: 12px; font-weight: 550; white-space: nowrap; }\n.hb-kf7-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }\n.hb-kf7-dot::after { content: \"\"; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: hb-kf7-ping 2s ease-out infinite; }\n.hb-kf7-chip[data-tone=\"1\"] .hb-kf7-dot { background: #60a5fa; }\n.hb-kf7-chip[data-tone=\"2\"] .hb-kf7-dot { background: var(--hb-kf7-accent); }\n.hb-kf7-ctitle { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; transform: translateZ(24px); }\n.hb-kf7-badge { padding: 2px 8px; border-radius: 6px; background: var(--hb-kf7-accent); color: #160f2b; font-size: 11px; font-weight: 700; letter-spacing: .02em; }\n.hb-kf7-cdesc { margin: 8px 0 20px; color: #8f8f8f; font-size: 14px; line-height: 1.55; }\n.hb-kf7-viz { margin-bottom: 20px; padding: 12px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 14px; background: rgba(0, 0, 0, .25); transform: translateZ(16px); }\n.hb-kf7-search { display: flex; align-items: center; gap: 8px; color: #6f6f6f; font-size: 13px; }\n.hb-kf7-search kbd { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; background: #161616; color: #a1a1a1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }\n.hb-kf7-lines { display: grid; gap: 6px; margin-top: 10px; }\n.hb-kf7-lines i { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .07); }\n.hb-kf7-lines i:nth-child(1) { width: 82%; }\n.hb-kf7-lines i:nth-child(2) { width: 64%; }\n.hb-kf7-lines i:nth-child(3) { width: 74%; }\n.hb-kf7-faces { display: flex; align-items: center; }\n.hb-kf7-face { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -8px; border: 2px solid #101010; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; }\n.hb-kf7-face:first-child { margin-left: 0; }\n.hb-kf7-online { margin-left: 10px; color: #a1a1a1; font-size: 12px; }\n.hb-kf7-online strong { color: #ededed; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-kf7-meter { display: flex; justify-content: space-between; margin-bottom: 8px; color: #a1a1a1; font-size: 12px; }\n.hb-kf7-meter strong { color: #ededed; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-kf7-track { height: 6px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .07); }\n.hb-kf7-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hb-kf7-accent), color-mix(in srgb, var(--hb-kf7-accent) 50%, #fff)); transform-origin: left; transform: scaleX(var(--hb-kf7-v, .3)); animation: hb-kf7-fill 1.2s .5s cubic-bezier(.2, .8, .2, 1) both; }\n.hb-kf7-points { display: grid; gap: 9px; margin: 0 0 24px; padding: 0; list-style: none; }\n.hb-kf7-points li { display: flex; align-items: flex-start; gap: 9px; color: #d4d4d4; font-size: 13px; line-height: 1.45; }\n.hb-kf7-points svg { flex: none; margin-top: 2px; color: #6f6f6f; }\n.hb-kf7-card[data-featured=\"true\"] .hb-kf7-points svg { color: var(--hb-kf7-accent); }\n.hb-kf7-cta {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  width: fit-content;\n  margin-top: auto;\n  color: #ededed;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  border-radius: 6px;\n}\n.hb-kf7-cta::after { content: \"\"; position: absolute; inset: 0; z-index: 1; border-radius: 22px; }\n.hb-kf7-cta svg { transition: transform .25s ease; }\n.hb-kf7-card:hover .hb-kf7-cta svg { transform: translateX(3px); }\n.hb-kf7-cta:focus-visible { outline: none; }\n.hb-kf7-cta:focus-visible::after { outline: 2px solid var(--hb-kf7-accent); outline-offset: 3px; }\n.hb-kf7-card[data-featured=\"true\"] .hb-kf7-cta { color: var(--hb-kf7-accent); }\n.hb-kf7-ask { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 640px; margin: 48px auto 0; }\n.hb-kf7-asklabel { color: #a1a1a1; font-size: 14px; }\n.hb-kf7-askform { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 6px 6px 6px 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; background: #111; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); transition: border-color .2s ease, box-shadow .2s ease; }\n.hb-kf7-askform:focus-within { border-color: var(--hb-kf7-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kf7-accent) 18%, transparent); }\n.hb-kf7-askform[data-invalid=\"true\"] { border-color: #f87171; }\n.hb-kf7-askform > svg { flex: none; color: #6f6f6f; }\n.hb-kf7-askinput { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; background: transparent; color: #ededed; font: inherit; font-size: 15px; outline: none; }\n.hb-kf7-askinput::placeholder { color: #5c5c5c; }\n.hb-kf7-askbtn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  flex: none;\n  height: 40px;\n  padding: 0 18px;\n  border: 0;\n  border-radius: 999px;\n  background: #ededed;\n  color: #0a0a0a;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 650;\n  cursor: pointer;\n  transition: background .2s ease, transform .2s ease;\n}\n.hb-kf7-askbtn:hover:not(:disabled) { background: #fff; }\n.hb-kf7-askbtn:active:not(:disabled) { transform: translateY(1px); }\n.hb-kf7-askbtn:disabled { cursor: progress; opacity: .8; }\n.hb-kf7-askbtn:focus-visible { outline: 2px solid var(--hb-kf7-accent); outline-offset: 2px; }\n.hb-kf7-spin { width: 14px; height: 14px; border: 2px solid rgba(10, 10, 10, .25); border-top-color: #0a0a0a; border-radius: 50%; animation: hb-kf7-spin .7s linear infinite; }\n.hb-kf7-err { margin: 0; color: #fca5a5; font-size: 13px; animation: hb-kf7-in .2s ease both; }\n.hb-kf7-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; width: 100%; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--hb-kf7-accent) 35%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--hb-kf7-accent) 8%, #0e0e0e); color: #ededed; font-size: 14px; text-align: center; animation: hb-kf7-in .3s ease both; }\n.hb-kf7-done svg { flex: none; color: var(--hb-kf7-accent); }\n.hb-kf7-again { padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--hb-kf7-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }\n.hb-kf7-again:hover { text-decoration: underline; text-underline-offset: 3px; }\n.hb-kf7-again:focus-visible { outline: 2px solid var(--hb-kf7-accent); outline-offset: 2px; }\n.hb-kf7-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@container (min-width: 620px) and (max-width: 879px) {\n  .hb-kf7-grid { grid-template-columns: 1fr 1fr; }\n  .hb-kf7-card[data-featured=\"true\"] { grid-column: 1 / -1; }\n}\n@container (min-width: 880px) {\n  .hb-kf7 { padding: 112px 32px 120px; }\n  .hb-kf7-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }\n  .hb-kf7-card { padding: 28px; }\n}\n@container (max-width: 420px) {\n  .hb-kf7-askform > svg { display: none; }\n  .hb-kf7-askbtn { padding: 0 14px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kf7-card, .hb-kf7-dot::after, .hb-kf7-track i, .hb-kf7-err, .hb-kf7-done { animation: none; }\n  .hb-kf7-card, .hb-kf7-card::before, .hb-kf7-cta svg, .hb-kf7-askform, .hb-kf7-askbtn { transition: none; }\n  .hb-kf7-card { transform: none; }\n  .hb-kf7-spin { animation-duration: 2s; }\n}\n`;\n\nconst defaultChannels: ContactSupportChannel[] = [\n  {\n    icon: \"docs\",\n    title: \"Documentation\",\n    description: \"Guides, API reference and recipes for every feature, updated with each release.\",\n    response: \"Instant answers\",\n    points: [\"380 articles and 64 code recipes\", \"Versioned API reference\", \"Copy-ready snippets in 6 languages\"],\n    cta: { label: \"Browse the docs\", href: \"#docs\" },\n  },\n  {\n    icon: \"priority\",\n    title: \"Priority support\",\n    description: \"A named engineer who knows your setup, with a guaranteed first reply.\",\n    response: \"15 min SLA\",\n    points: [\"Shared Slack channel with our team\", \"Incident escalation around the clock\", \"Quarterly architecture reviews\"],\n    cta: { label: \"Open a priority ticket\", href: \"#priority\" },\n    badge: \"Pro\",\n    featured: true,\n  },\n  {\n    icon: \"community\",\n    title: \"Community\",\n    description: \"Ask the 24,000 builders in our forum and Discord. Staff drop in every day.\",\n    response: \"Under 2 hours\",\n    points: [\"Weekly office hours with the core team\", \"Searchable answers since 2021\", \"Templates shared by members\"],\n    cta: { label: \"Join the community\", href: \"#community\" },\n  },\n];\n\nconst faces = [\n  { i: \"AK\", h: 262 },\n  { i: \"JT\", h: 190 },\n  { i: \"RM\", h: 24 },\n  { i: \"SL\", h: 330 },\n];\n\nfunction wait(result: unknown) {\n  return result instanceof Promise ? result : new Promise((resolve) => setTimeout(resolve, 900));\n}\n\nfunction ChannelIcon({ icon }: { icon: ContactSupportChannel[\"icon\"] }) {\n  const common = { width: 20, height: 20, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1.7, strokeLinecap: \"round\" as const, strokeLinejoin: \"round\" as const, \"aria-hidden\": true };\n  if (icon === \"community\") {\n    return (\n      <svg {...common}>\n        <circle cx=\"9\" cy=\"8.5\" r=\"3.2\" />\n        <path d=\"M3 19.5c.6-3.2 3-5 6-5s5.4 1.8 6 5\" />\n        <path d=\"M16 5.6a3 3 0 0 1 0 5.8M18 14.6c1.6.7 2.7 2.4 3 4.9\" />\n      </svg>\n    );\n  }\n  if (icon === \"priority\") {\n    return (\n      <svg {...common}>\n        <path d=\"M13 2.5 5 13.5h6l-1 8 8-11h-6l1-8Z\" />\n      </svg>\n    );\n  }\n  return (\n    <svg {...common}>\n      <path d=\"M5 3.5h10l4 4v13H5v-17Z\" />\n      <path d=\"M14.5 3.5v4.5H19M8.5 12.5h7M8.5 16h5\" />\n    </svg>\n  );\n}\n\nfunction Viz({ icon }: { icon: ContactSupportChannel[\"icon\"] }) {\n  if (icon === \"community\") {\n    return (\n      <div className=\"hb-kf7-viz\" aria-hidden=\"true\">\n        <div className=\"hb-kf7-faces\">\n          {faces.map((f) => (\n            <span key={f.i} className=\"hb-kf7-face\" style={{ background: `linear-gradient(135deg, hsl(${f.h} 65% 55%), hsl(${(f.h + 40) % 360} 65% 40%))` }}>\n              {f.i}\n            </span>\n          ))}\n          <span className=\"hb-kf7-online\">\n            <strong>1,284</strong> online now\n          </span>\n        </div>\n      </div>\n    );\n  }\n  if (icon === \"priority\") {\n    return (\n      <div className=\"hb-kf7-viz\" aria-hidden=\"true\">\n        <div className=\"hb-kf7-meter\">\n          <span>Median first reply today</span>\n          <strong>6 min</strong>\n        </div>\n        <div className=\"hb-kf7-track\">\n          <i style={{ \"--hb-kf7-v\": 0.4 } as React.CSSProperties} />\n        </div>\n      </div>\n    );\n  }\n  return (\n    <div className=\"hb-kf7-viz\" aria-hidden=\"true\">\n      <div className=\"hb-kf7-search\">\n        <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.7\" strokeLinecap=\"round\">\n          <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n          <path d=\"m10.5 10.5 3 3\" />\n        </svg>\n        Search webhooks, auth, limits\n        <kbd>/</kbd>\n      </div>\n      <div className=\"hb-kf7-lines\">\n        <i />\n        <i />\n        <i />\n      </div>\n    </div>\n  );\n}\n\nfunction tiltMove(event: React.PointerEvent<HTMLElement>) {\n  if (event.pointerType === \"touch\") return;\n  if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n  const el = event.currentTarget;\n  const rect = el.getBoundingClientRect();\n  const x = (event.clientX - rect.left) / rect.width;\n  const y = (event.clientY - rect.top) / rect.height;\n  el.dataset.live = \"true\";\n  el.style.setProperty(\"--hb-kf7-ry\", `${((x - 0.5) * 10).toFixed(2)}deg`);\n  el.style.setProperty(\"--hb-kf7-rx\", `${((0.5 - y) * 8).toFixed(2)}deg`);\n  el.style.setProperty(\"--hb-kf7-mx\", `${(x * 100).toFixed(1)}%`);\n  el.style.setProperty(\"--hb-kf7-my\", `${(y * 100).toFixed(1)}%`);\n}\n\nfunction tiltLeave(event: React.PointerEvent<HTMLElement>) {\n  const el = event.currentTarget;\n  delete el.dataset.live;\n  el.style.setProperty(\"--hb-kf7-ry\", \"0deg\");\n  el.style.setProperty(\"--hb-kf7-rx\", \"0deg\");\n}\n\nexport function ContactSupportCards({\n  eyebrow = \"Support\",\n  title = \"How can we help?\",\n  subtitle = \"Pick the fastest route to an answer. Every channel is staffed by the engineers who build the product.\",\n  channels = defaultChannels,\n  askLabel = \"Still stuck? Ask us directly.\",\n  askPlaceholder = \"How do I rotate API keys without downtime?\",\n  successMessage = \"Got it. Your question is in the queue and we usually reply in about 2 hours.\",\n  onSubmit,\n  accent = \"#a78bfa\",\n  className = \"\",\n  style,\n  ...rest\n}: ContactSupportCardsProps) {\n  const uid = React.useId();\n  const [question, setQuestion] = React.useState(\"\");\n  const [submitted, setSubmitted] = React.useState(false);\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"success\">(\"idle\");\n  const [failure, setFailure] = React.useState(\"\");\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const againRef = React.useRef<HTMLButtonElement>(null);\n  const moved = React.useRef(false);\n\n  React.useEffect(() => {\n    if (!moved.current) return;\n    moved.current = false;\n    if (status === \"success\") againRef.current?.focus();\n    else if (status === \"idle\") inputRef.current?.focus();\n  }, [status]);\n\n  const trimmed = question.trim();\n  const error = !trimmed ? \"Type your question first.\" : trimmed.length < 10 ? \"Add a few more words so we can route it to the right person.\" : \"\";\n  const shownError = failure || (submitted && error) || \"\";\n  const loading = status === \"loading\";\n\n  async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (loading) return;\n    setSubmitted(true);\n    setFailure(\"\");\n    if (error) {\n      inputRef.current?.focus();\n      return;\n    }\n    setStatus(\"loading\");\n    try {\n      await wait(onSubmit?.({ question: trimmed }));\n      moved.current = true;\n      setStatus(\"success\");\n    } catch (err) {\n      setStatus(\"idle\");\n      setFailure(err instanceof Error && err.message ? err.message : \"That didn't send. Please try again.\");\n    }\n  }\n\n  function again() {\n    moved.current = true;\n    setQuestion(\"\");\n    setSubmitted(false);\n    setStatus(\"idle\");\n  }\n\n  const vars = { \"--hb-kf7-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-kf7 ${className}`} style={vars} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-contact-support-cards\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kf7-inner\">\n        <header className=\"hb-kf7-head\">\n          {eyebrow ? <p className=\"hb-kf7-eyebrow\">{eyebrow}</p> : null}\n          <h2 className=\"hb-kf7-title\" id={`${uid}-title`}>\n            {title}\n          </h2>\n          {subtitle ? <p className=\"hb-kf7-sub\">{subtitle}</p> : null}\n        </header>\n        <div className=\"hb-kf7-grid\">\n          {channels.map((channel, i) => (\n            <article\n              key={channel.title}\n              className=\"hb-kf7-card\"\n              data-featured={channel.featured ? \"true\" : undefined}\n              style={{ \"--hb-kf7-i\": i } as React.CSSProperties}\n              onPointerMove={tiltMove}\n              onPointerLeave={tiltLeave}\n            >\n              <div className=\"hb-kf7-top\">\n                <span className=\"hb-kf7-icon\">\n                  <ChannelIcon icon={channel.icon} />\n                </span>\n                <span className=\"hb-kf7-chip\" data-tone={i % 3}>\n                  <span className=\"hb-kf7-dot\" aria-hidden=\"true\" />\n                  <span className=\"hb-kf7-sr\">Response time: </span>\n                  {channel.response}\n                </span>\n              </div>\n              <h3 className=\"hb-kf7-ctitle\">\n                {channel.title}\n                {channel.badge ? <span className=\"hb-kf7-badge\">{channel.badge}</span> : null}\n              </h3>\n              <p className=\"hb-kf7-cdesc\">{channel.description}</p>\n              <Viz icon={channel.icon} />\n              <ul className=\"hb-kf7-points\">\n                {channel.points.map((point) => (\n                  <li key={point}>\n                    <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d=\"m3.5 8.3 3 3 6-6.6\" />\n                    </svg>\n                    {point}\n                  </li>\n                ))}\n              </ul>\n              <a className=\"hb-kf7-cta\" href={channel.cta.href}>\n                {channel.cta.label}\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M3 8h10M9 4l4 4-4 4\" />\n                </svg>\n              </a>\n            </article>\n          ))}\n        </div>\n        <div className=\"hb-kf7-ask\">\n          {status === \"success\" ? (\n            <div className=\"hb-kf7-done\" role=\"status\">\n              <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                <circle cx=\"12\" cy=\"12\" r=\"9\" />\n                <path d=\"m8 12.5 2.8 2.7L16.5 9.5\" />\n              </svg>\n              <span>{successMessage}</span>\n              <button ref={againRef} type=\"button\" className=\"hb-kf7-again\" onClick={again}>\n                Ask another\n              </button>\n            </div>\n          ) : (\n            <>\n              <label className=\"hb-kf7-asklabel\" htmlFor={`${uid}-q`}>\n                {askLabel}\n              </label>\n              <form className=\"hb-kf7-askform\" noValidate onSubmit={handleSubmit} data-invalid={shownError ? \"true\" : undefined} aria-busy={loading || undefined}>\n                <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <circle cx=\"12\" cy=\"12\" r=\"9\" />\n                  <path d=\"M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .8-1 1.5v.4M12 17h.01\" />\n                </svg>\n                <input\n                  ref={inputRef}\n                  id={`${uid}-q`}\n                  className=\"hb-kf7-askinput\"\n                  name=\"question\"\n                  autoComplete=\"off\"\n                  placeholder={askPlaceholder}\n                  value={question}\n                  disabled={loading}\n                  onChange={(e) => {\n                    setQuestion(e.target.value);\n                    if (failure) setFailure(\"\");\n                  }}\n                  aria-invalid={shownError ? true : undefined}\n                  aria-describedby={shownError ? `${uid}-err` : undefined}\n                />\n                <button type=\"submit\" className=\"hb-kf7-askbtn\" disabled={loading}>\n                  {loading ? <span className=\"hb-kf7-spin\" aria-hidden=\"true\" /> : null}\n                  {loading ? \"Sending\" : \"Ask\"}\n                </button>\n              </form>\n              {shownError ? (\n                <p className=\"hb-kf7-err\" id={`${uid}-err`} role=\"alert\">\n                  {shownError}\n                </p>\n              ) : null}\n              <span className=\"hb-kf7-sr\" role=\"status\">\n                {loading ? \"Sending your question\" : \"\"}\n              </span>\n            </>\n          )}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}