/* BHXH Chatbot - Custom Styles */

/* Typing animation */
@keyframes typing-dot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.typing-dot:nth-child(1) {
  animation: typing-dot 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation: typing-dot 1.4s ease-in-out 0.2s infinite;
}

.typing-dot:nth-child(3) {
  animation: typing-dot 1.4s ease-in-out 0.4s infinite;
}

/* Smooth scrollbar */
#chat-container::-webkit-scrollbar {
  width: 6px;
}

#chat-container::-webkit-scrollbar-track {
  background: transparent;
}

#chat-container::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 3px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}

/* Message animations */
.chat-message {
  animation: message-slide-in 0.3s ease-out;
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for recording */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Textarea auto-resize placeholder */
#user-input::placeholder {
  color: rgb(100 116 139);
}

/* Citation card hover */
.citation-card {
  transition: all 0.2s ease;
}

.citation-card:hover {
  background-color: rgba(100, 116, 139, 0.2);
}

/* Button hover effects */
button {
  transition: all 0.2s ease;
}

/* Focus ring for accessibility */
button:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgb(46, 125, 50);
  outline-offset: 2px;
}

/* Prose styles for formatted content */
.prose strong {
  color: rgb(226 232 240);
  font-weight: 600;
}

.prose br {
  display: block;
  content: "";
  margin-top: 0.5em;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .chat-message > div:last-child {
    max-width: calc(100vw - 5rem);
  }
}
