/* ═══════════════════════════════════════════════════════════════════════
   CHATBOT WOW LAYER — gauravbhargava.ai
   Load after chatbot.css. All rules are additive.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. DELAYED APPEAR — handled by JS inline style, not CSS ── */
.chatbot-container.gb-visible {
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}


/* ── 2. PULSE RING ── */
.chatbot-toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(13, 59, 102, 0.5);
  opacity: 0;
  pointer-events: none;
}
.chatbot-container.gb-pulse .chatbot-toggle::before {
  animation: gb-pulse-ring 1.8s ease-out 3;
}
@keyframes gb-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}


/* ── 3. STATUS DOT ── */
.chatbot-toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid white;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: gb-status-pulse 2.5s ease-in-out infinite;
  z-index: 2;
}
.chatbot-container.open .chatbot-toggle::after {
  animation: none;
  background: #94a3b8;
}
@keyframes gb-status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}


/* ── 4. TOOLTIP NUDGE ── */
.gb-chat-tooltip {
  position: absolute;
  bottom: 50%;
  right: calc(100% + 12px);
  transform: translateY(50%) translateX(6px);
  white-space: nowrap;
  background: white;
  color: #0D3B66;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(13, 59, 102, 0.14);
  border: 1px solid rgba(13, 59, 102, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.gb-chat-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right: none;
  border-left-color: white;
}
.gb-chat-tooltip.show {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}


/* ── 5. SPRING OPEN ANIMATION ── */
/* Override existing window transition with spring */
.chatbot-window {
  transform: translateY(16px) scale(0.90) !important;
  transition: opacity 0.35s ease,
              transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.chatbot-container.open .chatbot-window {
  transform: translateY(0) scale(1) !important;
}

/* Mobile override — keep bottom-right origin */
.chatbot-container.gb-chatbot-mobile .chatbot-window,
.gb-chatbot-mobile-viewport .chatbot-window {
  transform-origin: bottom right !important;
}


/* ── 6. TYPING INDICATOR ── */
.gb-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #DDE3E9;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  margin-bottom: 4px;
}
.gb-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #93aec4;
  animation: gb-typing-bounce 1.2s ease-in-out infinite;
}
.gb-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.gb-typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes gb-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-5px); opacity: 1; }
}


/* ── 7. MESSAGE SLIDE-UP ENTRANCE ── */
@keyframes gb-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-message {
  animation: gb-msg-in 0.3s ease both;
}


/* ── 8. SUGGESTION BUTTON SHIMMER ── */
.suggestion-btn {
  position: relative;
  overflow: hidden;
}
.suggestion-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
}
.suggestion-btn:hover::after {
  left: 130%;
  transition: left 0.5s ease;
}


/* ── 9. AVATAR ONLINE RING ── */
.chatbot-avatar {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5) !important;
  transition: box-shadow 0.3s;
}
