/* Floating Chatbot Widget Styles */
.chatbot-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #81ecff, #00e3fd);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 25px rgba(129, 236, 255, 0.3);
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 35px rgba(129, 236, 255, 0.5);
}

.chatbot-toggle span {
  color: #004d57;
  font-size: 1.5rem;
}

.chatbot-window {
  position: fixed;
  top: 20%;
  left: 10%;
  width: 80%;
  height: 50%;
  background: linear-gradient(135deg, #0a1428 0%, #131f2b 100%);
  border: 1px solid rgba(129, 236, 255, 0.2);
  border-radius: 1.25rem;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s ease;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.chatbot-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(129, 236, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 20, 40, 0.8);
}

.chatbot-title {
  font-size: 1rem;
  font-weight: 600;
  color: #81ecff;
  margin: 0;
}

.chatbot-close {
  background: none;
  border: none;
  color: #81ecff;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(to bottom, 
    rgba(8, 20, 40, 0.6), 
    rgba(20, 35, 60, 0.4));
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(129, 236, 255, 0.05);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(129, 236, 255, 0.3);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 236, 255, 0.5);
}

.message {
  display: flex;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.message.bot .message-content {
  background: rgba(129, 236, 255, 0.1);
  border-left: 3px solid #81ecff;
  color: #dee5ff;
}

.message.user .message-content {
  background: linear-gradient(135deg, #81ecff, #00e3fd);
  color: #004d57;
  font-weight: 500;
}

.message.system .message-content {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
  color: #fbbf24;
  font-size: 0.9rem;
  font-style: italic;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(129, 236, 255, 0.6);
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid rgba(129, 236, 255, 0.1);
  background: rgba(8, 20, 40, 0.8);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex: 1;
  background: rgba(20, 35, 60, 0.6);
  border: 1px solid rgba(129, 236, 255, 0.2);
  border-radius: 0.5rem;
  color: #dee5ff;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
}

.chatbot-input:focus {
  outline: none;
  border-color: #81ecff;
  background: rgba(20, 35, 60, 0.9);
  box-shadow: 0 0 12px rgba(129, 236, 255, 0.2);
}

.chatbot-input::placeholder {
  color: rgba(222, 229, 255, 0.5);
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border: none;
  background: linear-gradient(135deg, #81ecff, #00e3fd);
  border-radius: 0.5rem;
  color: #004d57;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 600;
}

.chatbot-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(129, 236, 255, 0.3);
}

.chatbot-send:active {
  transform: translateY(0);
}

.chatbot-send.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Image Display in Messages */
.message-image {
  max-width: 280px;
  height: auto;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(129, 236, 255, 0.2);
}

.message-image:hover {
  box-shadow: 0 6px 20px rgba(129, 236, 255, 0.4);
  transform: scale(1.02);
}

.message.bot .message-image {
  border: 1px solid rgba(129, 236, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 2rem);
    height: 60vh;
    bottom: auto;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%) scale(0.95);
  }

  .chatbot-window.active {
    transform: translateY(-50%) scale(1);
  }

  .chatbot-widget {
    bottom: 1rem;
    right: 1rem;
  }
}
