/**
 * Copyright 2016 Cody Peter Mello
 * Copyright 2013 The Rust Project Developers.
 *
 * Licensed under the MIT license. This file may not be copied, modified, or
 * distributed except according to those terms. The full text can be found at:
 *
 * http://opensource.org/licenses/MIT
 *
 */

/*
 * This CSS file is largely inspired by the Rust documentation with
 * some modifications.
 */

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

/* General structure and fonts */

body {
	color: #333;
	font-family: "EB Garamond", serif;
	font-size: 16pt;
	margin: 0;
	position: relative;
	padding: 10px 15px 20px 15px;
	-webkit-font-feature-settings: "kern", "liga";
	-moz-font-feature-settings: "kern", "liga";
	font-feature-settings: "kern", "liga";
}

p {
	-webkit-font-variant-ligatures: common-ligatures;
	font-variant-ligatures: common-ligatures;

	-webkit-font-feature-settings: "kern";
	font-feature-settings: "kern";
	font-kerning: normal;

	margin: 0 0 .6em 0;
	line-height: 1.2;
}

h1 {
	font-size: 1.5em;
	margin: 20px 0 15px 0;
}

h2 {
	font-size: 1.4em;
	margin: 30px 0 15px 0;
}

h3 {
	font-size: 1.3em;
	margin: 20px 0 15px 0;
}

h1, h2, h3 {
	color: black;
	font-family: "Linux Biolinum", sans-serif;
	font-weight: 500;
	padding-bottom: 6px;
}

h2, h3 {
	border-bottom: 1px solid #DDDDDD;
}

code, pre, samp, kbd {
	font-family: "Source Code Pro", monospace;
	white-space: pre-wrap;
	font-size: 0.9em;
}

.refentrytitle {
	font-family: "Source Code Pro", monospace;
	font-size: 0.9em;
}

pre {
	background-color: #F5F5F5;
	border: 1px solid #ccc;
	padding: 0.5em;
	margin: 0.5em 1em;
}

ol, ul {
	padding-left: 25px;
}

ul ul, ol ul, ul ol, ol ol {
	margin-bottom: 0;
}

:target {
	background: #FDFFD3;
}

/* Page structure */

.content, nav {
	max-width: 40em;
}

.content {
	margin-left: 21em;
	padding: 15px 0;
}

footer {
	margin-left: 21em;
	text-align: center;
}

nav {
	padding-bottom: 10px;
	margin-bottom: 10px;
}

nav.sidebar {
	width: 20em;
	position: fixed;
	left: 0;
	top: 0;
	height: 100%;
	padding: 10px;
	overflow-y: scroll;
	line-height: 1.5em;
}

nav.content .nav-previous {
	float: left;
	text-align: left;
	width: 10%;
}

nav.content .nav-title {
	float: left;
	text-align: center;
	width: 80%;
}

nav.content .nav-next {
	float: right;
	text-align: right;
	width: 10%;
}

.sidebar img {
	margin: 20px auto;
	display: block;
}

ul.idx {
	-webkit-column-count: 2;
	-moz-column-count: 2;
	column-count: 2;
}

ul.idx, ul.idx ul {
	list-style-type: none;
}

table {
	border-collapse: collapse;
	empty-cells: show;
	margin: 1em 0px;
}

th, td {
	padding: 0.3em 0.8em;
	border: 1px solid #999;
	vertical-align: top;
}

nav > ul > li {
	list-style-type: none;
}

figure {
	text-align: center;
	margin: 1em 0em;
}

figure > pre, figure > p {
	text-align: left;
}

figcaption {
	font-size: smaller;
	text-align: center;
}

/* Links */

a {
	text-decoration: none;
	font-weight: bold;
}

a:link {
	color: #41B7D8;
}

a:hover, a:hover:visited {
	color: #117D9C;
}

a:visited {
	color: #148DB0;
}

/* Make sure HTML5 elements display as blocks in older browsers */
section, article, aside, footer, header, nav, hgroup {
	display: block;
}


/* Media Queries */

/*
 * Change layout for browser windows not
 * taking up the full screen width.
 */
@media (max-width: 1000px) {
	nav.sidebar {
		width: 15em;
	}

	.content {
		margin-left: 16em;
	}
}

/* Change layout for mobile */
@media (max-width: 700px) {
	body {
		padding-top: 0px;
	}

	nav.sidebar {
		height: auto;
		width: 100%;
		margin: 0px;
		padding: 0px;
		position: static;
		overflow: visible;
	}

	nav.sidebar img {
		width: 75px;
	}

	nav.content .nav-title {
		visibility: hidden;
	}

	ul.idx {
		-webkit-column-count: 1;
		-moz-column-count: 1;
		column-count: 1;
	}

	.content, footer {
		margin-left: 0px;
	}

}

@media print {
	nav.sidebar, nav.content {
		display: none;
	}

	.content, footer {
		margin-left: 0em;
	}
}
