/* Chatbot animations and styling */

/* Streaming message animation */
.streaming-message {
  position: relative;
  overflow: hidden;
}

.streaming-message::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 2px;
  width: 10px;
  background-color: #3b82f6;
  animation: typing 1s infinite;
}

@keyframes typing {
  0% {
    width: 0;
  }
  50% {
    width: 10px;
  }
  100% {
    width: 0;
  }
}

/* Message animations */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-right {
  animation: slideRight 0.3s ease-in-out;
}

.animate-slide-left {
  animation: slideLeft 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
}

.typing-indicator span:first-child {
  margin-right: 5px;
}

.typing-indicator span:not(:first-child) {
  width: 4px;
  height: 4px;
  margin: 0 1px;
  background-color: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  animation: typing-dot 1.5s infinite ease-in-out;
}

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

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

@keyframes typing-dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Typing dots for streaming messages */
.typing-dots {
  display: flex;
  align-items: center;
}

.typing-dots span {
  width: 3px;
  height: 3px;
  margin: 0 1px;
  background-color: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  animation: typing-dot 1.2s infinite ease-in-out;
}

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

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

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