// Reusable controls for the onboarding questionnaire // ─── ChoiceCard ───────────────────────────────────────────────── // Big tap-target card. Supports kicker, title, description, optional right-side stat block, // optional icon (drawn inline, no external assets). const ChoiceCard = ({ selected, onClick, kicker, title, description, right, icon, columns = 1 }) => { const [hover, setHover] = React.useState(false); return ( setHover(true)} onMouseLeave={()=>setHover(false)} style={{ all:'unset', cursor:'pointer', display:'block', width:'100%', background: selected ? '#0b1220' : '#ffffff', color: selected ? '#ffffff' : '#0b1220', border: '1px solid ' + (selected ? '#0b1220' : (hover ? 'rgba(11,18,32,0.28)' : 'rgba(11,18,32,0.10)')), borderRadius: 14, padding: '18px 20px', transition: 'all .18s cubic-bezier(.2,.7,.2,1)', boxShadow: selected ? '0 8px 24px -10px rgba(11,18,32,0.35)' : (hover ? '0 4px 12px -6px rgba(11,18,32,0.15)' : '0 1px 0 rgba(11,18,32,0.02)'), transform: hover && !selected ? 'translateY(-1px)' : 'translateY(0)', }} > {icon ? ( {icon} ) : null} {kicker ? ( {kicker} ) : null} {title} {description ? ( {description} ) : null} {right ? ( {right} ) : null} {/* checkmark indicator */} {selected ? ( ) : null} ); }; // ─── PrimaryButton / GhostButton ──────────────────────────────── const PrimaryButton = ({ children, onClick, disabled }) => { const [hover, setHover] = React.useState(false); return ( setHover(true)} onMouseLeave={()=>setHover(false)} style={{ all:'unset', cursor: disabled ? 'not-allowed' : 'pointer', background: disabled ? 'rgba(11,18,32,0.15)' : '#0b1220', color: disabled ? 'rgba(11,18,32,0.45)' : '#ffffff', padding:'14px 22px', borderRadius:12, fontWeight:600, fontSize:15, letterSpacing:'-0.01em', display:'inline-flex', alignItems:'center', gap:10, transition: 'all .18s ease', transform: hover && !disabled ? 'translateY(-1px)' : 'translateY(0)', boxShadow: hover && !disabled ? '0 10px 24px -12px rgba(11,18,32,0.55)' : '0 1px 0 rgba(11,18,32,0.05)', }}> {children} ); }; const GhostButton = ({ children, onClick }) => { const [hover, setHover] = React.useState(false); return ( setHover(true)} onMouseLeave={()=>setHover(false)} style={{ all:'unset', cursor:'pointer', color: hover ? '#0b1220' : 'rgba(11,18,32,0.55)', padding:'14px 14px', borderRadius:12, fontWeight:500, fontSize:14, display:'inline-flex', alignItems:'center', gap:8, transition:'all .18s ease', }}> {children} ); }; Object.assign(window, { ChoiceCard, PrimaryButton, GhostButton });