html, body {
	padding: 0;
	margin: 0;
}

body, .main {
	box-sizing: border-box;
	min-height: 100vh;
}

html {
	font-size: 62.5%;
	color: #474a54;
	background: #232323;
	height: 100vh;
}

img {
	max-width: 100%;
}

@media (max-width: $mobile-break) {
	.sidebar, header > form {
		display: none;
	}

	.sidebar h6 {
		font-size: 1.4em;
	}

	.sidebar a {
		padding: 10px 0;
	}

	body .main {
		margin: 45px 0 0 0;
	}
}

body {
	font-size: 1.8em;
	line-height: 1.6;
	font-weight: 400;
	font-family: system, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Lucida Grande", sans-serif;
	background: #fbfbfb;

	&.nav-open {
		overflow: hidden;

		.sidebar,
		header > form {
			display: block;
		}

		header {
			bottom: 0;
		}
	}
}

table {
	border: 1px solid #E1E1E1;
	margin: 0 0 20px 0;
	border-collapse: collapse;
}

th, td {
	border: 1px solid #ccc;
	padding: 10px;
	font-size: .9em;
	text-align: left;
}

th {
	background: #f7f7f7;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	font-weight: 300;
}

h1 { font-size: 4.0rem; line-height: 1.2;	letter-spacing: -.1rem;}
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
h3 { font-size: 3.0rem; line-height: 1.3;	letter-spacing: -.1rem; }

h4 {
	font-size: 2.4rem;
	line-height: 1.35;
	letter-spacing: -.08rem;
	margin: 0 0 5px 0;
}

h5 {
	font-size: 1.8rem;
	line-height: 1.5;
	letter-spacing: -.05rem;
}

p {
	margin-top: 0;
}

h3 a {
	text-decoration: none;
	color: #474a54;
}

h3 a:hover {
	text-decoration: none;
	color: #474a54;
}
a {
	color: #1EAEDB; text-decoration: none;
}

a:hover {
	color: #0FA0CE; text-decoration: underline;
}

pre {
	white-space: pre-wrap;
	font-size: 1em;
	margin: 22px 0;
	word-wrap: break-word;
}

dl {
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	padding: 0 0 20px 0;
	margin: 0 0 20px 0;
}

dl dt {
	width: 30%;
	float: left;
	font-weight: bold;
	position: relative;
	top: 20px;
}

dl dd {
	margin-left: 30%;
	padding-left: 15px;
	margin-top: 20px;
}

dl dd + dd {
	margin-top: 0;
}

dl dd:after {
	visibility: hidden;
	display: block;
	content: "";
	clear: both;
	height: 0;
}

.sidebar h6 {
	line-height: 1em;
	font-size: 1.5rem;
	letter-spacing: 1px;
	color: #888;
	font-weight: bold;
}

.sidebar {
	padding: 20px 20px 0 20px;
	white-space:nowrap;
	overflow-y: auto;

	section {
			padding: 10px 0;
	}

	ul {
		padding: 0 0 0 10px;
		margin: 0;
		list-style: none;
	}

	h6 {
		padding: 0;
		margin: 0 0 5px 0;
	}

	a {
		color: #777;
		text-decoration: none;
		font-size: .90em;
		display: block;
		width: 100%;
		text-overflow: ellipsis;
		overflow: hidden;
		padding: 2px 0;

		&.active {
			color: #2196F3;
			text-decoration: none;
		}
	}
}

.endpoint {
	font-size: 10px;
	padding: 0 2px;
	position: relative;
}

h3 .endpoint {
	padding: 4px 6px;
	font-size: 19px;
}

.endpoint.put {
	color: #7E57C2;
	&:after {
		content: "PUT";
	}
}

.endpoint.delete {
	color: #FF7043;
	&:after {
		content: "DELETE";
	}
}

.endpoint.get {
	color: #66BB6A;
	&:after {
		content: "GET";
	}
}

.endpoint.post {
	color: #42A5F5;
	&:after {
		content: "POST";
	}
}

.main {
	margin: 0 0 0 $nav-width;
	border-left: 1px solid #eee;
	h6 {
		font-size: 1.01em;
		padding: 0 0 6px 0;
		margin: 0;
	}

	.description {
		color: #aaa;
		margin-top: -11px;
	}

	@media (max-width: $mobile-break) {
		margin: 0;
	}
}

hr {
	border: 0;
	border-top: 1px solid #ddd;
	margin: 20px 0;
}

.error, .warning, .info, .success	{
	border-left: 5px solid #FD0;
	padding: 10px 15px;
	margin-left: -20px;
	margin-right: -15px;
	background-color: #FAFAFA;
	border-radius: 2px;
}

.warning {
    border-color: #ffc107;
}

.info {
	border-color: #56ADEC;
}

.error {
	border-color: #F20;
}

.success {
	border-color: #6c0;
}

