.modal .modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal .chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
}

.modal .messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* Message bubbles */
.modal .message {
  margin-bottom: 1rem;
  max-width: 75%;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  line-height: 1.4;
}

.modal .message-user {
  background-color: #d1e7dd;
  align-self: flex-end;
}

.modal .message-spirit {
  background-color: #e2e3e5;
  align-self: flex-start;
}

.modal .chat-form {
  display: flex;
  padding: 1rem;
}

.loader-dots {
  font-size: 1.75rem;
}

.loader-dots span {
  opacity: 0;
  animation: blink 1.4s infinite;
}

.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}