/*
 * markdown.css — Estilos para renderizado de markdown en respuestas de IA.
 * Dark theme only. Aplicar clase .prose-dark al contenedor del markdown.
 * Compatible con marked.js v9.x output.
 */

.prose-dark h1 {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.75rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.375rem;
}

.prose-dark h2 {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.625rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: #e2e8f0;
}

.prose-dark h3 {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5rem;
  margin-top: 0.875rem;
  margin-bottom: 0.25rem;
  color: #cbd5e1;
}

.prose-dark h4 {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  color: #94a3b8;
}

.prose-dark p {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
}

.prose-dark strong {
  font-weight: 600;
  color: #c4b5fd;
}

.prose-dark em {
  font-style: italic;
  color: #a5b4fc;
}

.prose-dark ul {
  list-style-type: disc;
  padding-left: 1.375rem;
  margin-top: 0.375rem;
  margin-bottom: 0.625rem;
}

.prose-dark ol {
  list-style-type: decimal;
  padding-left: 1.375rem;
  margin-top: 0.375rem;
  margin-bottom: 0.625rem;
}

.prose-dark li {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.prose-dark li > strong {
  color: #c4b5fd;
}

.prose-dark li > p {
  margin-bottom: 0.25rem;
}

.prose-dark code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  color: #34d399;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.prose-dark pre {
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 0.625rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

.prose-dark pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: #34d399;
}

.prose-dark blockquote {
  border-left: 3px solid #7c3aed;
  padding-left: 14px;
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
  color: #64748b;
  font-style: italic;
}

.prose-dark blockquote p {
  color: #64748b;
  margin-bottom: 0;
}

.prose-dark a {
  color: #f97316;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-dark a:hover {
  color: #fb923c;
}

.prose-dark hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.prose-dark table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
  margin-top: 0.625rem;
  margin-bottom: 0.75rem;
}

.prose-dark thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prose-dark th {
  text-align: left;
  padding: 6px 10px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose-dark td {
  padding: 6px 10px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.prose-dark tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Primer elemento del contenedor — quitar margin-top */
.prose-dark > *:first-child {
  margin-top: 0;
}

/* Último elemento — quitar margin-bottom */
.prose-dark > *:last-child {
  margin-bottom: 0;
}
