:root {
	--headers: #02027d;
	--text: #222;
	--text-trans: #222a;
	/* --bg: #ededef; */
	--bg: #f7f0f0;
	--bg-alt: #f1e7e7;
	--bg-dark: #d8d0d0;
	--a: #347ee4;
	
	--table: hsla(0, 0%, 80%, 0.4);
	
	--img-external: url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%20100%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M60%2020H25q-5%200-5%205v50q0%205%205%205h50q5%200%205-5V40M50%2050l40-40v20-20H70%22%20stroke%3D%22%23000%22%20stroke-width%3D%229%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%20%2F%3E%3C%2Fsvg%3E);
}

@media (prefers-color-scheme: dark) {
	:root {
		--headers: #c3c3f3;
		--text: #eee;
		--text-trans: #eeea;
		--bg: #313338;
		--bg-alt: #2b2d31;
		--bg-dark: #1e1f23;
		--a: #4080ff;
		
		--table: hsla(0, 0%, 40%, 0.4);
	}
	
	.nav-function:before, h3.function:before {
		filter: brightness(2);
	}
	
	.filename-link:after {
		filter: invert(1);
	}
}

html, body { font-size: 100%; }
body {
	font-family: Ubuntu, sans-serif;
	display: grid;
	column-gap: 0.7em;
	grid-template-columns: minmax(min-content, 2fr) 5fr;
	grid-template-rows: auto auto;
	grid-template-areas: "sidebar main";
	margin: 0;
	padding: 0;
	height: 100vh;
	
	color: var(--text);
	background: var(--bg-dark);
}

main {
	/* background: var(--bg); */
	/* padding: 0 1em; */
	overflow-y: scroll;
	grid-area: main;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--headers);
}
h2 { margin: 0; }
h3 { margin: 0 0 1em 0; }

#__moondocs__sidebar {
	background: var(--bg-alt);
	grid-area: sidebar;
	display: flex;
	flex-direction: column;
	overflow-y: scroll;
	padding: 0 1em 5em 1em;
}

hr {
	margin: 1em 0;
	border: 0.1em solid var(--text-trans);
	width: 100%;
}

nav > ul {
	margin: 0;
	padding: 0;
}

pre, code {
	font-family: "Ubuntu Mono", monospace;
	font-size: 1rem;
}

a {
	color: var(--a);
	text-decoration: none;
}
a:hover { text-decoration: underline; }
a:active { outline: 0.25em solid var(--a); }


table {
	border-collapse: collapse;
}
th { text-align: left; }
td, th {
	padding: 0.25em 0.45em; 
}
tr:nth-child(1) { border-bottom: 0.2em solid var(--text); }
tr:nth-child(odd) > td {
	background: var(--table);
}

footer { grid-area: footer; }


h3.function, h3.event {
	margin-bottom: 0;
}
.anchor-link {
	float: right;
	margin: 0 1em 0 0;
	font-size: 1rem;
	vertical-align: middle;
}
.function-description, .event-description {
	margin: 0.5em 0;
}
h4 {
	margin: 0.5em 0 0 0;
}

label {
	display: block;
	font-weight: bold;
	font-size: 120%;
}
input[type=search] {
	border: 0;
	border-bottom: 0.3em solid var(--headers);
	filter: grayscale(1);
	transition: filter 0.25s;
	background: var(--table);
	color: var(--text);
	font-size: 110%;
	width: 100%;
	box-sizing: border-box;
	margin: 0.25em 0;
}
input[type=search]:focus {
	filter: none;
}

main > .namespaces > .docs-namespace:first-child {
	margin-top: 0;
}
main > .namespaces > .docs-namespace:last-child {
	margin-bottom: 0;
}
.docs-namespace {
	border: 0.5em 0 solid var(--table);
	background: var(--bg);
	padding: 1em 0 1em 1em;
	margin: 1em 0;
}
.docs-namespace .docs-namespace {
	box-shadow: 0 0 1em var(--bg-dark);
}
.big-divider {
	height: 0.5em; width: calc(100% - 6em);
	margin: 3em;
	border-width: 0.3em 0;
	border-style: dotted;
	border-color: var(--bg-dark);
}
.namespaces > .big-divider:first-of-type {
	display: none;
}
/* When a namespace is hidden, don't keep showing the divider */
.gone+.big-divider {
	display: none;
}

