class CustomPricingCard extends HTMLElement { static get observedAttributes() { return ['tier', 'price', 'features', 'popular']; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } render() { const tier = this.getAttribute('tier') || 'starter'; const price = this.getAttribute('price') || '0'; const features = JSON.parse(this.getAttribute('features') || '[]'); const isPopular = this.getAttribute('popular') === 'true'; const tierConfig = { starter: { name: 'Starter', color: '#94a3b8', gradient: 'from-slate-500 to-slate-600' }, creator: { name: 'Creator', color: '#0ea5e9', gradient: 'from-primary-500 to-secondary-500' }, enterprise: { name: 'Enterprise', color: '#d946ef', gradient: 'from-secondary-500 to-accent-500' } }; const config = tierConfig[tier]; this.shadowRoot.innerHTML = `
${isPopular ? 'Most Popular' : ''}

${config.name}

$${price} /month
${features.map(f => `
${f}
`).join('')}
Max Resolution ${tier === 'starter' ? '4K (3840×2160)' : tier === 'creator' ? '8K (7680×4320)' : '20K+ Unlimited'}
File Format ${tier === 'starter' ? 'PNG/JPG' : tier === 'creator' ? 'PNG/TIFF' : 'All + RAW'}
`; if (window.feather) { setTimeout(() => feather.replace(), 0); } } } customElements.define('custom-pricing-card', CustomPricingCard);