/** Wikiedit-related (JavaScript) ********************************************/
	/* WikiEdit Toolbar -------------------------------------- */
.we-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 0;
	background: var(--we-toolbar-bg);
	border: 1px solid var(--ww-border);
	list-style: none;
	margin: 0;
}

.we-toolbar li {
	margin: 0;
}

.we-toolbar .btn- {
	width: 28px;
	height: 28px;
	padding: 0px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ww-buttonface);
	background: var(--ww-buttonface);
	transition: all 0.1s;
	cursor: pointer;
}

.we-toolbar .btn-:hover,
.we-toolbar .btn-:focus {
	background: var(ww-bg-tertiary);
	border-color: #999;
	outline: 2px solid #007bff;
	outline-offset: -2px;
}

.we-toolbar .btn-pressed {
	background: var(--ww-bg-secondary);
	transform: scale(0.95);
}

/* Mobile / small screens */
@media (max-width: 768px) {
	.we-toolbar {
		gap: 3px;
		padding: 4px;
	}

	.we-toolbar .btn- {
		width: 28px;
		height: 28px;
		padding: 3px;
		font-size: 0.9em;
	}
}

.we-toolbar button.active,
.we-toolbar button.active:hover {
	background: var(--ww-bg-primary) !important;
	/* border-color: #005a99; */
}

/* Fullscreen mode */
.we-fullscreen[open] .we-toolbar,
body:has(.we-fullscreen[open]) .we-toolbar {
	padding: 4px 6px;
	gap: 3px;
}

.we-toolbar .btn-separator {
	border-left: 1px solid var(--ww-buttonshadow);
	border-right: 1px solid var(--ww-buttonhighlight);
	height: 20px;
	margin: 3px;
	padding: 0;
	width: 0;
}

.we-toolbar img,
.we-toolbar a img,
.we-toolbar span img {
	border: medium none;
	height: 1.375rem;
	width: 1.375rem;
}

.we-toolbar li img {
	background-size: 1.375rem 1.375rem;
}

