/* *
 * TermBOT Chatbot Styles
 * Custom CSS for the TermBOT chat interface */

.chat-container {
  height: 500px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
}

.chat-bubble {
  margin-bottom: 1rem;
  max-width: 80%;
}

.user-bubble {
  margin-left: auto;
}

.user-bubble .chat-content {
  background-color: #0d6efd;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 1rem 1rem 0.25rem 1rem;
}

.bot-bubble .chat-content {
  background-color: #e9ecef;
  color: #212529;
  padding: 0.75rem 1rem;
  border-radius: 1rem 1rem 1rem 0.25rem;
}

.typing-indicator {
  display: none;
  padding: 0.75rem 1rem;
  background-color: #e9ecef;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.typing-dots {
  display: inline-block;
}

.typing-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6c757d;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span: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;
  }
}

.input-group {
  border-radius: 0.5rem;
  overflow: hidden;
}

#chatInput {
  border: none;
  border-radius: 0;
}

#sendButton {
  border: none;
  border-radius: 0;
}

/* Custom scrollbar for chat container */

.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive adjustments */

@media (max-width: 768px) {
  .chat-container {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .chat-bubble {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .user-bubble .chat-content, .bot-bubble .chat-content {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Animation for new messages */

.chat-bubble {
  animation: slideIn 0.3s ease-out;
}

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

/* Hover effects for better UX */

#sendButton:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

#chatInput:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading state styles */

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Error message styling */

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

