/**
 * TobPress Prism theme.
 *
 * Custom token colours driven entirely by TobPress semantic CSS
 * variables, so code blocks follow the light/dark scheme with no
 * hard-coded theme colours. Loaded only on singular views whose
 * content contains code (see tobpress_enqueue()).
 */

code[class*="language-"],
pre[class*="language-"] {
	color: var(--tb-code-text, var(--tb-text));
	font-family: var(--wp--preset--font-family--mono, ui-monospace, Menlo, Consolas, monospace);
	font-size: 0.875em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	line-height: 1.6;
	tab-size: 4;
	hyphens: none;
}

pre[class*="language-"] {
	padding: 1em 1.1em;
	margin: 1.25em 0;
	overflow: auto;
	background: var(--tb-code-bg, var(--tb-surface));
	border: 1px solid var(--tb-border);
	border-radius: 12px;
}

:not(pre) > code[class*="language-"] {
	padding: 0.15em 0.35em;
	border-radius: 6px;
	background: var(--tb-code-bg, var(--tb-surface));
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: var(--tb-code-comment, var(--tb-muted));
	font-style: italic;
}

.token.punctuation {
	color: var(--tb-code-punct, var(--tb-muted));
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: var(--tb-code-number, var(--tb-accent));
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: var(--tb-code-string, var(--tb-primary));
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: var(--tb-code-operator, var(--tb-text));
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: var(--tb-code-keyword, var(--tb-primary));
	font-weight: 600;
}

.token.function,
.token.class-name {
	color: var(--tb-code-function, var(--tb-accent));
}

.token.regex,
.token.important,
.token.variable {
	color: var(--tb-code-variable, var(--tb-accent));
}

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

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

.token.entity {
	cursor: help;
}
