// ═══════════════════════════════════════════════════════════════════
// KINGDOMID CLIENT DASHBOARD — Upgrade Prompt System
// Niche-specific, Kingdom-branded upsell for every locked system
// Language: Kingdom ecosystem only — never generic "AI" language
// ═══════════════════════════════════════════════════════════════════

import { useClient } from '../hooks/useClient';

// ── System metadata ───────────────────────────────────────────────
export interface SystemMeta {
  name:        string;
  icon:        string;
  plan:        'growth' | 'premium';
  planLabel:   string;
  planPrice:   string;
  tagline:     string;
}

export const SYSTEMS: Record<string, SystemMeta> = {
  kingdom_schedule: {
    name:      'KingdomSchedule',
    icon:      '📅',
    plan:      'growth',
    planLabel: 'Growth',
    planPrice: '$1,497/mo',
    tagline:   'Complete appointment management for your business',
  },
  kingdom_review: {
    name:      'KingdomReview',
    icon:      '⭐',
    plan:      'growth',
    planLabel: 'Growth',
    planPrice: '$1,497/mo',
    tagline:   'Automated review generation and reputation management',
  },
  kingdom_nurture: {
    name:      'KingdomNurture',
    icon:      '🌱',
    plan:      'growth',
    planLabel: 'Growth',
    planPrice: '$1,497/mo',
    tagline:   'Long-term relationship sequences that keep clients coming back',
  },
  kingdom_content: {
    name:      'KingdomContent',
    icon:      '✍️',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Kingdom-aligned content created automatically for your business',
  },
  kingdom_desk: {
    name:      'KingdomDesk',
    icon:      '🎧',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Your staff\'s AI-powered knowledge assistant',
  },
  kingdom_referral: {
    name:      'KingdomReferral',
    icon:      '🤝',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Automated referral tracking and reward system',
  },
  kingdom_insights: {
    name:      'KingdomInsights',
    icon:      '📊',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Monthly performance reports showing your Kingdom ROI',
  },
  kingdom_outreach: {
    name:      'KingdomOutreach',
    icon:      '📣',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Proactive outreach campaigns to win back lost clients',
  },
  kingdom_network: {
    name:      'KingdomNetwork',
    icon:      '🌐',
    plan:      'premium',
    planLabel: 'Premium',
    planPrice: '$2,497/mo',
    tagline:   'Private community of Kingdom-aligned businesses like yours',
  },
};

// ── Niche-specific upgrade copy ───────────────────────────────────
// Each niche gets custom body copy per system
// Language: Kingdom ecosystem, never generic "AI"

type NicheCopy = {
  headline:   string;
  body:       string;
  benefits:   string[];
  cta:        string;
};

type SystemCopy = Partial<Record<string, NicheCopy>>;
type NicheUpgradeCopy = Partial<Record<string, SystemCopy>>;