/* Toolbar icons */
.we-toolbar li.we-h1 img {
	background: url('../../../image/wikiedit/light/h1.svg') no-repeat;
}
.we-toolbar li.we-h2 img {
	background: url('../../../image/wikiedit/light/h2.svg') no-repeat;
}
.we-toolbar li.we-h3 img {
	background: url('../../../image/wikiedit/light/h3.svg') no-repeat;
}
.we-toolbar li.we-h4 img {
	background: url('../../../image/wikiedit/light/h4.svg') no-repeat;
}
.we-toolbar li.we-h5 img {
	background: url('../../../image/wikiedit/light/h5.svg') no-repeat;
}
.we-toolbar li.we-h6 img {
	background: url('../../../image/wikiedit/light/h6.svg') no-repeat;
}
.we-toolbar li.we-bold img {
	background: url('../../../image/wikiedit/light/bold.svg') no-repeat;
}
.we-toolbar li.we-italic img {
	background: url('../../../image/wikiedit/light/italic.svg') no-repeat;
}
.we-toolbar li.we-underline img {
	background: url('../../../image/wikiedit/light/underline.svg') no-repeat;
}
.we-toolbar li.we-strike img {
	background: url('../../../image/wikiedit/light/strike.svg') no-repeat;
}
.we-toolbar li.we-small img {
	background: url('../../../image/wikiedit/light/small.svg') no-repeat;
}
.we-toolbar li.we-superscript img {
	background: url('../../../image/wikiedit/light/superscript.svg') no-repeat;
}
.we-toolbar li.we-subscript img {
	background: url('../../../image/wikiedit/light/subscript.svg') no-repeat;
}
.we-toolbar li.we-ul img {
	background: url('../../../image/wikiedit/light/ul.svg') no-repeat;
}
.we-toolbar li.we-ol img {
	background: url('../../../image/wikiedit/light/ol.svg') no-repeat;
}
.we-toolbar li.we-center img {
	background: url('../../../image/wikiedit/light/center.svg') no-repeat;
}
.we-toolbar li.we-justify img {
	background: url('../../../image/wikiedit/light/justify.svg') no-repeat;
}
.we-toolbar li.we-right img {
	background: url('../../../image/wikiedit/light/right.svg') no-repeat;
}
.we-toolbar li.we-outdent img {
	background: url('../../../image/wikiedit/light/outdent.svg') no-repeat;
}
.we-toolbar li.we-indent img {
	background: url('../../../image/wikiedit/light/indent.svg') no-repeat;
}
.we-toolbar li.we-hr img {
	background: url('../../../image/wikiedit/light/hr.svg') no-repeat;
}
.we-toolbar li.we-signature img {
	background: url('../../../image/wikiedit/light/signature.svg') no-repeat;
}
.we-toolbar li.we-quote img {
	background: url('../../../image/wikiedit/light/quote.svg') no-repeat;
}
.we-toolbar li.we-source img {
	background: url('../../../image/wikiedit/light/source.svg') no-repeat;
}
.we-toolbar li.we-code img {
	background: url('../../../image/wikiedit/light/code.svg') no-repeat;
}
.we-toolbar li.we-action img {
	background: url('../../../image/wikiedit/light/action.svg') no-repeat;
}
.we-toolbar li.we-footnote img {
	background: url('../../../image/wikiedit/light/footnote.svg') no-repeat;
}
.we-toolbar li.we-createlink img {
	background: url('../../../image/wikiedit/light/link.svg') no-repeat;
}
.we-toolbar li.we-createtable img {
	background: url('../../../image/wikiedit/light/table.svg') no-repeat;
}
.we-toolbar li.we-textred img {
	background: url('../../../image/wikiedit/light/textcolor.svg') no-repeat;
}
.we-toolbar li.we-highlight img {
	background: url('../../../image/wikiedit/light/highlight.svg') no-repeat;
}
.we-toolbar li.we-search img {
	background: url('../../../image/wikiedit/light/find-replace.svg') no-repeat;
}
.we-toolbar li.we-about img {
	background: url('../../../image/wikiedit/light/about.svg') no-repeat;
}
.we-toolbar li.we-fullscreen img {
	background: url('../../../image/wikiedit/light/view-fullscreen.svg') no-repeat;
}
.we-toolbar li.we-livepreview img {
	background: url('../../../image/wikiedit/light/view-presentation.svg') no-repeat;
}
.we-toolbar li.we-dropdown > button img {
	background: url('../../../image/wikiedit/light/open-more.svg') no-repeat;
}
.we-toolbar li.we-help img {
	background: url('../../../image/wikiedit/light/help.svg') no-repeat;
}
.we-toolbar li.we-wacko2md img {
	background: url('../../../image/wikiedit/light/markdown.svg') no-repeat;
}
.we-toolbar li.we-md2wacko img {
	background: url('../../../image/wikiedit/light/markup.svg') no-repeat;
}
.we-toolbar li.we-syntax img {
	background: url('../../../image/wikiedit/light/hl-syntax.svg') no-repeat;
}
.we-toolbar li.we-enlarge img {
	background: url('../../../image/wikiedit/light/go-down.svg') no-repeat;
}
.we-toolbar li.we-shrink img {
	background: url('../../../image/wikiedit/light/go-up.svg') no-repeat;
}
.we-toolbar li.we-undo img {
	background: url('../../../image/wikiedit/light/edit-undo.svg') no-repeat;
}
.we-toolbar li.we-redo img {
	background: url('../../../image/wikiedit/light/edit-redo.svg') no-repeat;
}
.we-toolbar li.we-dark-toggle img {
	background: url('../../../image/wikiedit/light/darkmode.svg') no-repeat;
}
.we-toolbar li.we-upload-media img {
	background: url('../../../image/wikiedit/light/upload.svg') no-repeat;
}
.we-toolbar li.we-zenmode img {
	background: url('../../../image/wikiedit/light/full-width.svg') no-repeat;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		.we-toolbar li.we-h1 img {
			background: url('../../../image/wikiedit/dark/h1.svg') no-repeat;
		}
		.we-toolbar li.we-h2 img {
			background: url('../../../image/wikiedit/dark/h2.svg') no-repeat;
		}
		.we-toolbar li.we-h3 img {
			background: url('../../../image/wikiedit/dark/h3.svg') no-repeat;
		}
		.we-toolbar li.we-h4 img {
			background: url('../../../image/wikiedit/dark/h4.svg') no-repeat;
		}
		.we-toolbar li.we-h5 img {
			background: url('../../../image/wikiedit/dark/h5.svg') no-repeat;
		}
		.we-toolbar li.we-h6 img {
			background: url('../../../image/wikiedit/dark/h6.svg') no-repeat;
		}
		.we-toolbar li.we-bold img {
			background: url('../../../image/wikiedit/dark/bold.svg') no-repeat;
		}
		.we-toolbar li.we-italic img {
			background: url('../../../image/wikiedit/dark/italic.svg') no-repeat;
		}
		.we-toolbar li.we-underline img {
			background: url('../../../image/wikiedit/dark/underline.svg') no-repeat;
		}
		.we-toolbar li.we-strike img {
			background: url('../../../image/wikiedit/dark/strike.svg') no-repeat;
		}
		.we-toolbar li.we-small img {
			background: url('../../../image/wikiedit/dark/small.svg') no-repeat;
		}
		.we-toolbar li.we-superscript img {
			background: url('../../../image/wikiedit/dark/superscript.svg') no-repeat;
		}
		.we-toolbar li.we-subscript img {
			background: url('../../../image/wikiedit/dark/subscript.svg') no-repeat;
		}
		.we-toolbar li.we-ul img {
			background: url('../../../image/wikiedit/dark/ul.svg') no-repeat;
		}
		.we-toolbar li.we-ol img {
			background: url('../../../image/wikiedit/dark/ol.svg') no-repeat;
		}
		.we-toolbar li.we-center img {
			background: url('../../../image/wikiedit/dark/center.svg') no-repeat;
		}
		.we-toolbar li.we-justify img {
			background: url('../../../image/wikiedit/dark/justify.svg') no-repeat;
		}
		.we-toolbar li.we-right img {
			background: url('../../../image/wikiedit/dark/right.svg') no-repeat;
		}
		.we-toolbar li.we-outdent img {
			background: url('../../../image/wikiedit/dark/outdent.svg') no-repeat;
		}
		.we-toolbar li.we-indent img {
			background: url('../../../image/wikiedit/dark/indent.svg') no-repeat;
		}
		.we-toolbar li.we-hr img {
			background: url('../../../image/wikiedit/dark/hr.svg') no-repeat;
		}
		.we-toolbar li.we-signature img {
			background: url('../../../image/wikiedit/dark/signature.svg') no-repeat;
		}
		.we-toolbar li.we-quote img {
			background: url('../../../image/wikiedit/dark/quote.svg') no-repeat;
		}
		.we-toolbar li.we-source img {
			background: url('../../../image/wikiedit/dark/source.svg') no-repeat;
		}
		.we-toolbar li.we-code img {
			background: url('../../../image/wikiedit/dark/code.svg') no-repeat;
		}
		.we-toolbar li.we-action img {
			background: url('../../../image/wikiedit/dark/action.svg') no-repeat;
		}
		.we-toolbar li.we-footnote img {
			background: url('../../../image/wikiedit/dark/footnote.svg') no-repeat;
		}
		.we-toolbar li.we-createlink img {
			background: url('../../../image/wikiedit/dark/link.svg') no-repeat;
		}
		.we-toolbar li.we-createtable img {
			background: url('../../../image/wikiedit/dark/table.svg') no-repeat;
		}
		.we-toolbar li.we-textred img {
			background: url('../../../image/wikiedit/dark/textcolor.svg') no-repeat;
		}
		.we-toolbar li.we-highlight img {
			background: url('../../../image/wikiedit/dark/highlight.svg') no-repeat;
		}
		.we-toolbar li.we-search img {
			background: url('../../../image/wikiedit/dark/find-replace.svg') no-repeat;
		}
		.we-toolbar li.we-about img {
			background: url('../../../image/wikiedit/dark/about.svg') no-repeat;
		}
		.we-toolbar li.we-fullscreen img {
			background: url('../../../image/wikiedit/dark/view-fullscreen.svg') no-repeat;
		}
		.we-toolbar li.we-livepreview img {
			background: url('../../../image/wikiedit/dark/view-presentation.svg') no-repeat;
		}
		.we-toolbar li.we-dropdown > button img {
			background: url('../../../image/wikiedit/dark/open-more.svg') no-repeat;
		}
		.we-toolbar li.we-help img {
			background: url('../../../image/wikiedit/dark/help.svg') no-repeat;
		}
		.we-toolbar li.we-wacko2md img {
			background: url('../../../image/wikiedit/dark/markdown.svg') no-repeat;
		}
		.we-toolbar li.we-md2wacko img {
			background: url('../../../image/wikiedit/dark/markup.svg') no-repeat;
		}
		.we-toolbar li.we-syntax img {
			background: url('../../../image/wikiedit/dark/hl-syntax.svg') no-repeat;
		}
		.we-toolbar li.we-enlarge img {
			background: url('../../../image/wikiedit/dark/go-down.svg') no-repeat;
		}
		.we-toolbar li.we-shrink img {
			background: url('../../../image/wikiedit/dark/go-up.svg') no-repeat;
		}
		.we-toolbar li.we-undo img {
			background: url('../../../image/wikiedit/dark/edit-undo.svg') no-repeat;
		}
		.we-toolbar li.we-redo img {
			background: url('../../../image/wikiedit/dark/edit-redo.svg') no-repeat;
		}
		.we-toolbar li.we-dark-toggle img {
			background: url('../../../image/wikiedit/dark/darkmode.svg') no-repeat;
		}
		.we-toolbar li.we-upload-media img {
			background: url('../../../image/wikiedit/dark/upload.svg') no-repeat;
		}
		.we-toolbar li.we-zenmode img {
			background: url('../../../image/wikiedit/dark/full-width.svg') no-repeat;
		}
	}
}