.docs-function, .docs-event {
	margin: 1em 0 1em -1em;
	padding: 1em 0 1em 1em;
	box-shadow: 0 0 1em var(--bg-dark);
}

.namespace-description {
	margin: 1em 0.5em 2em 0;
}

.nav-word { margin-left: 2.2em;}
.nav-namespaces, .nav-functions, .nav-events {
	list-style-type: none;
	margin: 0;
}
h2 + .filename-link-p {
	margin: 0 0 1em -1em; padding-left: 1em;
	border-bottom: 0.2em solid var(--headers);
}
.filename-link::after {
	background: var(--img-external) no-repeat center/cover;
	margin: 0 0 0 0.3em;
}
.filename-link:after, h2.namespace::before, h2.class::before, h3.function::before, h3.event::before, .nav-event::before, .nav-namespace::before, .nav-class::before, .nav-function::before {
	content: "";
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	margin: 0 0.3em 0 0;
	vertical-align: middle;
}
.nav-namespace:before, h2.namespace::before {
	background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ctext%20x%3D%2250%22%20y%3D%2250%22%20aria-hidden%3D%22true%22%20style%3D%22paint-order%3Astroke%3Bstroke-width%3A.2em%3Bstroke%3A%23eee%3Bfont%3Abold%203em%20sans-serif%3Btext-anchor%3Amiddle%3Bdominant-baseline%3Amiddle%22%3E%7B%20%7D%3C%2Ftext%3E%3C%2Fsvg%3E) no-repeat center/cover;
}
.nav-class:before, h2.class::before {
	background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cG9seWxpbmUgcG9pbnRzPSIyMCwzNSA2NSwzNSA0MCwzNSA0MCw3NSA2NSw3NSIgc3R5bGU9InN0cm9rZTojNzc3O3N0cm9rZS13aWR0aDo0O2ZpbGw6bm9uZSIvPjxnIHRyYW5zZm9ybT0icm90YXRlKC00NSA1MCA1MCkiIHN0eWxlPSJmaWxsOiNlOTEiPjxyZWN0IHg9IjMzIiB5PSIwIiB3aWR0aD0iMzUiIGhlaWdodD0iMjUiLz48cmVjdCB4PSI1NSIgeT0iNDUiIHdpZHRoPSIyNSIgaGVpZ2h0PSIxOCIvPjxyZWN0IHg9IjMwIiB5PSI3NSIgd2lkdGg9IjI1IiBoZWlnaHQ9IjE4Ii8+PC9nPjwvc3ZnPgo=) no-repeat center/cover;
}
.nav-function:before, h3.function::before {
	background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTpwdXJwbGU7c3Ryb2tlLWxpbmVjYXA6cm91bmRlZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjEwOyIgZD0ibTYyIDE2LTEyLTYtNDAgMjAgNDAgMjB2NDVMMTAgNzVWMzBtNDAtMjAgNDAgMjB2NDVMNTAgOTVsLTE4LTltMTgtMzYgNDAtMjAiLz48L3N2Zz4K) no-repeat center/cover;
}
.nav-event:before, h3.event::before {
	background: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%20100%20100%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M39%2010%2069%2010%2052%2040%2069%2040%2032%2090%2039%2052%2027%2052Z%22%20style%3D%22fill%3A%23ec1%3Bpaint-order%3Astroke%3Bstroke-width%3A20%25%3Bstroke%3A%23eee%3Bstroke-linejoin%3Around%22%2F%3E%3C%2Fsvg%3E) no-repeat center/cover;
}
nav .visibility-internal > a::before, .visibility-indicator.internal::before {
	content: "\01f511";
	display: inline-block;
	margin-right: 0.3em;
	vertical-align: middle;
}

.gone	{ display: none;	}