{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "local-booking-card",
  "type": "registry:component",
  "title": "Local Booking Card",
  "description": "A clinic hero with an appointment card beside it: pick a service, a date chip and a time slot, then confirm to see a booking ticket.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "local",
    "booking",
    "appointment",
    "clinic",
    "dental",
    "calendar",
    "hero"
  ],
  "docs": "https://hyperblur.dev/effects/local-booking-card",
  "files": [
    {
      "path": "registry/hyperblur/local-booking-card.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/local-booking-card.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LocalBookingService {\n  id: string;\n  name: string;\n  duration: string;\n  price: string;\n}\n\nexport interface LocalBookingDay {\n  weekday: string;\n  date: string;\n  month: string;\n  full?: boolean;\n}\n\nexport interface LocalBookingRequest {\n  service: LocalBookingService;\n  day: LocalBookingDay;\n  time: string;\n}\n\nexport interface LocalBookingCardProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  highlights?: string[];\n  services?: LocalBookingService[];\n  days?: LocalBookingDay[];\n  slots?: string[];\n  bookedSlots?: string[];\n  phone?: string;\n  accent?: string;\n  onSubmit?: (request: LocalBookingRequest) => void;\n}\n\nconst defaultServices: LocalBookingService[] = [\n  { id: \"checkup\", name: \"Check-up and clean\", duration: \"45 min\", price: \"$95\" },\n  { id: \"whitening\", name: \"Teeth whitening\", duration: \"60 min\", price: \"$320\" },\n  { id: \"consult\", name: \"Invisalign consult\", duration: \"30 min\", price: \"Free\" },\n  { id: \"emergency\", name: \"Emergency visit\", duration: \"30 min\", price: \"$140\" },\n];\n\nconst defaultDays: LocalBookingDay[] = [\n  { weekday: \"Mon\", date: \"10\", month: \"Nov\" },\n  { weekday: \"Tue\", date: \"11\", month: \"Nov\" },\n  { weekday: \"Wed\", date: \"12\", month: \"Nov\", full: true },\n  { weekday: \"Thu\", date: \"13\", month: \"Nov\" },\n  { weekday: \"Fri\", date: \"14\", month: \"Nov\" },\n  { weekday: \"Sat\", date: \"15\", month: \"Nov\" },\n  { weekday: \"Sun\", date: \"16\", month: \"Nov\", full: true },\n];\n\nconst defaultSlots = [\"8:30\", \"9:15\", \"10:00\", \"10:45\", \"11:30\", \"1:15\", \"2:00\", \"2:45\", \"3:30\", \"4:15\", \"5:00\", \"5:45\"];\n\nconst css = `\n.hb-kl1 {\n  --hb-kl1-accent: #0f9488;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  position: relative;\n  overflow: hidden;\n  background: linear-gradient(180deg, #f3fbfa 0%, #ffffff 70%);\n  color: #10302d;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kl1 *, .hb-kl1 *::before, .hb-kl1 *::after { box-sizing: border-box; }\n.hb-kl1-blob {\n  position: absolute;\n  border-radius: 50%;\n  filter: blur(2px);\n  pointer-events: none;\n}\n.hb-kl1-blob-a { width: 520px; height: 520px; right: -140px; top: -180px; background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--hb-kl1-accent) 22%, transparent), transparent 65%); }\n.hb-kl1-blob-b { width: 380px; height: 380px; left: -160px; bottom: -160px; background: radial-gradient(circle, #d8f1ee, transparent 70%); }\n.hb-kl1-wrap {\n  position: relative;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 80px 24px 96px;\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);\n  gap: 56px;\n  align-items: center;\n}\n.hb-kl1-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin: 0 0 18px;\n  padding: 6px 12px;\n  border-radius: 999px;\n  background: #ffffff;\n  border: 1px solid #d5ebe8;\n  color: #2c625c;\n  font-size: 13px;\n  font-weight: 500;\n}\n.hb-kl1-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hb-kl1-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kl1-accent) 18%, transparent); animation: hb-kl1-pulse 2.4s ease-in-out infinite; }\n@keyframes hb-kl1-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--hb-kl1-accent) 6%, transparent); } }\n.hb-kl1-title {\n  margin: 0;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-weight: 400;\n  font-size: clamp(38px, 5.4cqw, 60px);\n  line-height: 1.02;\n  letter-spacing: -.02em;\n  color: #0b2724;\n  text-wrap: balance;\n}\n.hb-kl1-title em { font-style: normal; color: var(--hb-kl1-accent); }\n.hb-kl1-sub { margin: 18px 0 0; max-width: 440px; color: #4b6a66; font-size: 16.5px; line-height: 1.6; }\n.hb-kl1-list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }\n.hb-kl1-list li { display: flex; align-items: center; gap: 10px; color: #234a46; font-size: 14.5px; }\n.hb-kl1-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--hb-kl1-accent) 14%, #fff); color: var(--hb-kl1-accent); }\n.hb-kl1-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; color: #0b2724; font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 1px solid #b9dcd8; padding-bottom: 2px; }\n.hb-kl1-phone:hover { border-color: var(--hb-kl1-accent); }\n.hb-kl1-phone:focus-visible { outline: 2px solid var(--hb-kl1-accent); outline-offset: 4px; border-radius: 4px; }\n.hb-kl1-card {\n  position: relative;\n  min-width: 0;\n  padding: 26px;\n  border-radius: 24px;\n  background: #ffffff;\n  border: 1px solid #e1efed;\n  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 30px 60px -30px rgba(15, 80, 74, .35), 0 8px 20px -12px rgba(15, 80, 74, .2);\n  animation: hb-kl1-rise .7s cubic-bezier(.2,.8,.2,1) both;\n}\n@keyframes hb-kl1-rise { from { opacity: 0; transform: translateY(18px); } }\n.hb-kl1-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }\n.hb-kl1-cardtitle { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }\n.hb-kl1-step { color: #6b8985; font-size: 12.5px; }\n.hb-kl1-label { display: block; margin: 0 0 8px; color: #57746f; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }\n.hb-kl1-select { position: relative; margin-bottom: 20px; }\n.hb-kl1-select select {\n  appearance: none;\n  width: 100%;\n  padding: 13px 40px 13px 14px;\n  border: 1px solid #d9e9e7;\n  border-radius: 12px;\n  background: #f8fcfb;\n  color: #10302d;\n  font: inherit;\n  font-size: 15px;\n  cursor: pointer;\n}\n.hb-kl1-select select:focus-visible { outline: 2px solid var(--hb-kl1-accent); outline-offset: 2px; }\n.hb-kl1-select svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #57746f; }\n.hb-kl1-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }\n.hb-kl1-day {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 2px;\n  padding: 9px 0 8px;\n  border: 1px solid #e1efed;\n  border-radius: 12px;\n  background: #ffffff;\n  color: #10302d;\n  font: inherit;\n  cursor: pointer;\n  transition: background .2s, border-color .2s, color .2s, transform .2s;\n}\n.hb-kl1-day span { font-size: 11px; color: #6b8985; }\n.hb-kl1-day b { font-size: 17px; font-weight: 600; }\n.hb-kl1-day:hover:not(:disabled) { border-color: color-mix(in srgb, var(--hb-kl1-accent) 50%, #e1efed); transform: translateY(-1px); }\n.hb-kl1-day[aria-pressed=\"true\"] { background: var(--hb-kl1-accent); border-color: var(--hb-kl1-accent); color: #fff; }\n.hb-kl1-day[aria-pressed=\"true\"] span { color: rgba(255,255,255,.8); }\n.hb-kl1-day:disabled { cursor: not-allowed; opacity: .45; background: repeating-linear-gradient(135deg, #f4f8f7 0 4px, #fff 4px 8px); }\n.hb-kl1-day:focus-visible, .hb-kl1-slot:focus-visible, .hb-kl1-submit:focus-visible, .hb-kl1-reset:focus-visible { outline: 2px solid var(--hb-kl1-accent); outline-offset: 2px; }\n.hb-kl1-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 22px; }\n.hb-kl1-slot {\n  padding: 10px 0;\n  border: 1px solid #e1efed;\n  border-radius: 10px;\n  background: #fff;\n  color: #10302d;\n  font: inherit;\n  font-size: 13.5px;\n  font-variant-numeric: tabular-nums;\n  cursor: pointer;\n  transition: background .2s, border-color .2s, color .2s;\n}\n.hb-kl1-slot:hover:not(:disabled) { border-color: color-mix(in srgb, var(--hb-kl1-accent) 50%, #e1efed); background: #f6fbfa; }\n.hb-kl1-slot[aria-pressed=\"true\"] { background: color-mix(in srgb, var(--hb-kl1-accent) 12%, #fff); border-color: var(--hb-kl1-accent); color: color-mix(in srgb, var(--hb-kl1-accent) 70%, #000); font-weight: 600; }\n.hb-kl1-slot:disabled { color: #a9bcb9; text-decoration: line-through; cursor: not-allowed; }\n.hb-kl1-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px dashed #dcebe9; }\n.hb-kl1-summary { min-width: 0; font-size: 13px; color: #57746f; line-height: 1.4; }\n.hb-kl1-summary b { display: block; color: #10302d; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-kl1-submit {\n  flex: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  padding: 13px 20px;\n  border: 0;\n  border-radius: 999px;\n  background: #0b2724;\n  color: #fff;\n  font: inherit;\n  font-size: 14.5px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: background .2s, transform .2s, box-shadow .2s;\n}\n.hb-kl1-submit:hover:not(:disabled) { background: var(--hb-kl1-accent); box-shadow: 0 10px 24px -10px var(--hb-kl1-accent); transform: translateY(-1px); }\n.hb-kl1-submit:disabled { opacity: .4; cursor: not-allowed; }\n.hb-kl1-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 8px 8px; animation: hb-kl1-rise .5s cubic-bezier(.2,.8,.2,1) both; }\n.hb-kl1-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--hb-kl1-accent) 14%, #fff); color: var(--hb-kl1-accent); margin-bottom: 18px; }\n.hb-kl1-badge path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: hb-kl1-draw .6s .2s ease forwards; }\n@keyframes hb-kl1-draw { to { stroke-dashoffset: 0; } }\n.hb-kl1-done h3 { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-weight: 400; font-size: 30px; color: #0b2724; }\n.hb-kl1-done p { margin: 10px 0 0; color: #4b6a66; font-size: 15px; line-height: 1.55; max-width: 340px; }\n.hb-kl1-ticket { width: 100%; margin: 22px 0; padding: 16px; border-radius: 14px; background: #f5fbfa; border: 1px solid #e1efed; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: left; }\n.hb-kl1-ticket span { display: block; color: #6b8985; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }\n.hb-kl1-ticket b { display: block; margin-top: 4px; font-size: 14px; color: #10302d; }\n.hb-kl1-reset { padding: 10px 16px; border: 1px solid #d9e9e7; border-radius: 999px; background: #fff; color: #10302d; font: inherit; font-size: 14px; cursor: pointer; }\n.hb-kl1-reset:hover { border-color: var(--hb-kl1-accent); }\n@container (max-width: 820px) {\n  .hb-kl1-wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 64px 20px 72px; }\n}\n@container (max-width: 420px) {\n  .hb-kl1-card { padding: 18px; border-radius: 20px; }\n  .hb-kl1-days { gap: 4px; }\n  .hb-kl1-day b { font-size: 15px; }\n  .hb-kl1-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n  .hb-kl1-foot { flex-direction: column; align-items: stretch; }\n  .hb-kl1-submit { justify-content: center; }\n  .hb-kl1-ticket { grid-template-columns: minmax(0, 1fr); }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kl1 *, .hb-kl1 *::before, .hb-kl1 *::after { animation: none !important; transition: none !important; }\n  .hb-kl1-badge path { stroke-dashoffset: 0; }\n}\n`;\n\nfunction Check({ size = 12 }: { size?: number }) {\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n      <path d=\"M5 12.5l4.5 4.5L19 7.5\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n\nexport function LocalBookingCard({\n  eyebrow = \"Accepting new patients in Park Slope\",\n  title = \"A calmer kind of dental visit.\",\n  subtitle = \"Same-week appointments, transparent pricing and a team that explains every step before it happens.\",\n  highlights = [\"Most PPO plans accepted, in network\", \"Evening hours Tuesday and Thursday\", \"Rated 4.9 from 1,240 patients\"],\n  services = defaultServices,\n  days = defaultDays,\n  slots = defaultSlots,\n  bookedSlots = [\"9:15\", \"11:30\", \"2:45\", \"5:00\"],\n  phone = \"(718) 555-0142\",\n  accent = \"#0f9488\",\n  onSubmit,\n  className,\n  style,\n  ...rest\n}: LocalBookingCardProps) {\n  const uid = React.useId();\n  const firstOpen = Math.max(0, days.findIndex((d) => !d.full));\n  const [serviceId, setServiceId] = React.useState(services[0]?.id ?? \"\");\n  const [dayIndex, setDayIndex] = React.useState(firstOpen);\n  const [time, setTime] = React.useState<string | null>(null);\n  const [confirmed, setConfirmed] = React.useState(false);\n\n  const service = services.find((s) => s.id === serviceId) ?? services[0];\n  const day = days[dayIndex];\n  const booked = new Set(bookedSlots);\n  const titleParts = title.split(\" \");\n  const lastWord = titleParts.pop();\n\n  const submit = (event: React.FormEvent) => {\n    event.preventDefault();\n    if (!service || !day || !time) return;\n    setConfirmed(true);\n    onSubmit?.({ service, day, time });\n  };\n\n  return (\n    <section\n      className={[\"hb-kl1\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-kl1-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-local-booking-card\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kl1-blob hb-kl1-blob-a\" aria-hidden=\"true\" />\n      <div className=\"hb-kl1-blob hb-kl1-blob-b\" aria-hidden=\"true\" />\n      <div className=\"hb-kl1-wrap\">\n        <div>\n          <p className=\"hb-kl1-eyebrow\"><span className=\"hb-kl1-dot\" />{eyebrow}</p>\n          <h2 className=\"hb-kl1-title\">\n            {titleParts.join(\" \")} <em>{lastWord}</em>\n          </h2>\n          <p className=\"hb-kl1-sub\">{subtitle}</p>\n          <ul className=\"hb-kl1-list\">\n            {highlights.map((h) => (\n              <li key={h}><span className=\"hb-kl1-check\"><Check /></span>{h}</li>\n            ))}\n          </ul>\n          {phone ? (\n            <a className=\"hb-kl1-phone\" href={`tel:${phone.replace(/[^0-9+]/g, \"\")}`}>\n              <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                <path d=\"M6.6 3.5h2.7l1.4 4-2 1.4a12 12 0 0 0 6.4 6.4l1.4-2 4 1.4v2.7a2 2 0 0 1-2.2 2A16.5 16.5 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2z\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinejoin=\"round\" />\n              </svg>\n              Prefer to call? {phone}\n            </a>\n          ) : null}\n        </div>\n\n        <div className=\"hb-kl1-card\">\n          {confirmed && service && day && time ? (\n            <div className=\"hb-kl1-done\" role=\"status\">\n              <div className=\"hb-kl1-badge\">\n                <svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M5 12.5l4.5 4.5L19 7.5\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                </svg>\n              </div>\n              <h3>You are booked in.</h3>\n              <p>We sent a confirmation and a reminder will follow the day before. Arrive five minutes early to check in.</p>\n              <div className=\"hb-kl1-ticket\">\n                <div><span>Service</span><b>{service.name}</b></div>\n                <div><span>Date</span><b>{day.weekday}, {day.month} {day.date}</b></div>\n                <div><span>Time</span><b>{time}</b></div>\n              </div>\n              <button type=\"button\" className=\"hb-kl1-reset\" onClick={() => { setConfirmed(false); setTime(null); }}>\n                Book another visit\n              </button>\n            </div>\n          ) : (\n            <form onSubmit={submit}>\n              <div className=\"hb-kl1-cardhead\">\n                <h3 className=\"hb-kl1-cardtitle\">Book an appointment</h3>\n                <span className=\"hb-kl1-step\">Takes 30 seconds</span>\n              </div>\n              <label className=\"hb-kl1-label\" htmlFor={`${uid}-service`}>Service</label>\n              <div className=\"hb-kl1-select\">\n                <select id={`${uid}-service`} value={serviceId} onChange={(e) => setServiceId(e.target.value)}>\n                  {services.map((s) => (\n                    <option key={s.id} value={s.id}>{s.name} · {s.duration} · {s.price}</option>\n                  ))}\n                </select>\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M6 9l6 6 6-6\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                </svg>\n              </div>\n              <span className=\"hb-kl1-label\" id={`${uid}-days`}>Date</span>\n              <div className=\"hb-kl1-days\" role=\"group\" aria-labelledby={`${uid}-days`}>\n                {days.map((d, i) => (\n                  <button\n                    key={`${d.weekday}-${d.date}`}\n                    type=\"button\"\n                    className=\"hb-kl1-day\"\n                    aria-pressed={i === dayIndex}\n                    aria-label={`${d.weekday} ${d.month} ${d.date}${d.full ? \", fully booked\" : \"\"}`}\n                    disabled={d.full}\n                    onClick={() => { setDayIndex(i); setTime(null); }}\n                  >\n                    <span>{d.weekday}</span>\n                    <b>{d.date}</b>\n                  </button>\n                ))}\n              </div>\n              <span className=\"hb-kl1-label\" id={`${uid}-slots`}>Time</span>\n              <div className=\"hb-kl1-slots\" role=\"group\" aria-labelledby={`${uid}-slots`}>\n                {slots.map((s, i) => {\n                  const taken = booked.has(s) || ((dayIndex + i) % 5 === 0 && i > 0);\n                  return (\n                    <button\n                      key={s}\n                      type=\"button\"\n                      className=\"hb-kl1-slot\"\n                      aria-pressed={time === s}\n                      disabled={taken}\n                      aria-label={`${s}${taken ? \", taken\" : \"\"}`}\n                      onClick={() => setTime(s)}\n                    >\n                      {s}\n                    </button>\n                  );\n                })}\n              </div>\n              <div className=\"hb-kl1-foot\">\n                <div className=\"hb-kl1-summary\" aria-live=\"polite\">\n                  <b>{service ? service.name : \"Choose a service\"}</b>\n                  {day ? `${day.weekday}, ${day.month} ${day.date}` : \"\"}{time ? ` at ${time}` : \" · pick a time\"}\n                </div>\n                <button type=\"submit\" className=\"hb-kl1-submit\" disabled={!time}>\n                  Confirm booking\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                    <path d=\"M5 12h14M13 6l6 6-6 6\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                  </svg>\n                </button>\n              </div>\n            </form>\n          )}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}