/* Code highlighting (via Prism.js)
   ========================================================================== */

code[class*="language-"],
pre[class*="language-"] {
    direction: ltr;
    hyphens: none;
    text-align: left;
    word-wrap: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: pre;
}

/**
 * Inline code.
 */

:not(pre) > code[class*="language-"] {
    white-space: normal;
}

/**
 * Syntax colours/styles.
 */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #708090;
}

.token.punctuation {
    color: #999999;
}

.namespace {
    opacity: 0.7;
}

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

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

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

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

.token.function {
    color: #dd4a68;
}

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

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

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

.token.entity {
    cursor: help;
}

@include dark-mode {
    .token.punctuation {
        color: #ffffff;
    }

    .token.property,
    .token.tag,
    .token.boolean,
    .token.number,
    .token.constant,
    .token.symbol,
    .token.deleted {
        color: $dark-color-error-text;
    }

    .token.selector,
    .token.attr-name,
    .token.string,
    .token.char,
    .token.builtin,
    .token.inserted {
        color: $dark-color-success-text;
    }

    .token.operator,
    .token.entity,
    .token.url,
    .language-css .token.string,
    .style .token.string {
        color: $dark-color-warning-text;
    }

    .token.atrule,
    .token.attr-value,
    .token.keyword {
        color: $dark-color-info-text;
    }

    .line-numbers .line-numbers-rows {
        border-right-color: $dark-color-text-footnote;
    }

    .line-numbers-rows > span::before {
        color: $dark-color-text-footnote;
    }
}
