/* Syntax Highlighting Styles for Code Blocks */
/* Used across documentation, blog, and other modules */

/* Enhanced prose styles for beautiful documentation */
.prose {
    line-height: 1.75;
    font-family: "Miriam Libre", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Heading improvements */
.prose h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 2rem;
    color: rgb(17 24 39);
    border-bottom: 3px solid rgb(59 130 246);
    padding-bottom: 0.5rem;
}
.dark .prose h1 {
    color: rgb(243 244 246);
    border-bottom-color: rgb(96 165 250);
}

.prose h2 {
    font-size: 1.875rem;
    line-height: 1.3;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: rgb(31 41 55);
    position: relative;
}
.dark .prose h2 {
    color: rgb(229 231 235);
}

.prose h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: rgb(55 65 81);
}
.dark .prose h3 {
    color: rgb(209 213 219);
}

/* List improvements */
.prose ul, .prose ol {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.prose li {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.prose li::marker {
    color: rgb(59 130 246);
    font-weight: 600;
}
.dark .prose li::marker {
    color: rgb(96 165 250);
}

/* Code block improvements */
.prose pre {
    position: relative;
    overflow-x: auto;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: rgb(248 250 252) !important;
    border: 1px solid rgb(226 232 240);
}

.dark .prose pre {
    background-color: rgb(15 23 42) !important;
    border-color: rgb(51 65 85);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.prose pre code {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 0.875rem;
    line-height: 1.6;
    color: inherit !important;
}

/* Force better contrast for highlight.js in light mode */
.prose pre code {
    color: #24292f !important;
}

.prose pre code .hljs-keyword,
.prose pre code .hljs-selector-tag,
.prose pre code .hljs-built_in {
    color: #cf222e !important;
}

.prose pre code .hljs-string,
.prose pre code .hljs-attr {
    color: #0969da !important;
}

.prose pre code .hljs-number,
.prose pre code .hljs-literal {
    color: #0550ae !important;
}

.prose pre code .hljs-comment {
    color: #656d76 !important;
    font-style: italic;
}

.prose pre code .hljs-title,
.prose pre code .hljs-function {
    color: #8250df !important;
}

/* Override highlight.js theme for better dark mode */
.dark .prose pre code .hljs-keyword,
.dark .prose pre code .hljs-selector-tag,
.dark .prose pre code .hljs-built_in {
    color: rgb(96 165 250) !important;
}

.dark .prose pre code .hljs-string,
.dark .prose pre code .hljs-attr {
    color: rgb(34 197 94) !important;
}

.dark .prose pre code .hljs-number,
.dark .prose pre code .hljs-literal {
    color: rgb(251 146 60) !important;
}

.dark .prose pre code .hljs-comment {
    color: rgb(148 163 184) !important;
    font-style: italic;
}

.dark .prose pre code .hljs-title,
.dark .prose pre code .hljs-function {
    color: rgb(236 72 153) !important;
}

/* Table improvements */
.prose table {
    margin: 2rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose th {
    background: linear-gradient(135deg, rgb(59 130 246) 0%, rgb(37 99 235) 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.prose tbody tr:nth-child(even) {
    background-color: rgb(249 250 251);
}
.dark .prose tbody tr:nth-child(even) {
    background-color: rgb(31 41 55);
}

/* Blockquote enhancements */
.prose blockquote {
    font-style: italic;
    position: relative;
    margin: 2rem 0;
}

.prose blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    color: rgb(59 130 246);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Link improvements */
.prose a {
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.prose a:hover {
    color: rgb(37 99 235);
    transform: translateY(-1px);
}
.dark .prose a:hover {
    color: rgb(147 197 253);
}

/* Image improvements */
.prose img {
    margin: 2rem auto;
    max-width: 100%;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Copy button styling */
.group:hover .copy-btn {
    opacity: 1;
}

.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}