/* Markdown Styles for Chat Messages */
/* This file contains all markdown-related styles for the chat interface */

/* Headers */
.chat-message-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.chat-message-text h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.chat-message-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.chat-message-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.chat-message-text h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.chat-message-text h6 {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Text formatting */
.chat-message-text strong {
    font-weight: 600;
    color: var(--text-primary);
}

.chat-message-text em {
    font-style: italic;
    color: var(--text-secondary);
}

.chat-message-text del {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Code formatting */
.chat-message-text code {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.chat-message-text pre {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    position: relative;
}

.chat-message-text pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
}

/* Lists */
.chat-message-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.chat-message-text ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.chat-message-text li {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.chat-message-text li ul,
.chat-message-text li ol {
    margin: 0.25rem 0;
}

/* Links */
.chat-message-text a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.chat-message-text a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Blockquotes */
.chat-message-text blockquote {
    border-left: 4px solid var(--border-color);
    margin: 0.5rem 0;
    padding: 0.5rem 0 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0 0.25rem 0.25rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.chat-message-text blockquote p {
    margin: 0;
}

/* Horizontal rules */
.chat-message-text hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* Tables */
.chat-message-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.chat-message-text th,
.chat-message-text td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.chat-message-text th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.chat-message-text td {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
}

/* Paragraphs and spacing */
.chat-message-text p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.chat-message-text p:first-child {
    margin-top: 0;
}

.chat-message-text p:last-child {
    margin-bottom: 0;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .chat-message-text code {
    background-color: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

[data-theme="dark"] .chat-message-text pre {
    background-color: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .chat-message-text a {
    color: #60a5fa;
}

[data-theme="dark"] .chat-message-text a:hover {
    color: #93c5fd;
}

[data-theme="dark"] .chat-message-text blockquote {
    background-color: #1f2937;
    border-left-color: #374151;
}

[data-theme="dark"] .chat-message-text th {
    background-color: #374151;
    border-color: #4b5563;
}

[data-theme="dark"] .chat-message-text td {
    background-color: #1f2937;
    border-color: #374151;
}

/* Light mode specific adjustments */
[data-theme="light"] .chat-message-text code {
    background-color: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

[data-theme="light"] .chat-message-text pre {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme="light"] .chat-message-text blockquote {
    background-color: #f9fafb;
    border-left-color: #e5e7eb;
}

[data-theme="light"] .chat-message-text th {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

[data-theme="light"] .chat-message-text td {
    background-color: #ffffff;
    border-color: #d1d5db;
} 