:root[data-theme="dark"] {
	.we-toolbar li.we-h1 img {
		background: url('../../../image/wikiedit/dark/h1.svg') no-repeat;
	}
	.we-toolbar li.we-h2 img {
		background: url('../../../image/wikiedit/dark/h2.svg') no-repeat;
	}
	.we-toolbar li.we-h3 img {
		background: url('../../../image/wikiedit/dark/h3.svg') no-repeat;
	}
	.we-toolbar li.we-h4 img {
		background: url('../../../image/wikiedit/dark/h4.svg') no-repeat;
	}
	.we-toolbar li.we-h5 img {
		background: url('../../../image/wikiedit/dark/h5.svg') no-repeat;
	}
	.we-toolbar li.we-h6 img {
		background: url('../../../image/wikiedit/dark/h6.svg') no-repeat;
	}
	.we-toolbar li.we-bold img {
		background: url('../../../image/wikiedit/dark/bold.svg') no-repeat;
	}
	.we-toolbar li.we-italic img {
		background: url('../../../image/wikiedit/dark/italic.svg') no-repeat;
	}
	.we-toolbar li.we-underline img {
		background: url('../../../image/wikiedit/dark/underline.svg') no-repeat;
	}
	.we-toolbar li.we-strike img {
		background: url('../../../image/wikiedit/dark/strike.svg') no-repeat;
	}
	.we-toolbar li.we-small img {
		background: url('../../../image/wikiedit/dark/small.svg') no-repeat;
	}
	.we-toolbar li.we-superscript img {
		background: url('../../../image/wikiedit/dark/superscript.svg') no-repeat;
	}
	.we-toolbar li.we-subscript img {
		background: url('../../../image/wikiedit/dark/subscript.svg') no-repeat;
	}
	.we-toolbar li.we-ul img {
		background: url('../../../image/wikiedit/dark/ul.svg') no-repeat;
	}
	.we-toolbar li.we-ol img {
		background: url('../../../image/wikiedit/dark/ol.svg') no-repeat;
	}
	.we-toolbar li.we-center img {
		background: url('../../../image/wikiedit/dark/center.svg') no-repeat;
	}
	.we-toolbar li.we-justify img {
		background: url('../../../image/wikiedit/dark/justify.svg') no-repeat;
	}
	.we-toolbar li.we-right img {
		background: url('../../../image/wikiedit/dark/right.svg') no-repeat;
	}
	.we-toolbar li.we-outdent img {
		background: url('../../../image/wikiedit/dark/outdent.svg') no-repeat;
	}
	.we-toolbar li.we-indent img {
		background: url('../../../image/wikiedit/dark/indent.svg') no-repeat;
	}
	.we-toolbar li.we-hr img {
		background: url('../../../image/wikiedit/dark/hr.svg') no-repeat;
	}
	.we-toolbar li.we-signature img {
		background: url('../../../image/wikiedit/dark/signature.svg') no-repeat;
	}
	.we-toolbar li.we-quote img {
		background: url('../../../image/wikiedit/dark/quote.svg') no-repeat;
	}
	.we-toolbar li.we-source img {
		background: url('../../../image/wikiedit/dark/source.svg') no-repeat;
	}
	.we-toolbar li.we-code img {
		background: url('../../../image/wikiedit/dark/code.svg') no-repeat;
	}
	.we-toolbar li.we-action img {
		background: url('../../../image/wikiedit/dark/action.svg') no-repeat;
	}
	.we-toolbar li.we-footnote img {
		background: url('../../../image/wikiedit/dark/footnote.svg') no-repeat;
	}
	.we-toolbar li.we-createlink img {
		background: url('../../../image/wikiedit/dark/link.svg') no-repeat;
	}
	.we-toolbar li.we-createtable img {
		background: url('../../../image/wikiedit/dark/table.svg') no-repeat;
	}
	.we-toolbar li.we-textred img {
		background: url('../../../image/wikiedit/dark/textcolor.svg') no-repeat;
	}
	.we-toolbar li.we-highlight img {
		background: url('../../../image/wikiedit/dark/highlight.svg') no-repeat;
	}
	.we-toolbar li.we-search img {
		background: url('../../../image/wikiedit/dark/find-replace.svg') no-repeat;
	}
	.we-toolbar li.we-about img {
		background: url('../../../image/wikiedit/dark/about.svg') no-repeat;
	}
	.we-toolbar li.we-fullscreen img {
		background: url('../../../image/wikiedit/dark/view-fullscreen.svg') no-repeat;
	}
	.we-toolbar li.we-livepreview img {
		background: url('../../../image/wikiedit/dark/view-presentation.svg') no-repeat;
	}
	.we-toolbar li.we-dropdown > button img {
		background: url('../../../image/wikiedit/dark/open-more.svg') no-repeat;
	}
	.we-toolbar li.we-help img {
		background: url('../../../image/wikiedit/dark/help.svg') no-repeat;
	}
	.we-toolbar li.we-wacko2md img {
		background: url('../../../image/wikiedit/dark/markdown.svg') no-repeat;
	}
	.we-toolbar li.we-md2wacko img {
		background: url('../../../image/wikiedit/dark/markup.svg') no-repeat;
	}
	.we-toolbar li.we-syntax img {
		background: url('../../../image/wikiedit/dark/hl-syntax.svg') no-repeat;
	}
	.we-toolbar li.we-enlarge img {
		background: url('../../../image/wikiedit/dark/go-down.svg') no-repeat;
	}
	.we-toolbar li.we-shrink img {
		background: url('../../../image/wikiedit/dark/go-up.svg') no-repeat;
	}
	.we-toolbar li.we-undo img {
		background: url('../../../image/wikiedit/dark/edit-undo.svg') no-repeat;
	}
	.we-toolbar li.we-redo img {
		background: url('../../../image/wikiedit/dark/edit-redo.svg') no-repeat;
	}
	.we-toolbar li.we-dark-toggle img {
		background: url('../../../image/wikiedit/dark/darkmode.svg') no-repeat;
	}
	.we-toolbar li.we-upload-media img {
		background: url('../../../image/wikiedit/dark/upload.svg') no-repeat;
	}
	.we-toolbar li.we-zenmode img {
		background: url('../../../image/wikiedit/dark/full-width.svg') no-repeat;
	}
}

