/* ============================================================================
Bradesco Saúde · Seguros Plano B — ATOMS + chrome
Shared building blocks: Icon (Lucide geometry, inlined for React safety),
Wordmark, Btn, Eyebrow, Chapter, Pill, Badge, Header, Footer.
Exposed on window at the bottom of the file.
========================================================================== */
const WHATSAPP_URL = 'https://wa.me/5514991282926?text=' + encodeURIComponent('Olá! Gostaria de uma cotação do plano de saúde Bradesco Saúde PME.');
const { useState, useEffect, useRef } = React;
/* ---- Icons: real Lucide path geometry, inlined so React owns the DOM ----- */
const LUCIDE = {
check: '',
'arrow-right':'',
'chevron-down':'',
x: '',
plus: '',
menu: '',
phone: '',
'map-pin': '',
users: '',
'shield-check':'',
'heart-pulse':'',
activity: '',
scan: '',
'building-2': '',
hospital: '',
'message-circle':'',
'badge-check':'',
clock: '',
send: '',
headphones: '',
globe: '',
award: '',
eye: '',
star: '',
'circle-check':'',
'trending-up':'',
whatsapp: '',
};
function Icon({ name, size = 22, stroke = 2, fill = 'none', style, className }) {
const d = LUCIDE[name] || '';
return (
);
}
/* ---- Wordmark (typographic — NOT the trademarked Bradesco symbol) -------- */
function Wordmark({ light = false, compact = false, subtitle = true }) {
return (
{!compact && subtitle && (
por Seguros Plano B
)}
);
}
/* ---- Buttons ------------------------------------------------------------- */
function Btn({ children, variant = 'primary', size = 'md', icon, iconLeft, onClick, href, full, light, target, rel }) {
const [hover, setHover] = useState(false);
const [press, setPress] = useState(false);
const pads = size === 'lg' ? '15px 26px' : size === 'sm' ? '9px 16px' : '13px 22px';
const fs = size === 'lg' ? 16 : size === 'sm' ? 14 : 15;
const base = {
fontFamily: 'var(--font-text)', fontWeight: 700, fontSize: fs,
padding: pads, borderRadius: 'var(--r-pill)', border: '1.5px solid transparent',
display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 9,
cursor: 'pointer', textDecoration: 'none', whiteSpace: 'nowrap',
transition: 'all .18s cubic-bezier(.22,1,.36,1)', width: full ? '100%' : 'auto',
transform: press ? 'scale(0.975)' : 'none', lineHeight: 1.1,
};
const styles = {
primary: {
background: hover ? 'var(--brad-red-600)' : 'var(--brad-red)', color: '#fff',
boxShadow: hover ? '0 18px 40px rgba(204,9,47,0.34)' : 'var(--sh-red)',
transform: press ? 'scale(0.975)' : (hover ? 'translateY(-1px)' : 'none'),
},
secondary: {
background: hover ? (light ? 'rgba(255,255,255,0.12)' : 'var(--bg-mute)') : 'transparent',
color: light ? '#fff' : 'var(--ink)',
borderColor: light ? 'rgba(255,255,255,0.5)' : 'var(--line-strong)',
},
ghost: {
background: 'transparent', color: 'var(--brad-red)', padding: size === 'sm' ? '6px 8px' : '8px 10px',
textDecoration: hover ? 'underline' : 'none', textUnderlineOffset: 4,
},
};
const Tag = href ? 'a' : 'button';
return (
setHover(true)} onMouseLeave={() => { setHover(false); setPress(false); }}
onMouseDown={() => setPress(true)} onMouseUp={() => setPress(false)}
style={{ ...base, ...styles[variant] }}>
{iconLeft && }
{children}
{icon && }
);
}
/* ---- Labels -------------------------------------------------------------- */
function Eyebrow({ children, dot = true, light }) {
return (
{dot && }
{children}
);
}
function Chapter({ children }) {
return {children};
}
function Pill({ children, tone = 'red' }) {
const tones = {
red: { bg: 'var(--brad-red)', fg: '#fff' },
soft: { bg: 'var(--brad-red-100)', fg: 'var(--brad-red-700)' },
ink: { bg: 'var(--ink)', fg: '#fff' },
line: { bg: 'transparent', fg: 'var(--slate-600)', border: '1px solid var(--line-strong)' },
}[tone];
return (
{children}
);
}
/* ---- Header -------------------------------------------------------------- */
function Header() {
const [scrolled, setScrolled] = useState(false);
const [menu, setMenu] = useState(false);
useEffect(() => {
const el = document.querySelector('.kit-scroll') || window;
const onScroll = () => setScrolled((el.scrollTop || window.scrollY) > 24);
el.addEventListener('scroll', onScroll); return () => el.removeEventListener('scroll', onScroll);
}, []);
const links = [['Hospital Santa Lúcia', '#hospital'], ['Planos PME', '#planos'], ['Como funciona', '#como'], ['Dúvidas', '#duvidas']];
return (
);
}
function NavLink({ href, children }) {
const [h, setH] = useState(false);
return (
setH(true)} onMouseLeave={() => setH(false)}
style={{
fontFamily: 'var(--font-text)', fontWeight: 600, fontSize: 14.5,
color: h ? 'var(--brad-red)' : 'var(--ink-700)', textDecoration: 'none',
transition: 'color .15s ease',
}}>{children}
);
}
/* ---- Footer -------------------------------------------------------------- */
function Footer() {
const col = (title, items) => (
{title}
{items.map((it, i) => (
- {it}
))}
);
return (
);
}
function FootBadge({ children }) {
return {children};
}
Object.assign(window, { WHATSAPP_URL, Icon, Wordmark, Btn, Eyebrow, Chapter, Pill, Header, NavLink, Footer });