/* ==================== CHATBOT WIDGET STYLES ==================== */

.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 90px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00d67a, #4df1a6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 214, 122, 0.4);
  transition: all 0.3s ease;
  z-index: 9998;
  animation: chatbot-pulse 2s infinite;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0, 214, 122, 0.6);
}

.chatbot-toggle svg {
  color: #000;
}

.chatbot-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4d4f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.4);
}

@keyframes chatbot-pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(0, 214, 122, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 214, 122, 0.7);
  }
}

/* Popup */
.chatbot-popup {
  position: fixed;
  bottom: 90px;
  right: 90px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: 80vh;
  background: #0a0a0a;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #00d67a, #4df1a6);
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000;
}

.chatbot-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.chatbot-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 2px 0 0 0;
}

.chatbot-close-btn {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #000;
}

.chatbot-close-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #050505;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.chatbot-message {
  display: flex;
  gap: 10px;
  animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.message-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e0e0e0;
  max-width: 75%;
}

.bot-message .message-content {
  background: rgba(0, 214, 122, 0.1);
  border: 1px solid rgba(0, 214, 122, 0.2);
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-content {
  background: rgba(0, 214, 122, 0.2);
  border: 1px solid rgba(0, 214, 122, 0.3);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 214, 122, 0.6);
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chatbot-input-area {
  padding: 16px;
  background: #0a0a0a;
  border-radius: 0 0 20px 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chatbot-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

#chatbot-input:focus {
  border-color: #00d67a;
  background: rgba(255, 255, 255, 0.08);
}

.chatbot-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d67a, #4df1a6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chatbot-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 214, 122, 0.4);
}

.chatbot-send-btn svg {
  color: #000;
}

/* Mobile */
@media (max-width: 768px) {
  .chatbot-popup {
    width: calc(100vw - 20px);
    height: calc(100vh - 100px);
    right: 10px;
    bottom: 80px;
  }
}