.doc-content {
	border: 0;
	border-bottom: 1px solid transparent;
	border-image: linear-gradient(to right,	#eee 0%,#eee 60%,#333333 60%);
	-moz-border-image: -moz-linear-gradient(left,	#eee 0%, #eee 60%, #333333 60%);
	-webkit-border-image: -webkit-linear-gradient(left,	#eee 0%,#eee 60%,#333333 60%);
	border-image-slice: 1;
	padding: 30px 0;
	background: #ffffff; /* Old browsers */
	background: -moz-linear-gradient(left,	#ffffff 0%, #ffffff 60%, #232323 60%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, right top, color-stop(0%,#ffffff), color-stop(60%,#ffffff), color-stop(60%,#232323)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(left,	#ffffff 0%,#ffffff 60%,#232323 60%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(left,	#ffffff 0%,#ffffff 60%,#232323 60%); /* Opera 11.10+ */
	background: -ms-linear-gradient(left,	#ffffff 0%,#ffffff 60%,#232323 60%); /* IE10+ */
	background: linear-gradient(to right,	#ffffff 0%,#ffffff 60%,#232323 60%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#232323',GradientType=1 ); /* IE6-9 */
}

.doc-content:after {
	visibility: hidden;
	display: block;
	content: "";
	clear: both;
	height: 0;
}

.doc-content:last-child {
	border: 0;
}

.left-docs {
	width: 60%;
	float: left;
	padding: 0 50px;
	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
	-moz-box-sizing: border-box;		/* Firefox, other Gecko */
	box-sizing: border-box;				 /* Opera/IE 8+ */

	pre {
		 border: 0px;
		 box-shadow: 0 0 0 1px #eee;
		 border-radius: 3px;
		 padding: 10px;
	}
}

.right-code {
	width: 40%;
	float: left;
	padding: 0 50px;
	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
	-moz-box-sizing: border-box;		/* Firefox, other Gecko */
	box-sizing: border-box;				 /* Opera/IE 8+ */

	code {
		color: #fff;
	}

	pre {
		background: black;
		padding: 10px;
		border-radius: 5px;
	}

	.code-viewer .languages li a:hover {
		border-color: #555;
	}
}

.code-viewer {
	.languages {
		padding: 0;
		margin: 0 0 5px 0;
		list-style: none;
		font-size: .9em;

		li {
			display: inline-block;

			a {
				display: block;
				padding: 5px 10px;
				z-index: 100;
				border: 1px solid transparent;

				&:hover {
					border-color: #eee;
					border-radius: 5px;
				}

				&.active:hover {
					border-color: transparent;
				}
			}
		}
	}

	a {
		text-decoration: none;
		color: #aaa;

		&:hover {
			color: #222;
		}


	}

	pre {
		margin: 0 0 20px 0;
	}
}

.code-viewer a.active, .code-viewer a.active:hover, .right-code .code-viewer a.active:hover {
	color: #1EAEDB;
}


.right-code .code-viewer a:hover {
	color: #fff;
}

@media (max-width: 1000px) {
	.right-code {
		float: none;
		width: 100%;
		background: #232323;
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.left-docs {
		float: none;
		width: 100%;
	}

	.doc-content {
		background: #fff;
		padding-bottom: 0;
		border-image: none;
		-moz-border-image: none;
		-webkit-border-image: none;
		border-color: #eee;
	}
}

header {
	max-height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	overflow-x: hidden;
	z-index: 1;
	background-color: $nav-background-color;

	h1 {
		height: $nav-header-height;
		box-sizing: border-box;
		background-color: $brand-colour;
		color: #fff;
		margin: 0;
		font-size: 1.7rem;
		line-height: 0.8;
		letter-spacing: 0;
		font-weight: 600;
		text-indent: 0;
		@include display-flex();
		@include flex-direction(row);
		@include align-items(center);
		border-bottom: 1px solid rgba(0, 0, 0, 0.075);

		img {
			height: 26px;
			margin: 0 18px;
		}
	}

	.open-nav {
		width: 25px;
		height: 25px;
 		margin: 0 0 0 18px;
		background-image: url($base-url + '/images/menu.svg');
		background-color: transparent;
		background-repeat: no-repeat;
		background-size: 100%;
		border: 0;
		position: relative;
		border-radius: 2px;
		cursor: pointer;

		&:focus {
			outline: none;
			background-color: rgba(0, 0, 0, 0.05);
		}

		&:hover {
			background-color: rgba(0, 0, 0, 0.1);
		}
	}

	@media (min-width: $mobile-break) {
		background-color: transparent;
		width: $nav-width;
		right: auto;
		bottom: auto;

		.copyright {
			display: block;
		}

		.open-nav {
			display: none;
		}

		h1 {
			box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
		}
	}
}

#search-input {
	-webkit-appearance: none;

	display: block;
	margin: 0;
	padding: 10px 20px;
	width: 100%;
	box-sizing: border-box;

	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.075);

	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.8;

	&:focus {
		outline: none;
		border-left: 5px solid $brand-colour;
		padding-left: 15px;
	}
}

.search-page {
	max-width: 800px;
	margin: 0 0 0 50px;
	padding: 50px 20px 0 20px;
}

#search-results {
	margin: 0;
	padding: 0;

	li {
		list-style: none;
		margin: 0;
		padding: 0;

		h4 {
			font-size: 2rem;
		}

		p {
			line-height: 1.5;
		}
	}
}

.copyright {
	text-align: center;
	font-size: .6em;
	margin: 30px 0 0 0;
	display: none;
}
