/* User Provided Stylesheet */

p {text-align: justify;}



/* No container needed! Bubbles sit in the standard document flow */

/* Shared Bubble Properties */

.user-bubble, 
.ai-bubble {
  padding: 0.5rem 1.2rem;
  border-radius: 18px;
  max-width: 85%;
  margin-bottom: 1.5rem; /* Replaces the flex gap */
  line-height: 1.6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  clear: both;
}

/* User Message: Pushed to the right using auto-margins */
.user-bubble {
  margin-left: auto; 
  margin-right: 0;
  background-color: rgba(248, 166, 23, 0.308); /* A nice professional blue */
  color: black;
  border-bottom-right-radius: 1px; /* Flattens the bottom right corner */
}

/* AI Message: Pushed to the left using auto-margins */
.ai-bubble {
  margin-right: auto;
  margin-left: 0;
  background-color: rgba(82, 234, 211, 0.308);
  color: #24292f;
  border-bottom-left-radius: 1px; /* Flattens the bottom left corner */
}

/* ... keep your dark mode and pre/code formatting rules down here ... */

/* Clean up internal markdown spacing inside the bubbles */
.chat-container p:last-child {
  margin-bottom: 0;
}

.user-bubble a {
  color: #e1efff;
}

.ai-bubble pre {
  background-color: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
}

/* Dark Mode Overrides (MyST natively adds the 'dark' class) */
html.dark .ai-bubble {
  background-color: #2d333b;
  color: #adbac7;
}

html.dark .ai-bubble pre {
  background-color: #22272e;
  border-color: #444c56;
}