/* Our custom height/draft buttons */
.we-toolbar button[title*="height"],
.we-toolbar button[title*="draft"] {
	font-size: 18px;
	width: 32px;
	height: 32px;
	background: var(--ww-buttonface);
	color: var(--ww-buttontext);
}

:root[data-theme="dark"] .we-toolbar button[title*="height"],
:root[data-theme="dark"] .we-toolbar button[title*="draft"] {
	background: var(--we-toolbar-bg);
	color: #ddd;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .we-toolbar button[title*="height"],
	:root:not([data-theme="light"]) .we-toolbar button[title*="draft"] {
		background: var(--we-toolbar-bg);
		color: #ddd;
	}
}

.we-statusbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.85rem;
	color: #555;
	background: var(--ww-bg-accent);
	border: 1px solid #ddd;
	border-top: none;
	padding: 4px 10px;
	/* margin-top: -5px; */
	border-radius: 0 0 4px 4px;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}

.we-statusbar span {
	white-space: nowrap;
}

/* Textarea */
textarea.textarea-page,
textarea.textarea-comment {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	resize: none;
	color: var(--we-textarea-text);
	caret-color: var(--we-textarea-caret);
	background: var(--we-textarea-bg);
	overflow-y: auto;
	overflow-x: auto;
	scrollbar-gutter: stable;
	white-space: pre-wrap;
	overflow-wrap: break-word;
	word-break: normal;
}

