/* markdown-content.css - Styling for rendered markdown content */

.markdown-content {
    line-height: 1.6;
    color: inherit;
    word-wrap: break-word;
}

.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;
}

.markdown-content h1 {
    font-size: 1.75em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding-bottom: 0.3em;
}

.markdown-content h3 {
    font-size: 1.25em;
}

.markdown-content h4 {
    font-size: 1.1em;
}

.markdown-content h5,
.markdown-content h6 {
    font-size: 1em;
}

.markdown-content p {
    margin-top: 0;
    margin-bottom: 1em;
}

.markdown-content a {
    color: #2563eb;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content ul,
.markdown-content ol {
    margin-top: 0;
    margin-bottom: 1em;
    padding-left: 2em;
}

.markdown-content li {
    margin-bottom: 0.25em;
}

.markdown-content li > p {
    margin-top: 0.5em;
}

.markdown-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background-color: rgba(148, 163, 184, 0.15);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

.markdown-content pre {
    background-color: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.875em;
    line-height: 1.5;
}

.markdown-content blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid rgba(148, 163, 184, 0.5);
    color: rgba(0, 0, 0, 0.7);
    font-style: italic;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
    overflow-x: auto;
    display: block;
}

.markdown-content table thead {
    background-color: rgba(148, 163, 184, 0.1);
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.6em 0.8em;
    text-align: left;
}

.markdown-content table th {
    font-weight: 600;
}

.markdown-content table tr:nth-child(even) {
    background-color: rgba(148, 163, 184, 0.05);
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    margin: 1.5em 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

/* Mermaid diagram styling */
.mermaid-diagram {
    margin: 1.5em 0;
    padding: 1em;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

.mermaid-diagram svg {
    max-width: 100%;
    height: auto;
}

/* Dark theme adjustments for user messages */
.message.user .markdown-content {
    color: #ffffff;
}

.message.user .markdown-content a {
    color: #bfdbfe;
}

.message.user .markdown-content code {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.message.user .markdown-content pre {
    background-color: rgba(0, 0, 0, 0.3);
}

.message.user .markdown-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.message.user .markdown-content table th,
.message.user .markdown-content table td {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Syntax highlighting for code blocks (optional - basic colors) */
.markdown-content pre code .keyword {
    color: #c792ea;
}

.markdown-content pre code .string {
    color: #c3e88d;
}

.markdown-content pre code .comment {
    color: #546e7a;
    font-style: italic;
}

.markdown-content pre code .number {
    color: #f78c6c;
}

.markdown-content pre code .function {
    color: #82aaff;
}
