@import 'variables.css';

body {
	font-family: 'Ubuntu', sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--fg);
	margin: 0;
	background-color: var(--bg);
}
h1, h2, h3, h4, h5, h6 { color: var(--fg); }
a, a:visited {
	color: var(--links);
	text-decoration: none;
}
a:hover, a:visited:hover {
	color: var(--links-hover);
	text-decoration: underline;
}

code {
	background: var(--inline-code-color);
	padding: 2px 4px;
	border-radius: 4px;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}
pre code {
	padding: 0;
	border-radius: 0;
}
pre {
	padding: .5em;
	margin: 1em 0;
	background: var(--inline-code-color);
	border: 1px solid var(--code-border);
	border-radius: 4px;
}

blockquote {
	margin: 20px 0;
	padding: 0 20px;
	padding-left: 1em;
	background: var(--quote-bg);
	border: 1px solid var(--quote-border);
	border-left: none;
	border-right: none;
}

blockquote code {
	background: var(--quote-code-bg);
}

li.js-unavailable {
		background-color: #f6cf68;
		border-radius: 10px;
		margin-left: 1em;
		padding-left: 1em;
		padding-right: 1em;
}

table {
	border-collapse: collapse;
	display: block;
	overflow-y: auto;
	border: 1px var(--table-border-color) solid;
}
table td {
	padding: 3px 20px;
}
table thead {
	background: var(--table-header-bg);
	color: var(--table-header-fg);
}
table thead td {
	font-weight: 700;
}
table tbody tr:nth-child(2n) {
	/* Alternate background colors for rows */
	background: var(--table-alternate-bg);
}

svg {
	position: relative;
	top: .125em;
	width: 1em;
	height: auto;
}

.hidden {
	display: none;
}

.icon-button {
	border: none;
	background: none;
	cursor: pointer;
	padding: 1em;
}

/* void navigation */

#void-nav {
	width: 100%;
	min-height: 50px;
	background: var(--nav-bg);
	font-size: 14px;

	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
}
#void-nav a,
#void-nav button,
#void-nav label {
	fill: var(--nav-fg);
	height: 50px;
	min-height: 100%;
	display: block;
	line-height: 50px;
	padding: 0 15px;
	font-size: 1.2em;
}
#void-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#void-nav ul#nav-right {
	margin-left: auto;
}

#void-nav ul li {
	display: inline-block;
}
#void-nav ul li a {
	color: var(--nav-fg);
	display: block;
	padding: 0 15px;
	line-height: 50px;
	font-size: 1.2em;
	text-decoration: none
}
#void-nav ul li a:hover,
#void-nav ul li a:focus,
#void-nav button:hover,
#void-nav button:focus,
#void-nav label:hover,
#void-nav label:focus {
	background: #000;
}

#skip-to-content {
	position: absolute;
	left: -999px;
	top: -999px;
}

#skip-to-content:active,
#skip-to-content:focus {
	position: relative;
	left: 0;
	top: 0;
}

#icon-theme-light {
	display: var(--theme-toggle-light);
}
#icon-theme-dark {
	display: var(--theme-toggle-dark);
}

/* sidebar  */

.sidebar-hidden #sidebar {
	display: none;
}
#sidebar {
	padding: .5em;
	background: var(--sidebar-bg);
	font-size: 0.875em;
}
#sidebar ol {
	list-style: none;
	margin: 0;
}
#sidebar ol.chapter {
	padding: 0;
	line-height: 2.2em;
}
#sidebar ol.section {
	padding-left: 20px;
	line-height: 1.9em;
}
#sidebar a {
	color: var(--sidebar-fg);
	display: block;
}
#sidebar a:hover {
	color: var(--sidebar-active);
	text-decoration: none;
}
#sidebar a.active {
	display: block;
	padding: 0.5em;
	width: 100%;
	background-color: var(--sidebar-active);
	color: var(--bg);
}
#sidebar a.active::after {
	content: "" / " selected";
}

#sidebar-toggle {
 	display: none;
}

/* search */

#searchbar {
	width: 100%;
	padding: 10px 16px;
	margin: 5px 0;
	border-radius: 3px;
	border: 1px solid var(--searchbar-border-color);
}
#searchresults-header {
	font-weight: bold;
	font-size: 1em;
	padding: 18px 0 0 5px;
}
ul#searchresults {
	list-style: none;
	padding-left: 20px;
}
ul#searchresults li {
	margin: 10px 0px;
	padding: 2px;
	border-radius: 2px;
}
ul#searchresults span.teaser {
	display: block;
	clear: both;
	margin: 5px 0 0 20px;
	font-size: 0.8em;
}

/* chapter navigation */

#nav-wide-wrapper {
	max-width: 800px;
	margin: 0 auto;
	margin-top: 50px;
}
.previous {
	float: left;
}
.next {
	float: right;
	right: 15px;
}
.nav-chapters {
	fill: var(--nav-arrow-fg);
	text-align: center;
	text-decoration: none;
	display: block;
	max-width: 150px;
	min-width: 90px;
}
.nav-chapters:hover {
	text-decoration: none;
	fill: var(--nav-fg-hover);
}

.nav-chapters svg {
	margin: 0 auto;
	width: 1.5em;
}
.mobile-nav-chapters {
    fill: var(--nav-arrow-fg);
}
.mobile-nav-chapters:hover {
	fill: var(--nav-fg-hover);
}

/* layout */

body {
	box-sizing: border-box;
}
#content {
	display: flex;
	flex-direction: row;
	width: 100%;
}
#page-wrapper {
	--content-padding: 10px;
	padding: 0 var(--content-padding);
	width: calc(100% - var(--content-padding) * 2);
}
#search-wrapper,
#page-wrapper main {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
}
#sidebar {
	max-width: 300px;
	flex-shrink: 0;
}

/* 300px + 800px + 2*90px + 15px */
@media only screen and (min-width: 1295px) {
	.sidebar-visible #nav-wide-wrapper {
		max-width: none;
		margin: 0;
	}
	.sidebar-visible .nav-chapters {
		background: none;
		position: fixed;
		top: 50px;
		bottom: 0;
		margin: 0;
		justify-content: center;
		align-content: center;
		display: flex;
		flex-direction: column;
	}
}
/* 800px + 2*90px + 15px */
@media only screen and (min-width: 995px) {
	.sidebar-hidden #nav-wide-wrapper {
		max-width: none;
		margin: 0;
	}
	.sidebar-hidden .nav-chapters {
		background: none;
		position: fixed;
		top: 50px;
		bottom: 0;
		margin: 0;
		justify-content: center;
		align-content: center;
		display: flex;
		flex-direction: column;
	}
	table {
		display: table;
	}
}
