/* AI Chatbot Overlay & Window Styles */

.chatbot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--yellow-primary);
  color: var(--text-dark);
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  box-shadow: 0 4px 20px var(--yellow-glow-strong);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-launcher:hover {
  transform: scale(1.05) translateY(-2px);
  background: var(--yellow-hover);
}

.launcher-badge {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

/* Chatbot Drawer Window */
.chatbot-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 380px;
  height: 540px;
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--yellow-primary);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

.chatbot-header {
  padding: 1rem 1.25rem;
  background: rgba(10, 10, 14, 0.9);
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-avatar {
  width: 36px;
  height: 36px;
  background: var(--yellow-primary);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-title {
  font-size: 1.3rem;
  color: #ffffff;
  line-height: 1;
}

.chatbot-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success-color);
  border-radius: 50%;
}

.chatbot-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Chat Bubbles */
.chat-message {
  display: flex;
  max-width: 85%;
}

.msg-user {
  margin-left: auto;
}

.msg-ai {
  margin-right: auto;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.msg-user .msg-bubble {
  background: var(--yellow-primary);
  color: var(--text-dark);
  border-bottom-right-radius: 2px;
  font-weight: 500;
}

.msg-ai .msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--card-border);
}

.msg-time {
  display: block;
  font-size: 0.65rem;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}

/* Typing indicator */
.typing-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 18px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow-primary);
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}

/* Footer Input Form */
.chatbot-footer {
  padding: 0.75rem;
  background: rgba(10, 10, 14, 0.95);
  border-top: 1px solid var(--border-muted);
  display: flex;
  gap: 0.5rem;
}

.chatbot-footer input {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.chatbot-footer button {
  padding: 8px 14px;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 32px);
    height: 480px;
    right: 16px;
    bottom: 16px;
  }
}
