/* ---------- AI Chat Bot UI ---------- */
:root {
  --ai-bot-primary: #1d4ed8;
  --ai-bot-bg: #ffffff;
  --ai-bot-text: #1f2937;
  --ai-bot-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.ai-bot-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--ai-bot-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: var(--ai-bot-shadow);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-bot-trigger:hover {
  transform: scale(1.1);
}

.ai-bot-trigger svg {
  width: 30px;
  height: 30px;
}

.ai-bot-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 380px;
  height: 550px;
  background: var(--ai-bot-bg);
  border-radius: 1.5rem;
  box-shadow: var(--ai-bot-shadow);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-bot-window.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.ai-bot-header {
  padding: 1.5rem;
  background: var(--ai-bot-primary);
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-bot-header img {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  padding: 5px;
}

.ai-bot-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.ai-bot-header p {
  font-size: 0.75rem;
  opacity: 0.8;
  margin: 0;
}

.ai-bot-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f9fafb;
}

.ai-message {
  max-width: 85%;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-message--bot {
  background: white;
  color: var(--ai-bot-text);
  align-self: flex-start;
  border-bottom-left-radius: 0.2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ai-message--user {
  background: var(--ai-bot-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.2rem;
}

.ai-bot-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  background: white;
}

.ai-bot-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.ai-bot-send {
  background: none;
  border: none;
  color: var(--ai-bot-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.ai-bot-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  .ai-bot-window {
    width: calc(100vw - 2rem);
    height: calc(100vh - 12rem);
    right: 1rem;
    bottom: 5rem;
  }
}
