/* === AI CHATBOT SHARED STYLES === */
.ai-chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

/* Toggle Button */
.ai-chatbot-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple, #6c63ff), var(--purple-light, #a78bfa));
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chatbot-toggle:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 35px rgba(108, 99, 255, 0.6);
}

.ai-chatbot-toggle.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

.ai-chatbot-toggle .pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--purple-light, #a78bfa);
  opacity: 0;
  animation: pulse-ring-chat 2s infinite;
}

@keyframes pulse-ring-chat {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Chat Window */
.ai-chatbot-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 240px;
  height: 360px;
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Header */
.ai-chatbot-header {
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(236, 72, 153, 0.1));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.ai-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--purple, #6c63ff), var(--purple-light, #a78bfa));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.ai-status {
  display: flex;
  flex-direction: column;
}

.ai-name {
  font-weight: 700;
  font-size: 14px;
  color: white;
}

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

.ai-online-tag .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.close-chat {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-chat:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

/* Messages Area */
.ai-chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.message {
  max-width: 85%;
  display: flex;
  flex-direction: column;
}

.message-content {
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.message.ai {
  align-self: flex-start;
}

.message.ai .message-content {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #f1f5f9);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.user {
  align-self: flex-end;
}

.message.user .message-content {
  background: linear-gradient(135deg, var(--purple, #6c63ff), var(--purple-light, #a78bfa));
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.2);
}

/* Typing Indicator */
.ai-typing-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
}

.ai-typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-secondary, #94a3b8);
  border-radius: 50%;
  animation: typing-chat 1.4s infinite ease-in-out;
}

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

@keyframes typing-chat {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Input Area */
.ai-chat-input-area {
  padding: 8px 12px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.input-wrapper-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 6px 6px 6px 14px;
  transition: all 0.3s ease;
}

.input-wrapper-chat:focus-within {
  border-color: var(--purple-light, #a78bfa);
  background: rgba(255, 255, 255, 0.08);
}

#chat-input {
  flex: 1;
  background: none;
  border: none;
  color: white;
  font-size: 12.5px;
  outline: none;
  padding: 8px 0;
}

.send-btn-chat {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--purple, #6c63ff);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn-chat:hover {
  background: var(--purple-light, #a78bfa);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .ai-chatbot-window {
    width: calc(100vw - 40px);
    height: 70vh;
    bottom: -10px;
    right: -10px;
  }
}
