/* Enhanced Code Block Presentation Styles */

/* Code block container */
.code-block {
    background: #1e1e1e;
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    position: relative;
    border: 1px solid #374151;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for code blocks */
.code-block pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-block pre::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.code-block pre::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* Code header with language and copy button */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #2d2d2d;
    border-bottom: 1px solid #374151;
}

.code-language {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 500;
}

/* Copy button */
.copy-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid #4b5563;
    border-radius: 0.25rem;
    color: #9ca3af;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-button:hover {
    background: #374151;
    color: #e5e7eb;
    border-color: #6b7280;
}

.copy-button.copied {
    color: #10b981;
    border-color: #10b981;
}

.copy-button .material-icons-sharp {
    font-size: 1rem;
}

/* Syntax highlighting theme */
.token.comment { color: #6A9955; }
.token.string { color: #CE9178; }
.token.keyword { color: #569CD6; }
.token.function { color: #DCDCAA; }
.token.number { color: #B5CEA8; }
.token.operator { color: #D4D4D4; }
.token.punctuation { color: #D4D4D4; }
.token.property { color: #9CDCFE; }
.token.parameter { color: #9CDCFE; }
.token.variable { color: #9CDCFE; }
.token.constant { color: #4FC1FF; }
.token.class-name { color: #4EC9B0; }
.token.boolean { color: #569CD6; }
.token.null { color: #569CD6; }
.token.url { color: #CE9178; }
.token.regex { color: #D16969; }
.token.important { color: #569CD6; font-weight: bold; }
.token.tag { color: #569CD6; }
.token.attr-name { color: #9CDCFE; }
.token.attr-value { color: #CE9178; }
.token.selector { color: #D7BA7D; }
.token.atrule { color: #C586C0; }

/* Language-specific adjustments */
code[class*="language-"],
pre[class*="language-"] {
    color: #d4d4d4;
    text-shadow: none;
}

/* Inline code style */
code:not([class*="language-"]) {
    background: #374151;
    color: #10b981;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}
