/* ============================================
   MARKDOWN PROCESSOR STYLES
   ============================================ */

/* Base Markdown Styles */
.markdown-paragraph {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.markdown-heading {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.markdown-h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
}

.markdown-h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.3rem;
}

.markdown-h3 {
    font-size: 1.5rem;
}

.markdown-h4 {
    font-size: 1.25rem;
}

.markdown-h5 {
    font-size: 1.1rem;
}

.markdown-h6 {
    font-size: 1rem;
}

/* Lists */
.markdown-list {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-list-unordered {
    list-style-type: disc;
}

.markdown-list-ordered {
    list-style-type: decimal;
}

/* Code */
.markdown-code {
    background-color: var(--bs-gray-200);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.markdown-code-block {
    background-color: var(--bs-gray-200);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-code-block code {
    background: none;
    padding: 0;
}

/* Blockquotes */
.markdown-blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: inherit;
    opacity: 0.85;
    font-style: italic;
}

/* Tables */
.markdown-table {
    margin-bottom: 1rem;
}

/* Dividers */
.markdown-divider {
    margin: 2rem 0;
    border-top: 2px solid var(--bs-border-color);
}

/* Alert Boxes */
.markdown-alert {
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
}

.markdown-alert strong {
    display: inline-block;
    margin-right: 0.5rem;
}

.markdown-alert-note {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.markdown-alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.markdown-alert-important {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.markdown-alert-tip {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

/* Table of Contents */
.markdown-toc {
    background-color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

.markdown-toc-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.markdown-toc-list li {
    padding: 0.25rem 0;
}

.markdown-toc-list a {
    text-decoration: none;
    color: var(--bs-primary);
}

.markdown-toc-list a:hover {
    text-decoration: underline;
}

/* Context-Specific Styles */

/* Forum Posts */
.markdown-forum-paragraph {
    margin-bottom: 0.75rem;
}

.markdown-forum-code {
    background-color: rgba(110, 118, 129, 0.1);
}

/* News Articles */
.markdown-news-paragraph {
    font-size: 1.05rem;
    line-height: 1.7;
}

.markdown-news-heading {
    color: inherit;
    font-weight: 700;
}

/* Events */
.markdown-event-paragraph {
    font-size: 1rem;
}

/* FAQ */
.markdown-faq-paragraph {
    font-size: 0.95rem;
}

/* Support Tickets */
.markdown-ticket-paragraph {
    font-size: 0.9rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .markdown-code,
[data-theme="dark"] .markdown-code-block {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .markdown-blockquote {
    color: var(--bs-gray-300);
}

[data-theme="dark"] .markdown-toc {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Alert boxes - Dark mode */
[data-theme="dark"] .markdown-alert-note {
    background-color: rgba(23, 162, 184, 0.2);
    border-left-color: #17a2b8;
    color: #9fdbeb;
}

[data-theme="dark"] .markdown-alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border-left-color: #ffc107;
    color: #ffe69c;
}

[data-theme="dark"] .markdown-alert-important {
    background-color: rgba(220, 53, 69, 0.2);
    border-left-color: #dc3545;
    color: #f1aeb5;
}

[data-theme="dark"] .markdown-alert-tip {
    background-color: rgba(40, 167, 69, 0.2);
    border-left-color: #28a745;
    color: #a3cfbb;
}

/* ============================================
   MENTION STYLES
   ============================================ */

a.mention {
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    text-decoration: none;
    font-weight: 500;
    color: #0d6efd;
    transition: all 0.2s ease;
}

a.mention:hover {
    background-color: rgba(13, 110, 253, 0.2);
    text-decoration: none;
    color: #0a58ca;
}

[data-theme="dark"] a.mention {
    background-color: rgba(13, 110, 253, 0.15);
    color: #6ea8fe;
}

[data-theme="dark"] a.mention:hover {
    background-color: rgba(13, 110, 253, 0.25);
    color: #9ec5fe;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .markdown-h1 {
        font-size: 1.75rem;
    }
    
    .markdown-h2 {
        font-size: 1.5rem;
    }
    
    .markdown-h3 {
        font-size: 1.25rem;
    }
    
    .markdown-code-block {
        font-size: 0.85em;
    }
}
