/**
 * FreeXmlToolkit Prism Theme for XML
 * Based on the Modern Light theme from ModernXmlThemeManager
 * Matches the XML syntax highlighting in the application's XML editor
 */

code[class*="language-"],
pre[class*="language-"] {
	color: #212529;
	background: none;
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 0.9em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.6;

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

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

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: rgba(0, 123, 255, 0.2);
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
	text-shadow: none;
	background: rgba(0, 123, 255, 0.2);
}

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

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

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

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .2em .4em;
	border-radius: .25em;
	white-space: normal;
	background: #f1f5f9;
}

/* ==============================================
   XML/Markup Specific Syntax Highlighting
   Colors from ModernXmlThemeManager "Modern Light" Theme
   ============================================== */

/* XML Declaration and Processing Instructions */
.token.prolog,
.token.processing {
	color: #6f42c1;
	font-weight: bold;
}

/* DOCTYPE */
.token.doctype,
.token.doctype .token.doctype-tag,
.token.doctype .token.name {
	color: #fd7e14;
	font-weight: bold;
}

/* Comments */
.token.comment {
	color: #6c757d;
	font-style: italic;
}

/* CDATA Sections */
.token.cdata {
	color: #28a745;
	background: rgba(40, 167, 69, 0.1);
	border-radius: 3px;
	padding: 0 2px;
}

/* Punctuation: < > </ /> = " */
.token.punctuation {
	color: #495057;
}

/* Tag brackets specifically */
.token.tag > .token.punctuation {
	color: #007bff;
}

/* Element/Tag Names - Primary visual element */
.token.tag,
.token.tag .token.tag {
	color: #007bff;
	font-weight: 600;
}

/* Namespace prefix (e.g., xs: or xsd:) */
.token.namespace {
	color: #20c997;
	font-weight: bold;
	opacity: 1;
}

/* Attribute Names */
.token.attr-name {
	color: #6f42c1;
}

/* Attribute Values */
.token.attr-value,
.token.attr-value > .token.punctuation {
	color: #e83e8c;
}

/* Attribute equals sign */
.token.attr-equals {
	color: #495057;
}

/* String values (used in some contexts) */
.token.string {
	color: #e83e8c;
}

/* Entity references like &amp; &lt; &gt; */
.token.entity {
	color: #dc3545;
	cursor: help;
}

/* Text content (default) */
.token.content,
.token.plain-text {
	color: #212529;
}

/* Boolean/Number values in attributes */
.token.boolean,
.token.number,
.token.constant {
	color: #fd7e14;
}

/* Special tokens */
.token.symbol,
.token.deleted {
	color: #dc3545;
}

.token.inserted {
	color: #28a745;
}

/* Keywords (used in some XML contexts) */
.token.keyword {
	color: #6f42c1;
	font-weight: bold;
}

/* Important emphasis */
.token.important,
.token.bold {
	font-weight: bold;
}

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

/* ==============================================
   Line Numbers (if enabled)
   ============================================== */

.line-numbers .line-numbers-rows {
	border-right: 1px solid #e2e8f0;
}

.line-numbers-rows > span:before {
	color: #94a3b8;
}

/* ==============================================
   Additional styling for documentation context
   ============================================== */

/* Highlighted/Selected line */
.line-highlight {
	background: rgba(0, 123, 255, 0.08);
	border-left: 3px solid #007bff;
	margin-left: -1.25em;
	padding-left: calc(1.25em - 3px);
}

/* Toolbar (if using prism-toolbar plugin) */
div.code-toolbar > .toolbar {
	opacity: 1;
}

div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar > .toolbar-item > span {
	background: #e2e8f0;
	color: #475569;
	padding: 0.25em 0.5em;
	border-radius: 0.25em;
	font-size: 0.75em;
}

div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > a:hover {
	background: #cbd5e1;
	color: #1e293b;
}
