#typing-indicator {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  margin: 0 15px 10px;
  background-color: var(--incoming-bg);
  border-radius: 18px;
  align-self: flex-start;
  font-size: 0.85rem;
  color: var(--meta-color);
  max-width: 200px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  display: none;
}

#typing-indicator.visible {
  opacity: 1;
  transform: translateY(0);
  display: flex;
}

.typing-animation {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.typing-animation span {
  width: 6px;
  height: 6px;
  background-color: var(--meta-color);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-animation span:nth-child(1) {
  animation-delay: 0s;
}

.typing-animation span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-animation span:nth-child(3) {
  animation-delay: 0.4s;
}