/**
 * WP GFM Renderer - highlight.php Themes
 *
 * CSS styles for highlight.php syntax highlighting
 * Compatible with GitHub Light/Dark themes
 *
 * @package WpGfmRenderer
 * @since 2.0.0
 */

/* ==========================================================================
   Base highlight.php styles
   ========================================================================== */

.hljs {
    display: block;
    overflow-x: auto;
    padding: 0.5em;
    color: #24292e;
    background: #f6f8fa;
}

/* ==========================================================================
   GitHub Light Theme (default)
   ========================================================================== */

.hljs-comment,
.hljs-quote {
    color: #6a737d;
    font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
    color: #d73a49;
    font-weight: 700;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
    color: #005cc5;
}

.hljs-string,
.hljs-doctag {
    color: #032f62;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
    color: #6f42c1;
    font-weight: 700;
}

.hljs-type,
.hljs-class .hljs-title {
    color: #6f42c1;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
    color: #22863a;
    font-weight: 400;
}

.hljs-regexp,
.hljs-link {
    color: #032f62;
}

.hljs-symbol,
.hljs-bullet {
    color: #e36209;
}

.hljs-built_in,
.hljs-builtin-name {
    color: #005cc5;
}

.hljs-meta {
    color: #6a737d;
}

.hljs-deletion {
    background: #ffeef0;
}

.hljs-addition {
    background: #e6ffed;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: 700;
}

/* ==========================================================================
   GitHub Dark Theme
   ========================================================================== */

@media (prefers-color-scheme: dark) {

    .hljs {
        color: #c9d1d9;
        background: #0d1117;
    }

    .hljs-comment,
    .hljs-quote {
        color: #8b949e;
    }

    .hljs-keyword,
    .hljs-selector-tag,
    .hljs-subst {
        color: #ff7b72;
    }

    .hljs-number,
    .hljs-literal,
    .hljs-variable,
    .hljs-template-variable,
    .hljs-tag .hljs-attr {
        color: #79c0ff;
    }

    .hljs-string,
    .hljs-doctag {
        color: #a5d6ff;
    }

    .hljs-title,
    .hljs-section,
    .hljs-selector-id {
        color: #d2a8ff;
    }

    .hljs-type,
    .hljs-class .hljs-title {
        color: #d2a8ff;
    }

    .hljs-tag,
    .hljs-name,
    .hljs-attribute {
        color: #7ee787;
    }

    .hljs-regexp,
    .hljs-link {
        color: #a5d6ff;
    }

    .hljs-symbol,
    .hljs-bullet {
        color: #ffa657;
    }

    .hljs-built_in,
    .hljs-builtin-name {
        color: #79c0ff;
    }

    .hljs-meta {
        color: #8b949e;
    }

    .hljs-deletion {
        background: #67060c;
    }

    .hljs-addition {
        background: #033a16;
    }
}

/* ==========================================================================
   Force Light Theme (when explicitly set)
   ========================================================================== */

[data-shiki-theme="github-light"] .hljs {
    color: #24292e;
    background: #f6f8fa;
}

[data-shiki-theme="github-light"] .hljs-comment,
[data-shiki-theme="github-light"] .hljs-quote {
    color: #6a737d;
}

[data-shiki-theme="github-light"] .hljs-keyword,
[data-shiki-theme="github-light"] .hljs-selector-tag,
[data-shiki-theme="github-light"] .hljs-subst {
    color: #d73a49;
}

[data-shiki-theme="github-light"] .hljs-string,
[data-shiki-theme="github-light"] .hljs-doctag {
    color: #032f62;
}

/* ==========================================================================
   Force Dark Theme (when explicitly set)
   ========================================================================== */

[data-shiki-theme="github-dark"] .hljs,
[data-shiki-theme="auto"] .hljs {
    color: #c9d1d9;
    background: #0d1117;
}

[data-shiki-theme="github-dark"] .hljs-comment,
[data-shiki-theme="github-dark"] .hljs-quote,
[data-shiki-theme="auto"] .hljs-comment,
[data-shiki-theme="auto"] .hljs-quote {
    color: #8b949e;
}

[data-shiki-theme="github-dark"] .hljs-keyword,
[data-shiki-theme="github-dark"] .hljs-selector-tag,
[data-shiki-theme="github-dark"] .hljs-subst,
[data-shiki-theme="auto"] .hljs-keyword,
[data-shiki-theme="auto"] .hljs-selector-tag,
[data-shiki-theme="auto"] .hljs-subst {
    color: #ff7b72;
}

[data-shiki-theme="github-dark"] .hljs-string,
[data-shiki-theme="github-dark"] .hljs-doctag,
[data-shiki-theme="auto"] .hljs-string,
[data-shiki-theme="auto"] .hljs-doctag {
    color: #a5d6ff;
}
