/* ============================================
   AI Lead Capture Flow Card
   Self-contained widget visualizing
   Marketing → AI Agent → CRM bookings.
   All styles scoped under .ai-flow-card.
   ============================================ */

.ai-flow-card {
  --afc-navy: #0F2B46;
  --afc-navy-2: #132F4C;
  --afc-teal: #00B4D8;
  --afc-orange: #FF6B2B;
  --afc-green: #10B981;
  --afc-purple: #7C3AED;
  --afc-white: #FFFFFF;
  --afc-g50: #F8FAFC;
  --afc-g100: #F1F5F9;
  --afc-g200: #E2E8F0;
  --afc-g400: #94A3B8;
  --afc-g500: #64748B;
  --afc-g600: #475569;

  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid var(--afc-g200);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 14px 44px rgba(15, 43, 70, 0.10), 0 2px 8px rgba(15, 43, 70, 0.05);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  overflow: hidden;
}

.ai-flow-card *,
.ai-flow-card *::before,
.ai-flow-card *::after {
  box-sizing: border-box;
}

/* ============= HEADER ============= */
.ai-flow-card .afc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--afc-g200);
}

.ai-flow-card .afc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--afc-g500);
}

.ai-flow-card .afc-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--afc-green);
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.20);
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.ai-flow-card .afc-pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--afc-green);
  border-radius: 50%;
  animation: afcPulse 2s ease-in-out infinite;
}

@keyframes afcPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  50% { transform: scale(1.15); opacity: 0.8; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* ============= STAGE LABEL ============= */
.ai-flow-card .afc-stage {
  margin-bottom: 4px;
}

.ai-flow-card .afc-stage-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--afc-g500);
  margin-bottom: 8px;
  text-align: center;
}

/* ============= PILLS ============= */
.ai-flow-card .afc-pill-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-flow-card .afc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--afc-white);
  border: 1px solid var(--afc-g200);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--afc-navy);
  box-shadow: 0 1px 2px rgba(15, 43, 70, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.ai-flow-card .afc-pill::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--afc-pill-color, var(--afc-teal));
}

.ai-flow-card .afc-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 43, 70, 0.10);
  border-color: color-mix(in srgb, var(--afc-pill-color, var(--afc-teal)) 40%, transparent);
}

.ai-flow-card .afc-pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ai-flow-card .afc-pill-dest {
  justify-content: center;
  padding: 11px 12px;
}

/* ============= ARROW DOWN ============= */
.ai-flow-card .afc-arrow-down {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 8px;
  color: var(--afc-teal);
  animation: afcArrow 1.8s ease-in-out infinite;
}

.ai-flow-card .afc-arrow-down svg {
  width: 22px;
  height: 22px;
}

@keyframes afcArrow {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* ============= AI CORE ============= */
.ai-flow-card .afc-core {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--afc-navy) 0%, var(--afc-navy-2) 100%);
  border-radius: 14px;
  margin: 4px 0 6px;
  box-shadow: 0 8px 24px rgba(15, 43, 70, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.ai-flow-card .afc-core::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200px 80px at 30% 0%, rgba(0, 180, 216, 0.18), transparent 70%),
    radial-gradient(ellipse 160px 80px at 80% 100%, rgba(255, 107, 43, 0.12), transparent 70%);
  pointer-events: none;
}

.ai-flow-card .afc-core-orb {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #00D8FF 0%, var(--afc-teal) 50%, #007EA8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--afc-white);
  box-shadow: 0 4px 14px rgba(0, 180, 216, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  z-index: 1;
}

.ai-flow-card .afc-core-orb svg {
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 2;
}

.ai-flow-card .afc-core-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 180, 216, 0.45);
  pointer-events: none;
}

.ai-flow-card .afc-core-ring-1 {
  inset: -8px;
  animation: afcRing 2.6s ease-out infinite;
}

.ai-flow-card .afc-core-ring-2 {
  inset: -14px;
  animation: afcRing 2.6s ease-out infinite 1.3s;
}

@keyframes afcRing {
  0% { transform: scale(0.85); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

.ai-flow-card .afc-core-text {
  position: relative;
  z-index: 1;
}

.ai-flow-card .afc-core-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--afc-white);
  letter-spacing: -0.01em;
}

.ai-flow-card .afc-core-meta {
  font-size: 11.5px;
  color: rgba(226, 232, 240, 0.85);
  margin-top: 2px;
  font-weight: 500;
}

/* ============= STATS ============= */
.ai-flow-card .afc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--afc-g200);
}

.ai-flow-card .afc-stat {
  text-align: center;
}

.ai-flow-card .afc-stat-mid {
  border-left: 1px solid var(--afc-g200);
  border-right: 1px solid var(--afc-g200);
}

.ai-flow-card .afc-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--afc-navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

.ai-flow-card .afc-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--afc-g500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 520px) {
  .ai-flow-card {
    padding: 18px 16px 16px;
    max-width: 100%;
  }
  .ai-flow-card .afc-pill {
    font-size: 11.5px;
    padding: 8px 10px;
  }
  .ai-flow-card .afc-core-orb {
    width: 48px;
    height: 48px;
  }
  .ai-flow-card .afc-core-orb svg {
    width: 22px;
    height: 22px;
  }
  .ai-flow-card .afc-core-title {
    font-size: 13.5px;
  }
  .ai-flow-card .afc-stat-num {
    font-size: 16px;
  }
}
