/* ─────────────────────────────────────────────────────
   Orion Dental – styles.css
   Custom styles that extend Tailwind (built separately).
───────────────────────────────────────────────────── */

:root { --primary: #b3262e; }
body  { font-family: 'Plus Jakarta Sans', sans-serif; }

/* ── Hero background ──────────────────────────────── */
.hero-bg {
  background: radial-gradient(ellipse at 20% 50%, #c73038 0%, #8b1c23 40%, #6b1219 100%);
  position: relative;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.07) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(0,0,0,0.2) 0%, transparent 50%);
  z-index: 1;
}

/* ── Animated mesh grid ───────────────────────────── */
.mesh-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
  animation: meshDrift 20s linear infinite;
}
@keyframes meshDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* ── Glow blobs ───────────────────────────────────── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  z-index: 2;
  animation: blobFloat ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: translateY(0)    scale(1);    }
  50%       { transform: translateY(-40px) scale(1.08); }
}

/* ── Floating particles ───────────────────────────── */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0%   { transform: translateY(0) scale(1);    opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-110vh) scale(0.5); opacity: 0; }
}

/* ── Glassmorphism nav ────────────────────────────── */
.glass-nav {
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(179,38,46,0.09);
}

/* ── Mobile menu ──────────────────────────────────── */
#mobile-menu {
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open { max-height: 400px; opacity: 1; }

/* ── Fade-up reveal ───────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.8s cubic-bezier(0.22,1,0.36,1),
    transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Section gradient divider ─────────────────────── */
.divider-wave {
  height: 4px;
  background: linear-gradient(90deg, transparent, #b3262e 30%, #e8555e 50%, #b3262e 70%, transparent);
  border-radius: 2px;
  opacity: 0.35;
}

/* ── Google star ──────────────────────────────────── */
.star { color: #fbbc04; }

/* ── Reviews auto-scroll ──────────────────────────── */
.review-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollLeft 45s linear infinite;
}
.review-track:hover { animation-play-state: paused; }
@keyframes scrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.review-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  width: 290px;
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(11,31,58,0.06);
  border: 1px solid rgba(196,198,206,0.35);
  transition: box-shadow 0.3s, transform 0.3s;
}
.review-card:hover {
  box-shadow: 0 12px 40px rgba(11,31,58,0.12);
  transform: translateY(-3px);
}

/* ── AI shimmer ───────────────────────────────────── */
.ai-badge {
  background: linear-gradient(90deg, #b3262e, #e8555e, #b3262e);
  background-size: 200%;
  animation: shimmer 2.4s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════
   CHATBOT WIDGET
═══════════════════════════════════════════════════ */

/* Chat window entrance */
#chat-window {
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
}
#chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Scrollbar */
.chat-messages { scrollbar-width: thin; scrollbar-color: #e2e2e2 transparent; }
.chat-messages::-webkit-scrollbar       { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #e2e2e2; border-radius: 4px; }

/* Legacy bubble classes (used in templates) */
.bubble-user {
  background: var(--primary);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 16px;
  font-size: 14px;
  max-width: 80%;
  margin-left: auto;
  line-height: 1.5;
  word-break: break-word;
  animation: bubblePop 0.25s ease;
}
.bubble-ai {
  background: #f3f3f4;
  color: #1a1c1c;
  border-radius: 18px 18px 18px 4px;
  padding: 10px 16px;
  font-size: 14px;
  max-width: 85%;
  line-height: 1.5;
  word-break: break-word;
  animation: bubblePop 0.25s ease;
}
@keyframes bubblePop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Typing indicator */
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes typingBounce {
  0%,80%,100% { transform: scale(0.7); opacity: 0.4; }
  40%         { transform: scale(1.2); opacity: 1;   }
}

/* Quick chips */
.chip {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.chip:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* Chat toggle ring animation */
.ring-anim {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(179,38,46,0.45);
  animation: ringPulse 2.2s ease-out infinite;
}
@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0;   }
}

/* ═══════════════════════════════════════════════════
   ANIMATED TOOTH CHARACTER
═══════════════════════════════════════════════════ */

/* Idle gentle bob */
.tooth-logo {
  animation: toothBob 2.8s ease-in-out infinite;
  transform-origin: center bottom;
  display: block;
}
@keyframes toothBob {
  0%,100% { transform: translateY(0)    rotate(0deg)   scale(1);    }
  25%      { transform: translateY(-3px) rotate(1.5deg) scale(1.02); }
  50%      { transform: translateY(0)    rotate(0deg)   scale(1);    }
  75%      { transform: translateY(-2px) rotate(-1deg)  scale(1.01); }
}

/* Eyebrow wiggle – left */
.tooth-brow-l {
  transform-origin: 19px 21px;
  animation: browWiggleL 3.5s ease-in-out infinite;
}
@keyframes browWiggleL {
  0%,100% { transform: rotate(0deg);  }
  30%      { transform: rotate(-8deg); }
  60%      { transform: rotate(4deg);  }
}

/* Eyebrow wiggle – right */
.tooth-brow-r {
  transform-origin: 37px 21px;
  animation: browWiggleR 3.5s ease-in-out infinite;
}
@keyframes browWiggleR {
  0%,100% { transform: rotate(0deg); }
  30%      { transform: rotate(8deg); }
  60%      { transform: rotate(-4deg); }
}

/* Eye blink */
.eye-blink {
  animation: eyeBlink 4s ease-in-out infinite;
}
@keyframes eyeBlink {
  0%,92%,100% { ry: 0.4; opacity: 0; }
  94%,98%     { ry: 4;   opacity: 1; }
}

/* Mouth smile pulse */
.tooth-mouth {
  animation: mouthHappy 3s ease-in-out infinite;
}
@keyframes mouthHappy {
  0%,100% { d: path("M20 40 Q28 49 36 40"); }
  50%      { d: path("M20 42 Q28 51 36 42"); }
}

/* Hover excitement wiggle */
#chat-toggle:hover .tooth-logo {
  animation: toothExcited 0.5s ease-in-out infinite;
}
@keyframes toothExcited {
  0%,100% { transform: rotate(-6deg) scale(1.05); }
  50%      { transform: rotate(6deg)  scale(1.1);  }
}

/* Open/close swap */
#tooth-btn-svg  { transition: opacity 0.25s ease, transform 0.25s ease; }
#chat-close-icon {
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: rotate(-90deg);
}
#chat-toggle.is-open #tooth-btn-svg   { opacity: 0; transform: scale(0.6) rotate(20deg); }
#chat-toggle.is-open #chat-close-icon { opacity: 1 !important; transform: rotate(0deg); }
