/*******************
 *
 * Fonts
 *
********************/
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300);
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400);




/*******************
 *
 * Helpers
 *
********************/
/*clearfix*/
.cf:before, .cf:after { content: " "; display: table; }
.cf:after { clear: both; }




/*******************
 *
 * General
 *
********************/
* { box-sizing: border-box; }

html { margin: 0; }

body {
  background: white;
  font-family: "HelveticaNeue",Helvetica,Arial,sans-serif;
  margin: 0;
  margin-bottom: 600px;
}

/*backgrounds for side and code bars*/
body:before, body:after {
  content: " ";
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: -1;
}

body:before {
  background: #EFEFEF;
  width: 10%;
  left: 0;
}

body:after {
  background: black;
  width: 35%;
  right: 0;
}

p, li {
  line-height: 1.4em;
}

a {
  color: #5B8DE5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

mark {
  background: rgba(255, 255, 0, .25);
}




/*******************
 *
 * Scrollbars
 *
********************/
code::-webkit-scrollbar, body::-webkit-scrollbar {
    height: .9em;
}

code::-webkit-scrollbar-track, body::-webkit-scrollbar-track {
    background: #444;
    border-radius: 3px;
}

code::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 3px;
}




/*******************
 *
 * Table Styling
 *
********************/
table {
  width: 100%;
  border-left: 1px solid #efefef;
  border-top: 1px solid #efefef;
}

th, td {
    border-bottom: 1px solid #efefef;
    padding: 10px;
    border-right: 1px solid #efefef;
}

td strong {
  float: right;
  text-transform: uppercase;
  font-size: .7em;
  background: black;
  color: white;
  padding: 2px 4px;
  border-radius: 8px;
}

tr.inner-object.will-be-toggled {
  display: none;
}

tr.inner-object > td {
  padding: 15px 50px;
  background: #efefef;
}

tr.inner-object td table {
  background: white;
}

td a.will-toggle-inner-object {
  font-size: .8em;
  text-decoration: underline;
  text-transform: uppercase;
}

th.inner-object-header {
  padding: 0;
  background: #EFEFEF;
}

th.inner-object-header:after {
  content: attr(title);
  background: #DDDDDD;
  font-size: .8em;
  font-weight: normal;
  font-family: Source Sans Pro;
  text-align: left;
  display: inline-block;
  float: left;
  padding: 5px 10px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

td:nth-child(2) {
  white-space: nowrap;
}

#chapter-authentication td:nth-child(2) {
  white-space: normal;
}




/*******************
 *
 * Code Formatting
 *
********************/
code {
  font-family: Source Code Pro;
  font-size: 0.8em;
  line-height: 1.4em;
  word-break: break-all;
}

p code, li code {
  font-size: 0.9em;
}




/*******************
 *
 * Sidebar
 *
********************/
aside.sidebar {
  float: left;
  width: 10%;
  position: fixed;
  color: black;
}

aside.sidebar .logo {
  text-align: center;
  margin: 10px 0;
}

aside.sidebar .logo img {
  max-height: 50px;
}

aside.sidebar ul {
  margin: 0;
  padding: 0;
}

aside.sidebar li a {
  display: block;
  color: black;
  text-decoration: none;
  padding: 10px;
}

aside.sidebar li a.active {
  background: rgba(91, 141, 229, 0.3);
}

aside.sidebar li a:hover {
  background: #5B8DE5;
  color: white;
}




/*******************
 *
 * Language Switcher
 *
********************/
.language-switcher {
  position: fixed;
  top: 0;
  right: 0;
  padding: 5px 40px;
}

.language-switcher input {
  display: none;
}

.language-switcher label {
  margin-right: 5px;
  background: #444;
  border: none;
  color: white;
  padding: 3px 20px;
  font-size: .8em;
  cursor: pointer;
  border-radius: 3px;
}

.language-switcher input:checked + label {
  background: #666;
}




/*******************
 *
 * Docs
 *
********************/
.chapter {
  margin-top: 50px;
}

.chapter:first-of-type {
  margin-top: 0;
}

.chapter > h1, .chapter > h2 {
  width: 55%;
  margin-left: 10%;
  margin-right: 35%;
}

.chapter > h3, .chapter > h4, .chapter > h5, .chapter > p, .chapter > ul, .chapter > ol, .chapter > table, .chapter > div {
  /*20px for padding either side*/
  margin-left: calc(10% + 20px);
  margin-right: calc(35% + 20px);
}

.chapter > pre, .chapter > blockquote, .chapter > h6, .chapter > hr {
  float: right;
  clear: right;
  width: 35%;
  padding: 0 20px;
  margin: 0;
}

.chapter > hr {
  width: calc(35% - 40px);
  padding: 0;
  margin: 15px 20px 0 0;
  background: rgba(174, 174, 174, 0.44);
  border: none;
  height: 1px;
}