export const UPGRADE_COPY: NicheUpgradeCopy = {

  // ── CHRISTIAN COUNSELING ────────────────────────────────────────
  christian_counseling: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist is Booking Sessions — Give Those Sessions a Home',
      body:     'Every time KingdomVoice books a counseling session, that appointment needs a place to live. KingdomSchedule gives your practice a complete scheduling system built specifically for counselors — with session type management, counselor calendars, and the compassionate reminders your clients need to actually show up.',
      benefits: [
        'Session booking organized by counselor and session type',
        'Automated compassionate reminders that reduce no-shows',
        'Crisis appointment priority flagging',
        'Integration with your KingdomVoice bookings',
        'Client self-scheduling for returning clients',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Your Practice\'s Reputation Is Being Built Every Day — Are You Capturing It?',
      body:     'Every client who experiences healing and breakthrough at your practice is a potential testimony. KingdomReview automatically reaches out after sessions to gather feedback and guide satisfied clients to share their story — building the reputation that brings the next family through your door.',
      benefits: [
        'Automated post-session review requests via KingdomReach',
        'Sensitive, faith-aligned review request language',
        'Review monitoring across Google and other platforms',
        'Negative feedback private routing to protect your reputation',
        'Monthly reputation report in your KingdomInsights dashboard',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'The Journey Doesn\'t End When the Session Does',
      body:     'Healing is a process, not a one-time event. KingdomNurture keeps your practice connected to clients between sessions and after they complete their program — with Kingdom-aligned follow-up sequences that show you care, reduce drop-off, and bring clients back when they need support again.',
      benefits: [
        'Between-session check-in messages via KingdomReach',
        'Re-engagement sequences for clients who stopped coming',
        'Seasonal faith-based outreach (prayer initiatives, new year check-ins)',
        'Referral prompts built into the follow-up sequence',
        'Scripture and encouragement woven throughout',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
    kingdom_insights: {
      headline: 'Know Exactly What Your KingdomID Platform Is Producing',
      body:     'Your KingdomVoice Receptionist answers every call. Your KingdomReach system follows up. KingdomInsights shows you what all of it is producing — calls handled, appointments booked, no-shows prevented, reviews generated, and the revenue impact of your Kingdom Growth systems working together.',
      benefits: [
        'Monthly Kingdom ROI report delivered to your inbox',
        'Call volume, booking rate, and no-show reduction metrics',
        'KingdomReach SMS performance and response rates',
        'Review generation progress and reputation score',
        'Year-over-year growth tracking',
      ],
      cta: 'Upgrade to Premium and activate KingdomInsights',
    },
  },

  // ── SENIOR CARE ─────────────────────────────────────────────────
  senior_care: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Booking Care Assessments — Now Manage Them All in One Place',
      body:     'When KingdomVoice books a free in-home care assessment, that appointment needs to be tracked, staffed, and followed up. KingdomSchedule gives your agency a complete assessment and care visit management system — from first inquiry to ongoing care schedule.',
      benefits: [
        'Care assessment scheduling with assigned care coordinators',
        'Ongoing care visit calendar management',
        'Family notification when care visits are scheduled',
        'Caregiver assignment and coverage management',
        'Automated assessment reminder sequences',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Families Trust Other Families — Let KingdomReview Capture That Trust',
      body:     'When a family experiences peace of mind knowing their loved one is cared for, that testimony is priceless. KingdomReview reaches out at the right moment to gather feedback and guide satisfied families to share their experience — building the credibility that brings the next family to your agency.',
      benefits: [
        'Automated review requests timed for maximum impact',
        'Family-sensitive, compassionate language throughout',
        'Google and care directory review management',
        'Negative experience private routing',
        'Testimonial capture for your marketing',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Stay Connected to Every Family — Even Before They\'re Ready to Start Care',
      body:     'Most families who call aren\'t ready to start care immediately — they\'re researching, processing, and preparing. KingdomNurture keeps your agency in front of them with compassionate, Kingdom-aligned follow-up so that when they\'re ready, you\'re the first call they make.',
      benefits: [
        'Long-term nurture sequences for families not yet ready',
        'Holiday and seasonal check-in messages',
        'Caregiver milestone celebration outreach',
        'Anniversary of care start messages to strengthen loyalty',
        'Referral prompts for satisfied families',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── MEDICAL / PEDIATRIC ─────────────────────────────────────────
  medical_pediatric: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Filling Your Schedule — Now Manage Every Appointment in One Place',
      body:     'KingdomVoice is handling your incoming calls and booking appointments around the clock. KingdomSchedule gives your practice the appointment management backbone to see your full schedule, reduce no-shows with automated reminders, and keep every patient on track with their care.',
      benefits: [
        'Complete appointment calendar for all providers',
        'Well-visit scheduling with age-based reminders',
        'Automated appointment reminders to reduce no-shows',
        'Sick visit same-day slot management',
        'Patient self-scheduling for returning patients',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Parents Recommend Pediatricians to Each Other — Make Sure Yours Are Recommending You',
      body:     'Every parent who leaves your practice feeling cared for is a potential referral. KingdomReview automatically reaches out after appointments to gather feedback and guide happy patients to share their experience — building the online reputation that brings the next family through your door.',
      benefits: [
        'Post-visit review requests via KingdomReach SMS',
        'HIPAA-aware, professional review request language',
        'Google and Healthgrades review management',
        'Negative feedback private routing',
        'New patient attribution tracking',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Keep Every Patient Connected to Your Practice Between Visits',
      body:     'Patients who feel connected to their provider stay loyal to their provider. KingdomNurture keeps your practice present in patients\' lives between visits — with well-visit reminders, seasonal health tips, and Kingdom-aligned messages that show you care about more than just the appointment.',
      benefits: [
        'Annual well-visit reminder sequences',
        'Seasonal health reminders (flu season, back to school)',
        'Post-illness follow-up check-in messages',
        'Birthday messages for pediatric patients',
        'Inactive patient re-engagement sequences',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── CHIROPRACTIC / PT ───────────────────────────────────────────
  chiropractic_pt: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Booking New Patients — Give Your Treatment Plans a Complete Home',
      body:     'New patients are booking through KingdomVoice. KingdomSchedule gives your practice a complete appointment management system to track multi-visit treatment plans, manage provider schedules, and keep every patient on their path to healing.',
      benefits: [
        'Multi-visit treatment plan scheduling',
        'Provider calendar management across all practitioners',
        'Automated appointment reminders that reduce no-shows',
        'Auto accident case visit tracking',
        'Patient self-scheduling for established patients',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Pain Relief Gets Talked About — Make Sure That Talk Leads Back to You',
      body:     'When a patient walks out of your office standing straight after months of pain, they want to tell someone. KingdomReview captures that moment with perfectly timed outreach — building a stream of 5-star reviews that become your strongest referral source.',
      benefits: [
        'Post-appointment review requests timed after initial relief',
        'Google and Yelp review management',
        'Auto accident case completion testimonial capture',
        'Negative feedback private routing',
        'Review performance dashboard',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Treatment Ends — But the Relationship Doesn\'t Have To',
      body:     'Most patients discharge when they feel better, not when they\'re fully optimized. KingdomNurture keeps your practice connected to discharged patients with maintenance care reminders, seasonal check-ins, and re-engagement sequences that bring them back before a small issue becomes a big one.',
      benefits: [
        'Post-discharge maintenance care reminder sequences',
        'Seasonal re-engagement (winter aches, spring sports)',
        'Auto accident anniversary check-in messages',
        'Wellness milestone celebration outreach',
        'Referral prompts for patients who achieved great results',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── CHRISTIAN SCHOOL ─────────────────────────────────────────────
  christian_school: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Booking School Tours — Now Manage Every Step of Enrollment',
      body:     'When a family calls and books a tour through KingdomVoice, that family is beginning a journey. KingdomSchedule manages every step — from tour scheduling to admissions interviews to enrollment deadlines — giving your admissions team a complete system to shepherd families through the process.',
      benefits: [
        'Campus tour scheduling with admissions team assignment',
        'Enrollment milestone tracking and deadline management',
        'Parent-teacher conference scheduling',
        'Open house event management',
        'Admissions funnel visibility from first call to enrollment',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Kingdom-Minded Parents Trust Kingdom-Minded Parents — Capture That Trust',
      body:     'The most powerful referral source for a Christian school is a parent who is transformed by the community. KingdomReview reaches out to enrolled families at the right moments to gather testimonials and guide them to share their experience — building the reputation that fills your enrollment roster.',
      benefits: [
        'New school year satisfaction surveys',
        'Mid-year and end-of-year review requests',
        'Google and private school directory reviews',
        'Graduation season testimonial capture',
        'Prospective family social proof library',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Keep Prospective Families Warm From First Inquiry to Enrollment Decision',
      body:     'Most families who inquire about enrollment aren\'t ready to decide immediately — they\'re praying, comparing options, and waiting on God\'s direction. KingdomNurture keeps your school present and compelling throughout that process with Kingdom-aligned follow-up that honors their timeline.',
      benefits: [
        'Prospective family long-term nurture sequences',
        'Application deadline reminder sequences',
        'Enrolled family community-building outreach',
        'Alumni re-engagement for legacy family enrollment',
        'Kingdom content and school news drip sequences',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── VETERINARY ──────────────────────────────────────────────────
  veterinary: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Booking Pet Appointments — Manage Every Visit in One Place',
      body:     'KingdomVoice is handling your incoming calls and booking appointments day and night. KingdomSchedule gives your clinic the complete appointment system to manage wellness visits, surgical cases, and follow-up care — with automated reminders that make sure pet parents show up.',
      benefits: [
        'Complete appointment calendar for all veterinarians',
        'Wellness reminder sequences tied to pet profiles',
        'Surgical case pre-op and post-op scheduling',
        'Automated appointment reminder sequences',
        'Pet parent self-scheduling for established patients',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Pet Parents Are Passionate — Let KingdomReview Turn That Passion Into Your Reputation',
      body:     'Pet owners who love their veterinarian tell everyone they know. KingdomReview reaches out after visits to capture that loyalty — building a stream of heartfelt reviews that become your clinic\'s most powerful marketing asset.',
      benefits: [
        'Post-visit review requests via KingdomReach',
        'Sensitive outreach timing for difficult cases',
        'Google and Yelp veterinary review management',
        'Negative feedback private routing',
        'New client attribution from reviews',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Every Pet Has a Health Journey — Stay Part of It',
      body:     'Wellness care is ongoing, but busy pet parents forget. KingdomNurture keeps your clinic connected between visits with vaccine reminder sequences, annual wellness prompts, and seasonal health tips that position your clinic as a trusted partner in every pet\'s life.',
      benefits: [
        'Vaccine and wellness reminder sequences by pet profile',
        'Seasonal parasite prevention reminders',
        'Post-surgery recovery check-in messages',
        'Senior pet bi-annual care reminder sequences',
        'Birthday messages for furry patients',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── FUNERAL HOME ────────────────────────────────────────────────
  funeral_home: {
    kingdom_schedule: {
      headline: 'Every Arrangement Conference Deserves Complete Organization and Care',
      body:     'When a family reaches out to begin funeral arrangements, every detail matters. KingdomSchedule gives your funeral home a dignified, organized system to manage arrangement conferences, service schedules, and the dozens of touchpoints involved in caring for a grieving family.',
      benefits: [
        'Arrangement conference scheduling with director assignment',
        'Service timeline and venue coordination management',
        'Pre-planning appointment scheduling',
        'Family follow-up grief support appointment tracking',
        'Veterans honors coordination scheduling',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Families Remember How You Made Them Feel — Let KingdomReview Capture That Legacy',
      body:     'When a family says your funeral home gave their loved one the send-off they deserved, that testimony is sacred. KingdomReview reaches out at the right moment — with sensitivity and grace — to gather that feedback and guide families to share their experience for others who will need you.',
      benefits: [
        'Grief-sensitive review request timing and language',
        'Google and funeral home directory review management',
        'Negative experience private routing',
        'Pre-need client testimonial capture',
        'Reputation monitoring across platforms',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'The Relationship With a Family Doesn\'t End After the Service',
      body:     'Families who feel cared for after the service return for pre-planning, refer others who are in need, and become advocates for your funeral home for generations. KingdomNurture keeps your funeral home connected to families with dignified, Kingdom-aligned follow-up that honors the relationship.',
      benefits: [
        'First anniversary of loss compassionate check-in',
        'Grief support resource sharing sequences',
        'Pre-planning introduction sequences for at-risk demographics',
        'Holiday season compassionate outreach',
        'Memorial anniversary messages for ongoing connection',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── FAMILY LAW ──────────────────────────────────────────────────
  family_law: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Booking Consultations — Manage Every Case From First Call',
      body:     'Initial consultations are booked through KingdomVoice. KingdomSchedule gives your firm the complete case and appointment management system to track every consultation, follow-up, and client meeting from first contact through case resolution.',
      benefits: [
        'Initial consultation scheduling with attorney assignment',
        'Follow-up appointment and deadline management',
        'Court date and filing deadline calendar',
        'Client meeting scheduling portal',
        'Case milestone tracking from intake to resolution',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Clients Who Found Justice Through Your Firm Want to Help Others Find It Too',
      body:     'When a parent gets the custody arrangement their children needed, or a family navigates divorce with their dignity intact, they want to help others find the same representation. KingdomReview reaches out at the right moment to capture that story and build your firm\'s reputation.',
      benefits: [
        'Post-case-resolution review request sequences',
        'Google and attorney directory review management',
        'Sensitive timing for difficult case outcomes',
        'Negative feedback private routing',
        'Attorney profile review building',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'The Relationship With a Client Extends Beyond Their Case',
      body:     'Family law clients often return — for modifications, new matters, or referrals of family and friends. KingdomNurture keeps your firm in front of former clients with Kingdom-aligned, professional follow-up that maintains the relationship and generates the referrals that grow your practice.',
      benefits: [
        'Post-case check-in sequences for modification awareness',
        'Annual legal review reminder sequences',
        'Holiday professional outreach to maintain relationships',
        'Referral request sequences for satisfied clients',
        'New matter re-engagement for returning clients',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── HOME SERVICES ───────────────────────────────────────────────
  home_services: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Dispatching Calls — Now Manage Every Job From Booking to Completion',
      body:     'KingdomVoice is handling your inbound service calls and routing them to your team. KingdomSchedule gives your business the complete job management system — from initial booking to technician dispatch to completion follow-up — so no job falls through the cracks.',
      benefits: [
        'Service appointment scheduling with technician assignment',
        'Job dispatch and route management',
        'Automated appointment confirmation and reminder sequences',
        'Seasonal maintenance scheduling and outreach',
        'Emergency service slot management',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'Homeowners Talk to Their Neighbors — Make Sure They\'re Talking About You',
      body:     'When a homeowner\'s heat goes out in January and your team shows up fast and fixes it right, they\'re going to tell their neighbor. KingdomReview captures that moment with perfectly timed outreach — building the online reputation that makes you the first call in your market.',
      benefits: [
        'Post-service review requests via KingdomReach',
        'Google and Nextdoor review management',
        'Negative experience private routing',
        'Seasonal campaign review building (summer AC, winter heat)',
        'Market-area reputation dominance tracking',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Seasonal Maintenance Creates Year-Round Revenue — KingdomNurture Automates It',
      body:     'Every homeowner needs HVAC tune-ups, plumbing inspections, and electrical checks — they just forget to schedule them. KingdomNurture runs seasonal outreach sequences that remind your existing customers before their system fails and a competitor gets the call.',
      benefits: [
        'Spring and fall HVAC maintenance reminder sequences',
        'Annual plumbing and electrical inspection prompts',
        'Membership plan renewal and upgrade sequences',
        'Referral program sequences for satisfied customers',
        'Emergency preparedness tip sequences that build trust',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },

  // ── CHURCH / MINISTRY ───────────────────────────────────────────
  church_ministry: {
    kingdom_schedule: {
      headline: 'Your KingdomVoice Receptionist Is Connecting People — Now Manage Every Next Step',
      body:     'When someone calls your church and books a tour, a counseling session, or a membership class, KingdomSchedule makes sure that next step actually happens. Complete scheduling for every ministry event, pastoral meeting, and congregant connection your team manages.',
      benefits: [
        'Membership class and baptism appointment scheduling',
        'Pastoral counseling and care visit scheduling',
        'Small group leader meeting management',
        'New visitor follow-up appointment booking',
        'Ministry event and volunteer scheduling',
      ],
      cta: 'Upgrade to Growth and activate KingdomSchedule',
    },
    kingdom_review: {
      headline: 'People Who Encounter God Through Your Church Want to Tell Others — Let KingdomReview Capture That',
      body:     'Every person whose life is transformed through your ministry is a testimony waiting to be shared. KingdomReview reaches out to new members and engaged congregants to gather their stories and guide them to share — expanding your reach into the community beyond your walls.',
      benefits: [
        'New member 90-day review and testimonial request',
        'Google and church directory review management',
        'Community impact testimonial capture',
        'Baptism and milestone celebration story collection',
        'Visitor-to-member conversion tracking',
      ],
      cta: 'Upgrade to Growth and activate KingdomReview',
    },
    kingdom_nurture: {
      headline: 'Connection Is the Foundation of a Thriving Church — KingdomNurture Keeps It Strong',
      body:     'People don\'t leave churches because they disagree with the theology — they leave because they never felt truly connected. KingdomNurture keeps your church in intentional contact with every visitor, new member, and at-risk congregant — so more people find their home in your community.',
      benefits: [
        'New visitor 30-60-90 day follow-up sequences',
        'Inactive member re-engagement sequences',
        'Small group connection follow-up after events',
        'Prayer request follow-up sequences',
        'Seasonal faith-based community outreach campaigns',
      ],
      cta: 'Upgrade to Growth and activate KingdomNurture',
    },
  },
};

// ── Fallback copy for niches without specific copy ────────────────
const DEFAULT_COPY: Record<string, NicheCopy> = {
  kingdom_schedule: {
    headline: 'Your KingdomVoice Receptionist Is Booking Appointments — Give Them a Complete Home',
    body:     'KingdomVoice handles every incoming call and books appointments around the clock. KingdomSchedule gives those appointments a complete management system — with provider calendars, automated reminders, and a full view of your schedule from one Kingdom-powered dashboard.',
    benefits: [
      'Complete appointment calendar management',
      'Automated reminder sequences via KingdomReach',
      'Provider and staff scheduling',
      'Online self-scheduling for returning clients',
      'No-show reduction and rebooking sequences',
    ],
    cta: 'Upgrade to Growth and activate KingdomSchedule',
  },
  kingdom_review: {
    headline: 'Every Satisfied Client Is a Testimony — KingdomReview Makes Sure It Gets Shared',
    body:     'Your KingdomVoice Receptionist and KingdomReach system are building relationships with every person who contacts your business. KingdomReview captures the satisfaction those relationships create and turns it into the reviews and referrals that grow your business.',
    benefits: [
      'Automated review requests via KingdomReach',
      'Google and directory review management',
      'Negative feedback private routing',
      'Reputation monitoring and reporting',
      'Review performance dashboard',
    ],
    cta: 'Upgrade to Growth and activate KingdomReview',
  },
  kingdom_nurture: {
    headline: 'The Relationship Doesn\'t End After the First Visit',
    body:     'KingdomNurture keeps your business connected to every client — between visits, after service, and through the seasons — with Kingdom-aligned follow-up sequences that show you care and keep your business top of mind when they need you again.',
    benefits: [
      'Long-term follow-up sequences via KingdomReach',
      'Seasonal outreach and re-engagement campaigns',
      'Client milestone and anniversary messages',
      'Referral generation sequences',
      'Inactive client win-back campaigns',
    ],
    cta: 'Upgrade to Growth and activate KingdomNurture',
  },
  kingdom_content: {
    headline: 'Kingdom-Aligned Content Created Automatically for Your Business',
    body:     'KingdomContent works with your KingdomVoice call data and KingdomCRM contacts to generate faith-aligned social posts, email newsletters, and blog content that positions your business as a trusted authority in your community.',
    benefits: [
      'Weekly social media content generated from your niche',
      'Monthly email newsletter creation',
      'FAQ-based blog content for SEO',
      'Kingdom-aligned content calendar management',
      'Performance tracking across all content',
    ],
    cta: 'Upgrade to Premium and activate KingdomContent',
  },
  kingdom_desk: {
    headline: 'Give Your Team a Kingdom-Powered Knowledge Assistant',
    body:     'KingdomDesk gives every member of your staff instant access to your business knowledge base — policies, procedures, scripts, and FAQs — so they can serve clients with confidence and consistency, backed by the same Kingdom systems powering your entire platform.',
    benefits: [
      'Staff-facing knowledge base trained on your business',
      'Instant answers to client questions during calls',
      'Onboarding and training content management',
      'Script and objection handling library',
      'Integration with your KingdomVoice call data',
    ],
    cta: 'Upgrade to Premium and activate KingdomDesk',
  },
  kingdom_referral: {
    headline: 'Your Best Clients Know People Just Like Them — KingdomReferral Makes It Easy to Ask',
    body:     'Word-of-mouth is still the most powerful growth engine for local businesses. KingdomReferral automates your referral program — tracking who referred whom, rewarding loyal clients, and making it effortless for satisfied clients to send others your way.',
    benefits: [
      'Automated referral request sequences via KingdomReach',
      'Referral tracking and attribution in KingdomCRM',
      'Reward and recognition program management',
      'Referral performance dashboard in KingdomInsights',
      'Kingdom Network referral amplification',
    ],
    cta: 'Upgrade to Premium and activate KingdomReferral',
  },
  kingdom_insights: {
    headline: 'See Exactly What Your Kingdom Growth Platform Is Producing',
    body:     'KingdomInsights gives you a complete monthly report of everything your KingdomID platform is doing — calls answered, appointments booked, messages sent, reviews generated, and the revenue impact of every system working together for your business.',
    benefits: [
      'Monthly Kingdom ROI report delivered to your inbox',
      'KingdomVoice call volume and booking conversion metrics',
      'KingdomReach SMS performance and response rates',
      'KingdomReview reputation and growth metrics',
      'Year-over-year business growth tracking',
    ],
    cta: 'Upgrade to Premium and activate KingdomInsights',
  },
  kingdom_outreach: {
    headline: 'Proactively Win Back Lost Clients Before They Go Somewhere Else',
    body:     'KingdomOutreach identifies clients in your KingdomCRM who haven\'t been in recently and launches proactive re-engagement campaigns — Kingdom-aligned messages that bring people back before they\'ve fully decided to leave.',
    benefits: [
      'Automated inactive client identification from KingdomCRM',
      'Win-back campaign sequences via KingdomReach',
      'Seasonal re-engagement campaigns',
      'Lost opportunity recovery tracking',
      'Re-engagement performance reporting in KingdomInsights',
    ],
    cta: 'Upgrade to Premium and activate KingdomOutreach',
  },
  kingdom_network: {
    headline: 'Join a Private Community of Kingdom-Aligned Business Owners Like You',
    body:     'KingdomNetwork connects you with a curated community of faith-aligned business owners across your region and industry — for referrals, collaboration, prayer, and the kind of Kingdom-minded business relationships that change everything.',
    benefits: [
      'Private community of vetted Kingdom business owners',
      'Cross-referral opportunities with complementary businesses',
      'Monthly Kingdom business owner mastermind sessions',
      'Prayer and support network for business challenges',
      'Kingdom marketplace for business-to-business collaboration',
    ],
    cta: 'Upgrade to Premium and activate KingdomNetwork',
  },
};

// ── Upgrade Prompt Component ──────────────────────────────────────
interface UpgradePromptProps {
  module: string;
}

export default function UpgradePrompt({ module }: UpgradePromptProps) {
  const { client } = useClient();
  const system     = SYSTEMS[module];

  if (!system) return null;

  const niche      = client?.niche || 'other';
  const nicheCopy  = UPGRADE_COPY[niche]?.[module];
  const copy       = nicheCopy || DEFAULT_COPY[module];

  if (!copy) return null;

  return (
    <div style={{ padding: '32px 24px', maxWidth: 680, margin: '0 auto' }}>

      {/* Lock badge */}
      <div style={{
        display:        'inline-flex',
        alignItems:     'center',
        gap:            8,
        background:     'var(--gold-pale)',
        border:         '1.5px solid var(--gold)',
        borderRadius:   20,
        padding:        '4px 14px',
        fontSize:       12,
        fontWeight:     700,
        color:          '#7a5f00',
        marginBottom:   20,
      }}>
        🔒 Upgrade to {system.planLabel} to unlock {system.name}
      </div>

      {/* Icon + headline */}
      <div style={{ fontSize: '2.5rem', marginBottom: 12 }}>{system.icon}</div>
      <h2 style={{ fontSize: '1.3rem', color: 'var(--navy)', marginBottom: 12, lineHeight: 1.3 }}>
        {copy.headline}
      </h2>
      <p style={{ fontSize: 14, color: 'var(--gray-600)', lineHeight: 1.8, marginBottom: 24 }}>
        {copy.body}
      </p>

      {/* Benefits */}
      <div style={{
        background:    'var(--white)',
        border:        '1px solid var(--gray-200)',
        borderRadius:  'var(--radius)',
        padding:       '20px 24px',
        marginBottom:  24,
      }}>
        <div style={{
          fontSize:       11,
          fontWeight:     700,
          letterSpacing:  1.5,
          textTransform:  'uppercase',
          color:          'var(--gray-400)',
          marginBottom:   14,
        }}>
          What {system.name} Includes
        </div>
        <div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
          {copy.benefits.map((benefit, i) => (
            <div key={i} style={{ display: 'flex', alignItems: 'flex-start', gap: 10 }}>
              <div style={{
                width:           20,
                height:          20,
                borderRadius:    '50%',
                background:      'var(--gold-pale)',
                display:         'flex',
                alignItems:      'center',
                justifyContent:  'center',
                flexShrink:      0,
                fontSize:        11,
                color:           'var(--gold)',
                fontWeight:      700,
                marginTop:       1,
              }}>
                ✓
              </div>
              <span style={{ fontSize: 13, color: 'var(--gray-700)', lineHeight: 1.6 }}>{benefit}</span>
            </div>
          ))}
        </div>
      </div>

      {/* Plan info */}
      <div style={{
        background:    'linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%)',
        borderRadius:  'var(--radius)',
        padding:       '20px 24px',
        marginBottom:  20,
        display:       'flex',
        alignItems:    'center',
        justifyContent:'space-between',
        gap:           16,
      }}>
        <div>
          <div style={{ color: 'rgba(255,255,255,0.6)', fontSize: 11, fontWeight: 700, letterSpacing: 1, textTransform: 'uppercase', marginBottom: 4 }}>
            Available on {system.planLabel} Plan
          </div>
          <div style={{ color: 'var(--gold)', fontSize: '1.3rem', fontWeight: 700 }}>
            {system.planPrice}
          </div>
          <div style={{ color: 'rgba(255,255,255,0.5)', fontSize: 12, marginTop: 2 }}>
            {system.plan === 'growth'
              ? 'Includes KingdomVoice, KingdomReach, KingdomCRM, KingdomSchedule, KingdomReview, and KingdomNurture'
              : 'All 12 Kingdom Growth Systems included'}
          </div>
        </div>
        <div style={{ flexShrink: 0 }}>
          <div style={{
            background:    'var(--gold)',
            color:         'var(--navy)',
            padding:       '10px 20px',
            borderRadius:  'var(--radius-sm)',
            fontWeight:    700,
            fontSize:      13,
            cursor:        'pointer',
            whiteSpace:    'nowrap',
          }}>
            Contact Your Advisor →
          </div>
        </div>
      </div>

      <p style={{ fontSize: 12, color: 'var(--gray-400)', textAlign: 'center' }}>
        Contact your KingdomID account advisor to upgrade. Upgrades take effect immediately.
      </p>

    </div>
  );
}
