/* AI Sales Assistant Styles | ai-assistant.css */
:root {
  --chat-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --chat-bg: rgba(13, 17, 28, 0.95);
  --chat-glass: rgba(255, 255, 255, 0.03);
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-text: #f3f4f6;
  --chat-text-muted: #9ca3af;
}

/* Floating Chat Trigger */
.ai-chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--chat-primary);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  border: none;
  cursor: pointer;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.ai-chat-trigger:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
}

.ai-chat-trigger svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  transition: transform 0.3s ease;
}

/* Pulsing outer ring */
.ai-chat-trigger::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #6366f1;
  opacity: 0;
  animation: chatPulse 2.5s infinite;
}

@keyframes chatPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Chat Panel */
.ai-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 580px;
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 48px);
  border-radius: 20px;
  background: var(--chat-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--chat-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 8000;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s;
}

.ai-chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.ai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-bottom: 1px solid var(--chat-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chat-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ai-chat-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--chat-text);
}

.ai-chat-status {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--chat-text-muted);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  transition: color 0.2s;
}

.ai-chat-close:hover {
  color: #fff;
}

/* Messages Area */
.ai-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.ai-chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.ai-chat-msg-bot {
  background: var(--chat-glass);
  border: 1px solid var(--chat-border);
  color: var(--chat-text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-chat-msg-user {
  background: var(--chat-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Bullet points inside message styling */
.ai-chat-msg ul, .ai-chat-msg ol {
  margin: 6px 0;
  padding-left: 18px;
}

/* Suggestion Chips */
.ai-chat-chips {
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-chat-chips::-webkit-scrollbar {
  display: none;
}

.ai-chat-chip {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chat-border);
  color: var(--chat-text-muted);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.ai-chat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Input Area */
.ai-chat-input-area {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--chat-border);
  display: flex;
  gap: 10px;
}

.ai-chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--chat-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s;
}

.ai-chat-input:focus {
  border-color: #6366f1;
}

.ai-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--chat-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ai-chat-send:hover {
  transform: scale(1.05);
}

.ai-chat-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

/* Typing Indicator */
.ai-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: var(--chat-glass);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  align-items: center;
  margin-top: 4px;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--chat-text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(1) { animation-delay: 0s; }
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}
