/*
 * Frontend-Basis-Styling für den Code-Block.
 * Bewusst KEIN eigenes Farbschema für Hintergrund/Text mehr, sobald eine
 * Sprache gewählt ist – das übernimmt dann Prism.js (vendor/prism.min.css,
 * Standard-"prism"-Theme). Diese Regeln greifen nur, wenn keine Sprache
 * gewählt wurde bzw. als sinnvoller Rahmen um Prisms eigenes Styling.
 */
.custom-code-block-wrapper {
	margin: 0 0 1.5em;
	overflow-x: auto;
	border-radius: 4px;
}

.custom-code-block-wrapper code {
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	white-space: pre;
	tab-size: 4;
	-moz-tab-size: 4;
}

/* Fallback-Optik, falls keine Sprache gewählt ist (kein Prism-Theme aktiv). */
.custom-code-block-wrapper:not(:has(code[class*='language-'])) {
	background: #f5f2f0;
	padding: 1em;
}

.custom-code-block-wrapper:not(:has(code[class*='language-'])) code {
	color: #333;
}

/* "Lange Zeilen umbrechen"-Toggle: überschreibt Prisms Standard white-space:pre. */
.custom-code-block-wrapper.custom-code-block-wrap-lines {
	overflow-x: visible;
}

.custom-code-block-wrapper.custom-code-block-wrap-lines code[class*='language-'] {
	white-space: pre-wrap;
	word-break: break-word;
}

/* Dezenteres Sprach-Badge/Toolbar (Prisms "show-language"/"toolbar"-Plugin)
 * oben rechts, statt der Standard-Optik. */
.custom-code-block-wrapper .toolbar-item button {
	background: rgba( 0, 0, 0, 0.5 );
	color: #fff;
	font-size: 0.75em;
	border-radius: 3px;
	padding: 0.25em 0.6em;
}

.custom-code-block-wrapper .toolbar-item button:hover {
	background: rgba( 0, 0, 0, 0.7 );
	color: #fff;
}
