/**
 * BoxCart Prism.js Syntax Highlighting Theme
 *
 * A branded syntax theme that works in both light and dark modes.
 * Based on the BoxCart design system colours.
 */

/* Light mode */
code[class*="language-"],
pre[class*="language-"] {
    color: #2C3338;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    tab-size: 4;
    hyphens: none;
}

/* Token colours — Light */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #787C82;
    font-style: italic;
}

.token.punctuation {
    color: #50575E;
}

.token.namespace {
    opacity: 0.7;
}

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

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

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

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

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

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

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/* Line highlighting */
.line-highlight {
    background: rgba(45, 125, 95, 0.08);
    border-left: 3px solid var(--bc-primary, #2D7D5F);
    margin-left: -16px;
    padding-left: 13px;
}

/* Line numbers */
.line-numbers .line-numbers-rows {
    border-right: 1px solid var(--bc-border, #DCDCDE);
}
.line-numbers-rows > span:before {
    color: var(--bc-text-muted, #787C82);
}

/* ==========================================================================
   Dark Mode Overrides
   ========================================================================== */

[data-theme="dark"] code[class*="language-"],
[data-theme="dark"] pre[class*="language-"] {
    color: #E8E8EA;
}

[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
    color: #8C8F94;
}

[data-theme="dark"] .token.punctuation {
    color: #B0B0B4;
}

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

[data-theme="dark"] .token.selector,
[data-theme="dark"] .token.attr-name,
[data-theme="dark"] .token.string,
[data-theme="dark"] .token.char,
[data-theme="dark"] .token.builtin,
[data-theme="dark"] .token.inserted {
    color: #7CC4A8;
}

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

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

[data-theme="dark"] .token.function,
[data-theme="dark"] .token.class-name {
    color: #C88AE8;
}

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

[data-theme="dark"] .line-highlight {
    background: rgba(124, 196, 168, 0.08);
}
