{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"card","type":"registry:ui","title":"Card","description":"Composable card surface (header, title, description, content, footer) with an optional hover lift and a rotating gradient border.","dependencies":[],"registryDependencies":["utils"],"files":[{"path":"registry/ui/card.tsx","type":"registry:ui","content":"\"use client\";\n\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n// Rotating conic border: @property makes the angle animatable; the mask keeps only a 1px ring.\nconst css = `\n@property --ui-card-angle{syntax:\"<angle>\";inherits:false;initial-value:0deg}\n@keyframes ui-card-spin{to{--ui-card-angle:360deg}}\n.ui-card-border{padding:1px;background:conic-gradient(from var(--ui-card-angle),transparent 0%,color-mix(in oklab,var(--primary) 90%,transparent) 12%,transparent 30%,transparent 50%,color-mix(in oklab,var(--primary) 50%,transparent) 62%,transparent 80%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);animation:ui-card-spin 6s linear infinite;animation-play-state:paused}\n.group\\\\/card:hover .ui-card-border,.group\\\\/card:focus-within .ui-card-border{animation-play-state:running}\n@media (prefers-reduced-motion:reduce){.ui-card-border{animation:none}}\n`;\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n  /** Lift and deepen the shadow on hover or keyboard focus inside. */\n  interactive?: boolean;\n  /** Primary-tinted conic border that rotates while hovered. */\n  gradientBorder?: boolean;\n}\n\nexport function Card({ interactive = false, gradientBorder = false, className, children, ...props }: CardProps) {\n  return (\n    <div\n      {...props}\n      className={cn(\n        \"group/card relative flex flex-col rounded-2xl border border-border bg-card text-card-foreground shadow-sm\",\n        interactive &&\n          \"transition-[translate,box-shadow,border-color] duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:-translate-y-1 hover:shadow-xl focus-within:-translate-y-1 focus-within:shadow-xl motion-reduce:transition-none motion-reduce:hover:translate-y-0\",\n        gradientBorder && \"border-transparent\",\n        className,\n      )}\n    >\n      {gradientBorder && (\n        <>\n          <style href=\"ui-card\" precedence=\"default\">\n            {css}\n          </style>\n          <span aria-hidden className=\"ui-card-border pointer-events-none absolute -inset-px rounded-[inherit]\" />\n          <span aria-hidden className=\"pointer-events-none absolute -inset-px rounded-[inherit] border border-border\" />\n        </>\n      )}\n      {children}\n    </div>\n  );\n}\n\nexport function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n  return <div {...props} className={cn(\"flex flex-col gap-1.5 p-6 pb-0\", className)} />;\n}\n\nexport function CardTitle({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) {\n  return <h3 {...props} className={cn(\"text-lg font-semibold leading-tight tracking-tight\", className)} />;\n}\n\nexport function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) {\n  return <p {...props} className={cn(\"text-sm text-muted-foreground\", className)} />;\n}\n\nexport function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n  return <div {...props} className={cn(\"p-6\", className)} />;\n}\n\nexport function CardFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n  return <div {...props} className={cn(\"mt-auto flex items-center gap-3 border-t border-border p-6 py-4\", className)} />;\n}\n"}]}