/* =========================================
   PRISM CUSTOM - Starlane Ghost Theme
   =========================================

   Custom overrides for Prism.js syntax highlighting
   to match the theme's dark aesthetic.

========================================= */

/* Code blocks in post content */
.post-content pre[class*="language-"],
.page-content pre[class*="language-"],
.page-content-body pre[class*="language-"],
pre[class*="language-"] {
    background: var(--bg-code, #1a1d23) !important;
    border: 1px solid var(--border-dim, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Inline code */
.post-content code:not([class*="language-"]),
.page-content code:not([class*="language-"]),
.page-content-body code:not([class*="language-"]),
:not(pre) > code {
    background: var(--bg-code, rgba(88, 166, 255, 0.1));
    color: var(--brand-primary, #58a6ff);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

/* Code inside pre blocks */
pre[class*="language-"] code {
    background: none !important;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* Light theme overrides */
[data-theme="light"] pre[class*="language-"] {
    background: #f6f8fa !important;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .post-content code:not([class*="language-"]),
[data-theme="light"] .page-content code:not([class*="language-"]),
[data-theme="light"] .page-content-body code:not([class*="language-"]),
[data-theme="light"] :not(pre) > code {
    background: rgba(88, 166, 255, 0.15);
    color: #0969da;
}

/* Token colors - Dark theme (Tomorrow Night style) */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6a737d;
}

.token.punctuation {
    color: #c9d1d9;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #ff7b72;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #a5d6ff;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #79c0ff;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #ff7b72;
}

.token.function,
.token.class-name {
    color: #d2a8ff;
}

.token.regex,
.token.important,
.token.variable {
    color: #ffa657;
}

/* Light theme token overrides */
[data-theme="light"] .token.comment,
[data-theme="light"] .token.prolog,
[data-theme="light"] .token.doctype,
[data-theme="light"] .token.cdata {
    color: #6a737d;
}

[data-theme="light"] .token.punctuation {
    color: #24292f;
}

[data-theme="light"] .token.property,
[data-theme="light"] .token.tag,
[data-theme="light"] .token.boolean,
[data-theme="light"] .token.number,
[data-theme="light"] .token.constant,
[data-theme="light"] .token.symbol,
[data-theme="light"] .token.deleted {
    color: #cf222e;
}

[data-theme="light"] .token.selector,
[data-theme="light"] .token.attr-name,
[data-theme="light"] .token.string,
[data-theme="light"] .token.char,
[data-theme="light"] .token.builtin,
[data-theme="light"] .token.inserted {
    color: #0a3069;
}

[data-theme="light"] .token.operator,
[data-theme="light"] .token.entity,
[data-theme="light"] .token.url,
[data-theme="light"] .language-css .token.string,
[data-theme="light"] .style .token.string {
    color: #0550ae;
}

[data-theme="light"] .token.atrule,
[data-theme="light"] .token.attr-value,
[data-theme="light"] .token.keyword {
    color: #cf222e;
}

[data-theme="light"] .token.function,
[data-theme="light"] .token.class-name {
    color: #8250df;
}

[data-theme="light"] .token.regex,
[data-theme="light"] .token.important,
[data-theme="light"] .token.variable {
    color: #953800;
}

/* Line numbers plugin (if used) */
.line-numbers .line-numbers-rows {
    border-right-color: var(--border-dim, rgba(255, 255, 255, 0.1));
}

.line-numbers-rows > span:before {
    color: #6e7681;
}

/* Copy button styling (if added) */
.code-toolbar .toolbar {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.code-toolbar:hover .toolbar {
    opacity: 1;
}

.code-toolbar .toolbar button {
    background: var(--bg-elevated, #21262d);
    color: var(--text-secondary, #c9d1d9);
    border: 1px solid var(--border-dim, rgba(255, 255, 255, 0.1));
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.code-toolbar .toolbar button:hover {
    background: var(--bg-hover, #30363d);
    color: var(--text-primary, #f0f6fc);
}

/* Ghost's kg-code-card styling */
.kg-code-card {
    margin: 1.5rem 0;
}

.kg-code-card pre {
    margin: 0;
}

.kg-code-card figcaption {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-dim, #8b949e);
    text-align: center;
}
