/* AI Chatbot Styles */
#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: "Maven Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Toggle Button */
.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00caf4 0%, #0a8fb8 100%);
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 202, 244, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 202, 244, 0.6);
}

.chatbot-toggle:active {
  transform: scale(0.95);
}

/* Chat Window */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 550px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

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

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, #002d4f 0%, #003d66 100%);
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #5ecfea;
  font-family: 'Titillium Web', sans-serif;
}

.chatbot-header p {
  margin: 5px 0 0 0;
  font-size: 13px;
  opacity: 0.9;
  color: #fff;
}

/* Messages Container */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

/* Message Bubbles */
.chatbot-message {
  display: flex;
  animation: fadeIn 0.3s ease;
}

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

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

.chatbot-message-bot {
  justify-content: flex-start;
}

.chatbot-message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chatbot-message-user .chatbot-message-bubble {
  background: linear-gradient(135deg, #00caf4 0%, #0a8fb8 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.chatbot-message-bot .chatbot-message-bubble {
  background: white;
  color: #2d3748;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Links in chat messages */
.chatbot-message-bubble a {
  color: #00caf4;
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.chatbot-message-bubble a:hover {
  opacity: 0.8;
}

.chatbot-message-user .chatbot-message-bubble a {
  color: white;
  text-decoration: underline;
}

/* Typing Indicator */
.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px;
}

.chatbot-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e0;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    background: #cbd5e0;
  }
  30% {
    transform: translateY(-10px);
    background: #00caf4;
  }
}

/* Input Container */
.chatbot-input-container {
  display: flex;
  padding: 16px;
  background: white;
  border-top: 1px solid #e2e8f0;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  font-size: 14px;
  font-family: "Maven Pro", sans-serif;
  outline: none;
  transition: all 0.2s ease;
}

.chatbot-input:focus {
  border-color: #00caf4;
  box-shadow: 0 0 0 3px rgba(0, 202, 244, 0.1);
}

.chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00caf4 0%, #0a8fb8 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatbot-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 202, 244, 0.3);
}

.chatbot-send:active {
  transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #chatbot-container {
    bottom: 10px;
    right: 10px;
  }

  .chatbot-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 120px);
    bottom: 70px;
    right: -10px;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
  }

  .chatbot-message-bubble {
    max-width: 85%;
    font-size: 15px;
  }
}

/* Accessibility */
.chatbot-toggle:focus,
.chatbot-send:focus,
.chatbot-input:focus {
  outline: 2px solid #00caf4;
  outline-offset: 2px;
}

/* Animation for opening/closing */
.chatbot-closed .chatbot-window {
  animation: slideDown 0.3s ease;
}

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