.chat-message {
  max-width: 70%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}

.chat-message:not(.user-message) {
  background: rgb(224, 224, 224);
  border-bottom-left-radius: 4px;
  margin-right: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-message {
  background-color: rgb(255, 182, 47);
  color: white;
  border-bottom-right-radius: 4px;
  width: fit-content;
  margin-left: auto; /* This pushes to right */
  margin-right: 8px; /* Add some right margin */
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  text-align: left; /* Keep text aligned left inside bubble */
}

/* Typing indicator */
.typing-indicator {
  background: #f1f1f1;
  padding: 12px 16px;
  border-radius: 18px;
  margin-left: 8px;
  margin-right: auto;
  width: fit-content;
}

.typing-dots {
  display: flex;
  gap: 5px;
}

.typing-dots div {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

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

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

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

/* Message animations */
.chat-message {
  opacity: 0;
  transform: translateY(10px);
  animation: messageAppear 0.3s ease-out forwards;
}

@keyframes messageAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





