/*--------------------- Typography ----------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap');

/*--------------------- Layout ----------------------------*/
html { 
  height: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  color: #30404f;
  margin: 0; 
  padding: 0;
  height: 100%;
  background-color: #f8f8ff;
}

#container { 
  min-height: 100%;
  position: relative;
}

a {
  color: #000;
}

b, strong {
  font-weight: 700;
  font-family: "Roboto", sans-serif;
}

p {
  margin: 0 0 15px;
}

.annotation ul, .annotation ol {
  margin: 25px 0;
  padding-left: 40px;
}

.annotation ul li, .annotation ol li {
  font-size: 14px;
  line-height: 18px;
  margin: 10px 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #112233;
  line-height: 1em;
  font-weight: 900;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  margin: 30px 0 15px 0;
}

h1 {
  margin-top: 40px;
}
h2 {
  font-size: 1.26em;
}

hr {
  border: 0;
  background: 1px #ddd;
  height: 1px;
  margin: 20px 0;
}

pre, tt, code {
  font-size: 12px; 
  line-height: 18px;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
  margin: 0; 
  padding: 0;
  overflow-x: auto;
}

pre {
  background: #f8f8ff;
}

.annotation pre {
  display: block;
  margin: 15px 0 15px;
  padding: 7px 10px 7px 15px;
  background: #fcfcfc;
  -moz-box-shadow:    inset 0 0 10px rgba(0,0,0,0.1);
  -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  box-shadow:         inset 0 0 10px rgba(0,0,0,0.1);
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.annotation pre code {
  border: 0;
  padding: 0;
  background: transparent;
}

.annotation p tt, .annotation code {
  background: #f8f8ff;
  border: 1px solid #dedede;
  font-size: 12px;
  padding: 0 0.2em;
}

blockquote {
  border-left: 5px solid #ccc;
  margin: 0;
  padding: 1px 0 1px 1em;
}

.sections blockquote p {
  font-family: Menlo, Consolas, Monaco, monospace;
  font-size: 12px; 
  line-height: 16px;
  color: #999;
  margin: 10px 0 0;
  white-space: pre-wrap;
}

ul.sections {
  list-style: none;
  padding: 30px 0 5px 0;
  margin: 0;
}

ul.sections > li > div {
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -khtml-box-sizing: border-box;
  box-sizing: border-box;
}

/*---------------------- Jump Page -----------------------------*/
#jump_to {
  margin: 0;
  padding: 5px;
  background: white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  border-radius: 0 0 5px 5px;
  font: 10px Arial;
  text-transform: uppercase;
  cursor: pointer;
  text-align: right;
  list-style: none;
  position: fixed;
  right: 0; 
  top: 0;
  z-index: 101;
}

#jump_to > li > a {
  text-decoration: none;
  padding: 5px 10px;
  color: #30404f;
  display: inline-block;
}

#jump_to.active > li > a {
  background: #30404f;
  color: #fff;
  border-radius: 3px;
}

#jump_to:not(.active) > li > a:hover {
  background: #f5f5ff;
  color: #30404f;
  border-radius: 3px;
}

#jump_wrapper {
  display: none;
  padding: 0;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  border-radius: 5px 0 5px 5px;
}

#jump_page {
  margin: 0;
  padding: 5px 0;
  max-height: 100vh;
  overflow: auto;
  list-style: none;
}

#jump_page .source {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  border-top: 1px solid #eee;
  color: #30404f;
  white-space: nowrap;
}

#jump_page .source:first-child {
  border-top: none;
}

#jump_page .source:hover {
  background: #f5f5ff;
}

#jump_to.active #jump_wrapper {
  display: block;
}

/*---------------------- Main Layout -----------------------------*/

#background {
  position: absolute;
  top: 0; 
  bottom: 0;
  width: 40%;
  background: #fff;
  border-right: 1px solid #e5e5ee;
  z-index: -1;
}

ul.sections > li {
  white-space: nowrap;
}

ul.sections > li > div {
  display: inline-block;
}

ul.sections > li > div.annotation {
  max-width: 40%;
  min-width: 40%;
  min-height: 5px;
  padding: 10px 25px 1px 50px;
  overflow-x: hidden;
  white-space: normal;
  vertical-align: top;
  text-align: left;
}

ul.sections > li > div.content {
  padding: 9px 15px 16px 25px;
  font-weight: 400;
  vertical-align: top;
  border: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  width: 58%;
}

.sswrap {
  position: relative;
  display: inline;
}

.ss {
  font: 12px Arial;
  text-decoration: none;
  color: #454545;
  position: absolute;
  top: 3px; 
  left: -20px;
  padding: 1px 2px;
  opacity: 0;
  -webkit-transition: opacity 0.2s linear;
}

.for-h1 .ss {
  top: 47px;
}

.for-h2 .ss, .for-h3 .ss, .for-h4 .ss {
  top: 35px;
}

ul.sections > li > div.annotation:hover .ss {
  opacity: 1;
}

/*---------------------- Syntax Highlighting -----------------------------*/

td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }

pre code {
  display: block; 
  padding: 0.5em;
  color: #000;
}