textarea.textarea-page:not(.syntax-enabled),
textarea.textarea-comment:not(.syntax-enabled) {
	color: var(--we-textarea-text);
	background: var(--we-textarea-bg);
	caret-color: var(--we-textarea-caret);
}

/* === SYNTAX HIGHLIGHTING === */
.syntax-highlighter {
	tab-size: 4;
	overflow-wrap: break-word;
	word-break: normal;
}

.syntax-container {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
}

.syntax-highlighter {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: inherit;
	overflow: hidden;
	pointer-events: none;
	background: transparent;
	white-space: pre-wrap;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	tab-size: inherit;
	letter-spacing: inherit;
	word-spacing: inherit;
	z-index: 0;
	color: var(--we-textarea-text, #222);
}

/* Dark mode syntax highlighter */
@media (prefers-color-scheme: dark) {
	.syntax-highlighter {
		color: #ddd;
	}
}

/* Textarea on top when syntax is enabled */
textarea.syntax-enabled {
	background: transparent !important;
	color: transparent !important;
	caret-color: var(--we-textarea-caret, #000) !important;
	z-index: 1;
	position: relative;
}

.wikiedit-split-container {
	background: var(--we-split-bg);
	resize: vertical;
	min-height: 300px;
	overflow: hidden;
}

.wikiedit-area.dragover {
	background: #e0f0ff !important;
	outline: 3px dashed #0099ff;
	transition: all 0.2s;
}
@media (prefers-color-scheme: dark) {
	.wikiedit-area.dragover {
		background: #003344 !important;
		outline-color: #44ccff;
	}
}

/* Wiki syntax token colors */
.wiki-h { color: #0073aa; }
.wiki-bold { color: #d00; }
.wiki-italic { color: #070; }
.wiki-underline { color: #00a; text-decoration: underline; }
.wiki-strike { color: #666; text-decoration: line-through; }
.wiki-code { color: #660; background: #ffc; border-radius: 2px; }
.wiki-link { color: #00c; }
.wiki-list { color: #c60; }
.wiki-block { color: #a0a; }
.wiki-hr { color: #999; }

:root[data-theme="dark"] {
	.wiki-h { color: #5ab0ff; }
	.wiki-bold { color: #ff6b6b; }
	.wiki-italic { color: #7fff7f; }
	.wiki-underline { color: #88ccff; }
	.wiki-strike { color: #aaa; }
	.wiki-code { color: #ffcc66; background: #332; }
	.wiki-link { color: #88ccff; }
	.wiki-list { color: #ffaa66; }
	.wiki-block { color: #cc88ff; }
	.wiki-hr { color: #777; }
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		.wiki-h { color: #5ab0ff; }
		.wiki-bold { color: #ff6b6b; }
		.wiki-italic { color: #7fff7f; }
		.wiki-underline { color: #88ccff; }
		.wiki-strike { color: #aaa; }
		.wiki-code { color: #ffcc66; background: #332; }
		.wiki-link { color: #88ccff; }
		.wiki-list { color: #ffaa66; }
		.wiki-block { color: #cc88ff; }
		.wiki-hr { color: #777; }
	}
}

.we-syntax button {
	font-size: 18px !important;
}

/* Optional dark-mode support for statusbar & fullscreen */
:root[data-theme="dark"] {
	.we-statusbar {
		background: var(--ww-bg-accent);
		color: #aaa;
		border-color: #444;
	}
	.we-statusbar .we-message {
		color: #4ade80;
	}
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		.we-statusbar {
			background: var(--ww-bg-accent);
			color: #aaa;
			border-color: #444;
		}
		.we-statusbar .we-message {
			color: #4ade80;
		}
	}
}

/* Fullscreen edit container */
#page-edit:fullscreen {
	background: var(--ww-bg-primary);
	padding: 4rem;
	margin: 0;
	height: 100vh;
	width: 100vw;
	overflow: hidden;
}


.draft-infobox {
  margin: 8px 0 12px 0;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  color: #856404;
}

.draft-infobox button {
  margin-right: 8px;
}

/* WikiEdit modal Forms --------------------------------- */
.we-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	font-family: system-ui, -apple-system, sans-serif;
}

.we-modal[open],
.we-modal.show {
	display: flex;
}

.we-modal-dialog {
	background: var(--ww-bg-secondary);
	color: var(--ww-text); 
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	max-width: 460px;
	width: 100%;
}

.we-find-panel {
	display: none;
	position: fixed;
	top: 20px;
	right: 20px;
	background: var(--ww-bg-secondary);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	width: 460px;
	z-index: 100001;
	font-family: system-ui, -apple-system, sans-serif;
}

.we-find-panel.show {
	display: block;
}

.we-panel-header {
	padding: 12px 20px;
	border-bottom: 1px solid #ddd;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.we-panel-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: 600;
}

.we-panel-close {
	background: none;
	border: none;
	font-size: 1.4em;
	cursor: pointer;
	color: #666;
	padding: 0;
	line-height: 1;
}

.we-panel-body {
	padding: 20px 24px;
}

.we-panel-actions {
	margin-top: 20px;
}

.we-modal-header {
	padding: 20px 24px 8px 24px;
}

.we-modal-title {
	margin: 0 0 18px 0;
	font-size: 1.25em;
}

.we-modal-body {
	padding: 0 24px 24px 24px;
}

.we-form-group {
	margin-bottom: 16px;
}

.we-form-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.95em;
}

.we-form-input {
	width: 100%;
}

.we-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 24px;
}

.we-form-checkboxes {
	display: flex;
	gap: 24px;
	margin-bottom: 24px;
}

.we-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.95em;
}

.we-modal-actions {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
}

.we-modal-footer {
	margin-top: 24px;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 0 24px 24px 24px;
}

.we-shortcuts-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #eee;
}
.we-shortcuts-table th {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 2px solid #ddd;
	background: var(--ww-bg-accent);
}

.we-dropdown {
	position: relative;
	display: inline-block;
}

.we-dropdown:hover .we-dropdown-menu,
.we-dropdown .we-dropdown-menu:hover {
	display: block;
}

.we-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 0;
	background: #fff;
	border: 1px solid var(--ww-border);
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	padding: 0;
	min-width: 2.6rem;
	z-index: 100002;
	list-style: none;
}

.we-dropdown-menu li {
	padding: 6px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	white-space: nowrap;
}

.we-dropdown-menu li:hover {
	background: #f0f0f0;
}

/* WikiEdit Autocomplete */
.we-autocomplete-container {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.we-autocomplete-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10000;
	display: none;
	background: var(--ww-bg-secondary);
	border: 1px solid var(--ww-border);
	border-radius: 6px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	min-width: 240px;
	max-height: 340px;
	overflow-y: auto;
	list-style: none;
	padding: 6px 0;
	margin: 4px 0 0 0;
	font-size: var(--ww-font-size-base);
}

@media (prefers-color-scheme: dark) {
	.we-autocomplete-dropdown {
		border-color: #555;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
	}
}

.we-autocomplete-dropdown-item {
	padding: 8px 14px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.we-autocomplete-dropdown-item:hover,
.we-autocomplete-dropdown-item.selected {
	background: var(--ww-hover-primary);
}

.we-autocomplete-btn {
	padding: 4px 12px;
	font-size: 0.9em;
	border-radius: 2px;
	border-width: thin;
}

.we-autocomplete-btn.found    { background: #e6f3e6; color: #006400; }
.we-autocomplete-btn.notfound { background: #ffe6e6; color: #9f0000; }
.we-autocomplete-btn.seeking  { background: #fff3e6; animation: ww-pulse 1.5s infinite; }

@keyframes ww-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.4; }
}

/* ==================== ZEN MODE ==================== */
body.zenmode header,
body.zenmode footer,
body.zenmode .header,
body.zenmode .footer,
body.zenmode .sidebar,
body.zenmode .nav,
body.zenmode .toc {
	display: none !important;
}

body.widescreen #mainwrapper
{
	max-width: none !important;
	width: 100% !important;
	margin: 10px 0 0 0 !important;
}

body.widescreen #mainwrapper header {
	float: none;
	width: stretch;
	box-shadow: none;
}

body.zenmode .wikiedit-split-container {
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* Widescreen emphasis */
body.widescreen .wikiedit-split-container {
	grid-template-columns: 55% 45%;
}

/* Optional: Make editor even bigger in full zen mode */
body.zenmode.widescreen .wikiedit-textarea {
	font-size: 1.05rem;
	line-height: var(--ww-line-height-relaxed);
}

