/*
 * SPDX-FileCopyrightText: 2012 Paul Livingstone <https://ocodia.com/>
 * SPDX-FileCopyrightText: 2012-2025 contributors <https://github.com/prismjs/prism/>
 * SPDX-FileCopyrightText: (c) 2012 Lea Verou
 * SPDX-FileCopyrightText: 2025 Oliver Geer <hi@webcoder49.dev>
 * SPDX-License-Identifier: AGPL-3.0-or-later AND MIT
 */

code[class*="language-"], pre[class*="language-"] {
	color: var(--fg-contrast);
	background: none;
	text-shadow: 0 1px rgba(0, 0, 0, 0.3);
	font-family: "Code";
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: var(--bg-contrast);
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: var(--fg-dimmed);
}

.token.punctuation {
	color: var(--fg-contrast);
}

.token.namespace {
	color: var(--fg-dimmed);
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
	color: var(--accent-pink);
}

.token.boolean,
.token.number {
	color: var(--accent-blue);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: var(--accent-green);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
	color: var(--fg-contrast);
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
	color: var(--accent-yellow);
}

.token.keyword {
	color: var(--accent-blue);
}

.token.regex,
.token.important {
	color: var(--accent-orange);
}

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

.token.entity {
	cursor: help;
}

code-input > textarea::placeholder {
	color: var(--fg-dimmed)!important;
}
code-input .line-numbers-rows {
	border-color: var(--fg-dimmed)!important;
}
code-input .line-numbers-rows > span::before {
	color: var(--fg-dimmed)!important;
}