pre .hljs-comment,
pre .hljs-template_comment,
pre .hljs-diff .hljs-header,
pre .hljs-javadoc {
  color: #408080;
  font-style: italic
}

pre .hljs-keyword,
pre .hljs-assignment,
pre .hljs-literal,
pre .hljs-css .hljs-rule .hljs-keyword,
pre .hljs-winutils,
pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
  color: #954121;
}

pre .hljs-number,
pre .hljs-hexcolor {
  color: #40a070
}

pre .hljs-string,
pre .hljs-tag .hljs-value,
pre .hljs-phpdoc,
pre .hljs-tex .hljs-formula {
  color: #219161;
}

pre .hljs-title,
pre .hljs-id {
  color: #19469D;
}

pre .hljs-params {
  color: #00F;
}

pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
  font-weight: normal
}

pre .hljs-class .hljs-title,
pre .hljs-haskell .hljs-label,
pre .hljs-tex .hljs-command {
  color: #458;
}

pre .hljs-tag,
pre .hljs-tag .hljs-title,
pre .hljs-rules .hljs-property,
pre .hljs-django .hljs-tag .hljs-keyword {
  color: #000080;
  font-weight: normal
}

pre .hljs-attribute,
pre .hljs-variable,
pre .hljs-instancevar,
pre .hljs-lisp .hljs-body {
  color: #008080
}

pre .hljs-regexp {
  color: #B68
}

pre .hljs-class {
  color: #458;
}

pre .hljs-symbol,
pre .hljs-ruby .hljs-symbol .hljs-string,
pre .hljs-ruby .hljs-symbol .hljs-keyword,
pre .hljs-ruby .hljs-symbol .hljs-keymethods,
pre .hljs-lisp .hljs-keyword,
pre .hljs-tex .hljs-special,
pre .hljs-input_number {
  color: #990073
}

pre .hljs-builtin,
pre .hljs-constructor,
pre .hljs-built_in,
pre .hljs-lisp .hljs-title {
  color: #0086b3
}

pre .hljs-preprocessor,
pre .hljs-pi,
pre .hljs-doctype,
pre .hljs-shebang,
pre .hljs-cdata {
  color: #999;
}

pre .hljs-deletion {
  background: #fdd
}

pre .hljs-addition {
  background: #dfd
}

pre .hljs-diff .hljs-change {
  background: #0086b3
}

pre .hljs-chunk {
  color: #aaa
}

pre .hljs-tex .hljs-formula {
  opacity: 0.5;
}

/*---------------------- Layout Toggles -----------------------------*/
#layout_toggles {
  position: fixed;
  top: 0;
  right: 100px; /* Left of Jump To */
  z-index: 100;
  background: white;
  padding: 5px;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  font: 10px Arial;
  text-transform: uppercase;
}

#layout_toggles a {
  text-decoration: none;
  padding: 5px 10px;
  color: #30404f;
  margin: 0 2px;
}

#layout_toggles .label {
  padding: 0 5px 0 2px;
  color: #777;
}

#layout_toggles a.active {
  background: #30404f;
  color: #fff;
  border-radius: 3px;
}

#layout_toggles a:not(.active):hover {
  background: #f5f5ff;
  color: #30404f;
}

/*---------------------- Stacked Layouts -----------------------------*/

body.layout-top #background,
body.layout-bottom #background {
  display: none;
}

body.layout-top ul.sections > li,
body.layout-bottom ul.sections > li {
  white-space: normal;
  display: flex;
}

body.layout-top ul.sections > li {
  flex-direction: column;
}

body.layout-bottom ul.sections > li {
  flex-direction: column-reverse;
}

body.layout-top ul.sections > li > div.annotation,
body.layout-bottom ul.sections > li > div.annotation {
  display: block;
  max-width: 900px;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  padding: 20px 25px 10px 25px;
  background: #fff;
}

body.layout-top ul.sections > li > div.content,
body.layout-bottom ul.sections > li > div.content {
  display: block;
  width: 100%;
  padding: 10px 25px;
  max-width: 900px;
  margin: 0 auto;
}

/* Optional: Make the code blocks look distinct in stacked mode */
body.layout-top pre, 
body.layout-bottom pre {
  border: 1px solid #e5e5ee;
  border-radius: 3px;
  padding: 10px 15px;
}

body.layout-top,
body.layout-bottom {
  background-color: #fff;
}

@media only screen and (max-width: 600px) {
  #layout_toggles {
    right: auto;
    left: 0;
    border-radius: 0 0 5px 0;
    font-size: 9px;
  }
  
  #layout_toggles a {
    padding: 5px 5px;
  }
  
  body.layout-top ul.sections > li > div.annotation,
  body.layout-bottom ul.sections > li > div.annotation {
    padding: 10px 15px 5px 15px;
  }
  
  body.layout-top ul.sections > li > div.content,
  body.layout-bottom ul.sections > li > div.content {
    padding: 5px 15px;
  }
}

/* Allow page scrolling for code in side layout */
ul.sections > li > div.content pre {
  overflow-x: visible;
}

/* Keep internal scrolling for code in stacked layouts */
body.layout-top ul.sections > li > div.content pre,
body.layout-bottom ul.sections > li > div.content pre {
  overflow-x: auto;
}

