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;
}

@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.6rem;
	line-height: 1.6;
	font-weight: 400;
	font-family: "Work Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	background: #fcfcfc;

	&.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: 0rem;}
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: 0rem; }
h3 { font-size: 3.0rem; line-height: 1.3;	letter-spacing: 0rem; font-weight: 900; }

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

h5 {
	font-size: 1.8rem;
	line-height: 1.5;
	letter-spacing: 0rem;
	margin-bottom: 4px;
	font-weight: bold;
	font-weight: 500;
}

p {
	margin-top: 0;
}

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

h3 a:hover {
	text-decoration: none;
	color: #474a54;
}
a {
	color: $brand-colour; text-decoration: none;
	transition: 0.3s all ease-in-out;
}

a:hover, a:focus  {
	color: #1A5099; 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;
}

.button {
  background-color: #e7e7f1;
  border: none;
  color: black;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 2px 1px;
  cursor: pointer;
  border-radius: 8px;
}

.sidebar h6 {
	text-transform: uppercase;
	line-height: 1em;
	font-size: 1.5rem;
	letter-spacing: 1px;
	font-weight: 900;
	color: #474a54;
}

.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: #364149;
		text-decoration: none;
		font-size: .90em;
		display: block;
		width: 100%;
		text-overflow: ellipsis;
		overflow: hidden;
		padding: 2px 0;
		transition: 0.3s color ease-in-out;

		&.active {
			color: #E31337;
			text-decoration: none;
		}
	}
	a:hover, a:focus  {
		color: #E31337;
	}
}

.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 210px;
	border-left: 1px solid #eee;
	h6 {
		font-size: 1.01em;
		padding: 0 0 6px 0;
		margin: 0;
	}

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

	.overview {
		color: #676771;
		background: #fefefe;
	}

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

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

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

.info {
	border-color: #B2D2EF;
}

.error {
	border-color: #F09F99;
}

.success {
	border-color: #B8DD99;
}

.doc-content {
	width: 100%;
	border: 0;
	//border-bottom: 1px solid #eee;
	//border-bottom: 1px solid transparent;
	//border-left: none;
	//border-image: linear-gradient(to right,	#eee 0%,#eee 50%,#eee 50%);
	-moz-border-image: -moz-linear-gradient(left, #eee 0%, #eee 50%, #333333 50%);
	-webkit-border-image: -webkit-linear-gradient(left,	#eee 0%,#eee 50%,#333333 50%);
	border-image-slice: 1;
	padding: 30px 0;
	background: -webkit-linear-gradient(left,#f0f0f8 0%, #f0f0f8 50%, #27313E 50%); /* Chrome10+,Safari5.1+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f0f8', 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: 50%;
	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: 50%;
	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: #f0f0f8;
	}

	pre {
		background: #f0f0f8;
		background: #e7e7f1;
		padding: 10px;
		border-radius: 5px;
	}

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

.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: #676771;

		&: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: #4BA2EE;
}


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


@media (max-width: 700px) {
	.main {
		border-left: none;
	}
}

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

	.left-docs {
		float: none;
		width: 100%;
		padding: 0 24px;
	}

	.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;
	border-top: 4px solid #E31337;

	h1 {
		height: 107px;
		box-sizing: border-box;
		background-color: #e7e7f1;
		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: 36px;
			margin: 0 18px;
		}
	}

	.open-nav {
		background-image: url(../images/menu.svg);
		background-color: transparent;
		background-repeat: no-repeat;
		background-size: 50%;
		background-position:center;
		padding-right:0px;
		border: 0;
		border-radius: 2px;
		cursor: pointer;
		height:60px;
		width:60px;
		&: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;

		.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;
}

.logo-link {
	color: #f0f0f8;
	font-weight: 600;
	font-family: "Work Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
	pointer-events: none;
	cursor: default;
}
.glossary {
	dt {
		top: 0px;
	}

	dd {
	}
}

blockquote {
	background: #EEEEEE;
	padding:5px;
}

.hive-content {
  width: 60%;
  padding: 0 12px;
}

.hive-content img {
  max-width: 100%;
  max-height: 100%;
}

// See: https://github.com/turbolinks/turbolinks#displaying-progress
.turbolinks-progress-bar {
  height: 5px;
  background-color: $brand-colour;
}
