/* Chatbot Styles */
.chatbot-container {
  position: relative;
  order: 1;
  z-index: 1000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chatbot-toggle::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: pulse 2s infinite;
  display: var(--notification-visible, block);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chatbot-toggle.minimize {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.chatbot-window {
  position: absolute;
  bottom: 54px;
  right: 0;
  width: 320px;
  max-width: 95vw;
  height: 420px;
  max-height: 70vh;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s ease;
  z-index: 1100;
  pointer-events: none;
}

.chatbot-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chatbot-header .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.chatbot-header .close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8f9fa;
}

.chatbot-message {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message.bot {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message-bubble.user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 5px;
}

.message-bubble.bot {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 5px;
}

.chatbot-input-container {
  padding: 15px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chatbot-input:focus {
  border-color: #667eea;
}

.chatbot-send-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chatbot-send-btn:hover {
  transform: scale(1.1);
}

.chatbot-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 15px;
  color: #666;
  font-size: 12px;
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Dark mode support */
.dark-mode .chatbot-window {
  background: #2d3748;
  color: white;
}

.dark-mode .chatbot-messages {
  background: #1a202c;
}

.dark-mode .message-bubble.bot {
  background: #4a5568;
  color: white;
  border-color: #2d3748;
}

.dark-mode .chatbot-input-container {
  background: #2d3748;
  border-top-color: #4a5568;
}

.dark-mode .chatbot-input {
  background: #4a5568;
  color: white;
  border-color: #2d3748;
}

.dark-mode .chatbot-input:focus {
  border-color: #667eea;
}

/* Responsive design */
@media (max-width: 600px) {
  .chatbot-window {
    width: 98vw;
    max-width: 98vw;
    height: 70vh;
    max-height: 80vh;
    right: -10px;
    left: auto;
    bottom: 44px;
    border-radius: 12px;
  }
}
