/**
 * Markdown rendering styles for frontend pages
 * Ensures proper rendering of all markdown elements including lists, headings, hr, etc.
 */

/* Base prose styling improvements */
.prose {
    color: #374151;
}

.prose p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Headings - keep base size but make bold and add spacing */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-weight: 700 !important;
    font-size: inherit !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.75em !important;
    line-height: 1.3 !important;
    color: inherit !important;
}

/* First heading should have less top margin */
.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child,
.prose h4:first-child,
.prose h5:first-child,
.prose h6:first-child {
    margin-top: 0 !important;
}

/* Unordered lists with proper bullets and indentation */
.prose ul {
    list-style-type: disc;
    padding-left: 1.625em;
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose ul li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
    padding-left: 0.25em;
}

/* Nested lists */
.prose ul ul {
    list-style-type: circle;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.prose ul ul ul {
    list-style-type: square;
}

/* Ordered lists with proper numbering and indentation */
.prose ol {
    list-style-type: decimal;
    padding-left: 1.625em;
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose ol li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
    padding-left: 0.25em;
}

/* Nested ordered lists */
.prose ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

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

/* Horizontal rule */
.prose hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 2em;
    margin-bottom: 2em;
}

/* Strong/bold text */
.prose strong {
    font-weight: 700;
    color: #111827;
}

/* Emphasis/italic */
.prose em {
    font-style: italic;
}

/* Code blocks */
.prose code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #1f2937;
}

.prose pre {
    background-color: #f3f4f6;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1em;
    margin-bottom: 1em;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.875em;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1em;
    font-style: italic;
    color: #6b7280;
    margin-top: 1em;
    margin-bottom: 1em;
}

/* Links */
.prose a {
    color: #2563eb;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}

/* Dark mode support */
.dark .prose {
    color: #d1d5db;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose h5,
.dark .prose h6 {
    color: inherit !important;
}

.dark .prose strong {
    color: #f9fafb;
}

.dark .prose hr {
    border-top-color: #4b5563;
}

.dark .prose code {
    background-color: #374151;
    color: #e5e7eb;
}

.dark .prose pre {
    background-color: #374151;
}

.dark .prose blockquote {
    border-left-color: #4b5563;
    color: #9ca3af;
}

.dark .prose a {
    color: #60a5fa;
}

.dark .prose a:hover {
    color: #93c5fd;
}
