/**
 * Dental funnel — WP shell overrides + scroll-reveal (Lovable/Framer parity).
 * Base visuals come from dental-funnel-lovable.css.
 */

html:has(body.dental-funnel-body),
.dental-funnel-body {
  margin: 0;
  background: oklch(97.7% 0.012 248);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  color: oklch(23.5% 0.06 257);
}

.dental-funnel-body .site-header,
.dental-funnel-body .mobile-panel,
.dental-funnel-body .nav-shell {
  display: none !important;
}

.admin-bar.dental-funnel-body .sticky.top-0 {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar.dental-funnel-body .sticky.top-0 {
    top: 46px;
  }
}

.dental-funnel [data-df-offer-dismissed] {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Scroll reveal — matches Lovable Framer enter (opacity + translateY)         */
/* After settle, JS removes .df-reveal so Tailwind hover transitions work.     */
/* -------------------------------------------------------------------------- */

.dental-funnel .df-reveal:not(.is-inview) {
  opacity: 0;
  transform: translateY(18px);
}

.dental-funnel .df-reveal-x:not(.is-inview) {
  opacity: 0;
  transform: translateX(-20px);
}

.dental-funnel .df-reveal,
.dental-funnel .df-reveal-x {
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.dental-funnel .df-reveal.is-inview,
.dental-funnel .df-reveal-x.is-inview {
  opacity: 1;
  transform: none;
}

/* Problem copy: starts coral/red, settles to deep navy #091e3a (slower) */
.dental-funnel .df-reveal-text {
  color: oklch(0.5 0.17 25) !important; /* ~ coral red */
  transition: color 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.dental-funnel .df-reveal.is-inview .df-reveal-text,
.dental-funnel .df-reveal-text.is-inview {
  color: #091e3a !important;
}

/* Solved tick — scale in; color stays agent-specific (inline style) */
.dental-funnel .df-reveal-check {
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.22s,
    transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) 0.22s;
  will-change: opacity, transform;
  display: inline-flex;
}

.dental-funnel .df-reveal.is-inview .df-reveal-check,
.dental-funnel .df-reveal-check.is-inview {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .dental-funnel .df-reveal,
  .dental-funnel .df-reveal-x,
  .dental-funnel .df-reveal-text,
  .dental-funnel .df-reveal-check {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .dental-funnel .df-reveal-text {
    color: #091e3a !important;
  }
  .dental-funnel [data-df-call-bubble],
  .dental-funnel [data-df-call-outcome],
  .dental-funnel [data-df-call-typing] {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Hear Annie — recorded call transcript bubbles                                */
/* -------------------------------------------------------------------------- */

.dental-funnel [data-df-real-call-transcript] {
  /* Room so bubbles never clip against the card edge */
  padding-inline: 2px;
}

.dental-funnel [data-df-real-call-transcript] .df-real-call-line {
  opacity: 0;
  transform: translateY(8px);
  outline: none;
  box-shadow: none;
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dental-funnel [data-df-real-call-transcript] .df-real-call-line.is-in {
  opacity: 1;
  transform: none;
}

.dental-funnel [data-df-real-call-transcript] .df-real-call-line.is-current {
  opacity: 1;
}

.dental-funnel [data-df-real-call-chevron] {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .dental-funnel [data-df-real-call-transcript] .df-real-call-line {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.dental-funnel [data-df-call-typing] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-end;
  max-width: 85%;
  border-radius: 1rem;
  border-bottom-right-radius: 0.375rem;
  background: var(--primary, oklch(0.5 0.18 257));
  color: var(--primary-foreground, #fff);
  padding: 0.65rem 0.9rem;
}

.dental-funnel [data-df-call-typing][data-speaker="caller"] {
  align-self: flex-start;
  border-bottom-right-radius: 1rem;
  border-bottom-left-radius: 0.375rem;
  background: var(--secondary, oklch(0.94 0.02 250));
  color: inherit;
}

.dental-funnel [data-df-call-typing] span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  animation: df-typing-dot 1s ease-in-out infinite;
}

.dental-funnel [data-df-call-typing] span:nth-child(2) {
  animation-delay: 0.15s;
}

.dental-funnel [data-df-call-typing] span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes df-typing-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Configurator — animated utilization bars + switch off state */
.dental-funnel .df-util-bar {
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}

.dental-funnel [data-df-switch][aria-checked="false"] {
  background-color: oklch(90% 0.01 250) !important;
  border-color: oklch(85% 0.01 250);
}

.dental-funnel [data-df-pain] {
  transition: opacity 0.25s ease;
}

.dental-funnel [data-df-util-row] {
  transition: opacity 0.25s ease;
}

.dental-funnel [data-df-preset].border-primary {
  box-shadow: 0 0 0 1px var(--primary, #1d4ed8);
}

/* Display-name aliases → Lovable token keys (amy/leena/…) */
.dental-funnel .ring-agent-annie { --tw-ring-color: var(--agent-amy); }
.dental-funnel .bg-agent-annie { background-color: var(--agent-amy); }
.dental-funnel .ring-agent-sarah { --tw-ring-color: var(--agent-leena); }
.dental-funnel .bg-agent-sarah { background-color: var(--agent-leena); }
.dental-funnel .ring-agent-paula { --tw-ring-color: var(--agent-morgan); }
.dental-funnel .bg-agent-paula { background-color: var(--agent-morgan); }
.dental-funnel .ring-agent-claire { --tw-ring-color: var(--agent-kim); }
.dental-funnel .bg-agent-claire { background-color: var(--agent-kim); }
.dental-funnel .ring-agent-fiona { --tw-ring-color: var(--agent-stephanie); }
.dental-funnel .bg-agent-fiona { background-color: var(--agent-stephanie); }
.dental-funnel .ring-agent-emily { --tw-ring-color: var(--agent-elise); }
.dental-funnel .bg-agent-emily { background-color: var(--agent-elise); }
.dental-funnel .ring-agent-david { --tw-ring-color: var(--agent-joseph); }
.dental-funnel .bg-agent-david { background-color: var(--agent-joseph); }
.dental-funnel .ring-agent-megan { --tw-ring-color: var(--agent-trisha); }
.dental-funnel .bg-agent-megan { background-color: var(--agent-trisha); }

/* Intro lightbox close affordance */
.dental-funnel [data-df-intro-play] { cursor: pointer; }

/* Floating CTA bar sits outside .dental-funnel wrapper but needs body room */
body.dental-funnel-body [data-df-cta-bar] {
  pointer-events: auto;
}
body.dental-funnel-body [data-df-cta-bar][aria-hidden="true"] {
  pointer-events: none;
}
