/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Markdown Content Styling */
.markdown-content {
  line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
}

.markdown-content h1 {
  font-size: 1.5em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 0.3em;
}

.dark .markdown-content h1 {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.markdown-content h2 {
  font-size: 1.25em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.3em;
}

.dark .markdown-content h2 {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.markdown-content h3 {
  font-size: 1.1em;
}

.markdown-content h4 {
  font-size: 1em;
}

.markdown-content p {
  margin-top: 0;
  margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
  margin-top: 0;
  margin-bottom: 1em;
  padding-left: 2em;
  list-style-position: outside;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ul ul {
  list-style-type: circle;
}

.markdown-content ul ul ul {
  list-style-type: square;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content ol ol {
  list-style-type: lower-alpha;
}

.markdown-content ol ol ol {
  list-style-type: lower-roman;
}

.markdown-content li {
  margin-bottom: 0.25em;
  display: list-item;
}

.markdown-content li > ul,
.markdown-content li > ol {
  margin-bottom: 0;
}

.markdown-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-content a:hover {
  opacity: 0.8;
}

.markdown-content code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: rgba(175, 184, 193, 0.2);
  border-radius: 6px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.dark .markdown-content code {
  background-color: rgba(255, 255, 255, 0.15);
}

.markdown-content pre {
  padding: 1em;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: rgba(175, 184, 193, 0.2);
  border-radius: 6px;
  margin-bottom: 1em;
}

.dark .markdown-content pre {
  background-color: rgba(255, 255, 255, 0.1);
}

.markdown-content pre code {
  padding: 0;
  margin: 0;
  font-size: inherit;
  background-color: transparent;
  border-radius: 0;
}

.markdown-content blockquote {
  padding: 0 1em;
  margin: 0 0 1em 0;
  color: inherit;
  border-left: 0.25em solid currentColor;
  opacity: 0.8;
}

.markdown-content table {
  border-spacing: 0;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

.markdown-content table th,
.markdown-content table td {
  padding: 0.5em 1em;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.dark .markdown-content table th,
.dark .markdown-content table td {
  border-color: rgba(255, 255, 255, 0.15);
}

.markdown-content table th {
  font-weight: 600;
  background-color: rgba(175, 184, 193, 0.2);
}

.dark .markdown-content table th {
  background-color: rgba(255, 255, 255, 0.15);
}

.markdown-content table tr:nth-child(even) {
  background-color: rgba(175, 184, 193, 0.1);
}

.dark .markdown-content table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
}

.markdown-content hr {
  height: 0.25em;
  padding: 0;
  margin: 2em 0;
  background-color: currentColor;
  border: 0;
  opacity: 0.2;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

/* Smart background handling for different message types */
/* User messages (dark background - bg-brand-600 with text-white) */
.bg-brand-600 .markdown-content code {
  background-color: rgba(255, 255, 255, 0.15);
}

.bg-brand-600 .markdown-content pre {
  background-color: rgba(255, 255, 255, 0.1);
}

.bg-brand-600 .markdown-content table th {
  background-color: rgba(255, 255, 255, 0.15);
}

.bg-brand-600 .markdown-content table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Assistant messages (light background - bg-gray-100 with text-gray-900) */
.bg-gray-100 .markdown-content code {
  background-color: rgba(0, 0, 0, 0.08);
}

.bg-gray-100 .markdown-content pre {
  background-color: rgba(0, 0, 0, 0.05);
}

.bg-gray-100 .markdown-content table th {
  background-color: rgba(0, 0, 0, 0.08);
}

.bg-gray-100 .markdown-content table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}