.chapter h1 {
  font-family: Roboto Slab;
  font-weight: 700;
  background: #EFEFEF;
  padding: 5px 20px;
}

.chapter h1:first-child {
  margin-top: 10px;
}

.chapter h2 {
  font-family: Roboto Slab;
  font-weight: 400;
  background: linear-gradient(to right, #EFEFEF, #FFF);
  padding: 4px 18px;
  display: inline-block;
  font-size: 1.4em;
  margin-top: 70px;
}

.chapter h2:first-of-type {
  margin-top: 30px;
}

.chapter h3 {
  font-family: Roboto Slab;
  font-size: 1.1em;
  font-weight: bold;
}

.chapter#chapter-authentication h3 {
  margin-top: 70px;
}

.chapter > blockquote, .chapter > h6 {
  font-family: Source Code Pro;
  font-size: 0.8em;
  line-height: 1.4em;
  color: #AEAEAE;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 10px;
}

.chapter > blockquote p:first-child {
  margin: 0;
}

.chapter > h1 + blockquote, .chapter > h1 + h6 {
  margin-top: -10px;
}

.chapter > table {
  width: calc(55% - 40px);
}

.warning {
  background: darkorange;
  color: white;
  padding: 1em 1.4em;
}

.warning h4 {
  margin-top: 0;
}

.warning p {
  margin: 0;
}



@media (max-width: 1200px) {
  aside.sidebar {
    float: none;
    width: 100%;
    position: static;
    background: #EFEFEF;
    margin-top: -10px;
  }

  .chapter > h1, .chapter > h2 {
    width: 100%;
    margin-left: 0;
	  margin-right: 0;
  }

  .chapter > h3, .chapter > h4, .chapter > h5, .chapter > p, .chapter > ul, .chapter > ol, .chapter > table, .chapter > div {
    width: calc(100% - 40px);
    margin-left: 20px;
    margin-right: 20px;
  }

  .chapter > blockquote, .chapter > h6, .chapter > pre {
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    float: none;
    width: 100%;
  }

  body:before, body:after {
    display: none;
  }

	table {
		table-layout:fixed;
		overflow-x: scroll;
	}

	td {
		overflow: hidden;
		text-overflow: ellipsis;
		word-wrap: break-word;
	}
}

@media (max-width: 640px) {
	table {
		display: block;
	}
}


/* Bootstrap Alert */
.alert {
	position: relative;
	padding: 0.75rem 1.25rem;
	margin-bottom: 1rem;
	border: 1px solid transparent;
	border-radius: 0.25rem;
}

.alert-heading {
	color: inherit;
}

.alert-link {
	font-weight: 700;
}

.alert-dismissible {
	padding-right: 4rem;
}

.alert-dismissible .close {
	position: absolute;
	top: 0;
	right: 0;
	padding: 0.75rem 1.25rem;
	color: inherit;
}

.alert-primary {
	color: #004085;
	background-color: #cce5ff;
	border-color: #b8daff;
}

.alert-primary hr {
	border-top-color: #9fcdff;
}

.alert-primary .alert-link {
	color: #002752;
}

.alert-secondary {
	color: #383d41;
	background-color: #e2e3e5;
	border-color: #d6d8db;
}

.alert-secondary hr {
	border-top-color: #c8cbcf;
}

.alert-secondary .alert-link {
	color: #202326;
}

.alert-success {
	color: #155724;
	background-color: #d4edda;
	border-color: #c3e6cb;
}

.alert-success hr {
	border-top-color: #b1dfbb;
}

.alert-success .alert-link {
	color: #0b2e13;
}

.alert-info {
	color: #0c5460;
	background-color: #d1ecf1;
	border-color: #bee5eb;
}

.alert-info hr {
	border-top-color: #abdde5;
}

.alert-info .alert-link {
	color: #062c33;
}

.alert-warning {
	color: #856404;
	background-color: #fff3cd;
	border-color: #ffeeba;
}

.alert-warning hr {
	border-top-color: #ffe8a1;
}

.alert-warning .alert-link {
	color: #533f03;
}

.alert-danger {
	color: #721c24;
	background-color: #f8d7da;
	border-color: #f5c6cb;
}

.alert-danger hr {
	border-top-color: #f1b0b7;
}

.alert-danger .alert-link {
	color: #491217;
}

.alert-light {
	color: #818182;
	background-color: #fefefe;
	border-color: #fdfdfe;
}

.alert-light hr {
	border-top-color: #ececf6;
}

.alert-light .alert-link {
	color: #686868;
}

.alert-dark {
	color: #1b1e21;
	background-color: #d6d8d9;
	border-color: #c6c8ca;
}

.alert-dark hr {
	border-top-color: #b9bbbe;
}

.alert-dark .alert-link {
	color: #040505;
}
