html {
  font-family: sans;
  margin: 0;
  padding: 0;
  background-color: #888;
  border-left: .2rem solid #333;
  border-right: .2rem solid #333;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
}

a:link {
  color: #B03931;
}
a:visited {
  color: #B03931;
}
a:hover {
  color: #742620;
}

div.main {
  overflow: hidden;
  background-color: #F0F0F0;
  min-height: calc(100vh - 1rem);
  margin: 0 auto;
  max-width: 72rem;
}



/**** BREADCRUMBS ****/

div.breadcrumbs {
  color: white;
  background-color: #943029;
  padding: 0.6rem 1.0rem 1.0rem 1.0rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 72rem;
  box-sizing: border-box;
  text-align: right;
  top: 0;
  width: 100%;
  height: 48px;
  font-size: 95%;

  position: fixed;
}

div.breadcrumbs a {
    color: white;
}

div.breadcrumbs span.highlight, div.breadcrumbs span a {
  color: yellow;
  font-weight: bold;
}


div.breadcrumbs small {
  font-size: 0.8rem;
}

/** narrow screen hacks **/
@media only screen and (max-width: 1000px) {
  div.breadcrumbs span, div.breadcrumbs small {
    font-size: 0.8rem;
  }
}
@media only screen and (max-width: 800px) {
  div.breadcrumbs small {
    display: none;
    position: fixed;
  }
  div.breadcrumbs span {
    font-size: 0.75rem;
  }
}
@media only screen and (max-width: 600px) {
  div.breadcrumbs span {
    font-size: 0.65rem;
  }
}

div.breadcrumbs a.home {
  float: left;
  font-weight: bold;
  font-size: 200%;
  margin: -0.6rem 1rem 0 0;
  text-decoration: none;
}

div.breadcrumbs input {
  float: left;
  width: 9.3rem;
  padding-left: 0.5em;
  height: 2em;
  border: none;
  border-radius: 5px;
}


/* anchors need to compensate for the fixed-pos breadcrumbs */
a.anchor {
  display: block;
  position: relative;
  top: -48px;
  visibility: hidden;
}


/** SEARCH RESULTS **/
#results {
  position: absolute;
  max-height: 30em;
  background-color: #eee;
  box-shadow: 0 .25rem .25rem black;
  display: none;
  text-align: left;
  color: black;
  margin-top: 2rem;
  font-size: 100%;
  z-index: 1000;
  overflow-y: scroll;
}


#results a {
  color: #B03931;
}


/**** SIDEBAR, TABLE OF CONTENTS ****/

div.sidebar {
  margin-top: 48px;
  float: left;
  margin-right: -1px;
}

div.toc {
  line-height: 1.6rem;
  display:block;
}

@media only screen and (max-width: 800px) {
  div.toc {
    font-size: 0.5rem;
    padding: 1.5rem 0.4rem 1rem 0.2rem;
  }
}

/* stuff for showing/hiding the sidebar */
.hide, .show {
  display: block;
  float: right;
  border-right: 1px solid #D0D0D0;
  border-bottom: 1px solid #D0D0D0;
  border-left: 1px solid #D0D0D0;
  padding: 0 0.4rem;
}

a.hide, a.show {
  color: #111;
  text-decoration: none;
  background-color: #F0F0F0;
  border-right: 1px solid #D0D0D0;
  border-bottom-left-radius: 3px;
}

.show {
  display: none;
}

.hide:target + .show {
  display: inline;
  position: absolute;
}

.hide:target {
  display: none;
}

.hide:target ~ .toc {
  display:none;
}

div.toc .toc-additional {
    border-bottom: 1px dashed #333;
    line-height: 1.5rem;
}

div.toc .toc-additional p, div.toc .toc-additional ul {
    margin: 0.4rem 0;
}

div.toc ul {
  list-style-type: none;
  padding-left: 0;
  padding-bottom: 0.2rem;
}

div.toc ul ul {
  list-style-type: none;
  padding-left: 0.5rem;
}


div.toc a {
    /* font-size: 1.25em; */
}

@media only screen and (max-width: 800px) {
  div.toc ul ul {
    padding-left: 0.2rem;
  }
}

div.toc span.package {
  cursor: pointer;
  line-height: 1.8rem;
  font-weight: bold;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  background-color: #F0F0F0;
  font-size: 1.0rem;
  padding: 0 0.2rem;
  /* counteracts the text movement caused by the padding */
  margin: 0 -0.2rem;
}

div.toc span.package a {
  font-size: 1em;
}

/* Highlight the current module/package */
div.toc .selected {
  border-radius: 4px;
  border: 1px solid #C0C0C0;
  padding: 0.2rem;
  margin-left: calc(-0.2rem - 1px);
}


/**** MAIN CONTENT ****/

div.content {
  margin-top: 48px;
  padding: 1.5em;
  font-size: 0.9rem;
  line-height: 1.3rem;
  overflow: hidden;
  border-left: 1px solid #D0D0D0;
  border-bottom: 1px solid #D0D0D0;
  background-color: #F8F8F8;
	min-height: calc(100vh - 48px - 48px - 1rem - 3px);
}
@media only screen and (max-width: 800px) {
  div.content {
    font-size: 82%;
  }
}
@media only screen and (max-width: 600px) {
  div.content {
    font-size: 70%;
    padding: 1.5em 0.3em 1.5em 0.5em;
  }
}

div.content h2 {
  margin: .35rem 0 .45rem 0;
  padding-top: .35rem;
  font-size: 1.0rem;
}

div.content h3 {
  font-size: 1.1rem;
}

div.content tr {
  margin: 0;
}

div.content table {
  border-bottom: 1px dashed #333;
  line-height: 120%;
  margin: 1em 0;
}

div.content td {
  border-top: 1px dashed #333;
  margin: 0;
  padding: .26rem .64rem;
  /* min-width: 10rem; */
}

div.members td {
  min-width: 12rem;
}

div.content td:first-child {
  text-align: left;
}

/* prevent function attribs from wrapping, make the cell wider instead */
div.content td:first-child * {
  white-space: nowrap
}

/* The first markdown-generated paragraph in e.g. Params tables shouldn't add any vertical
 * space
 */
div.content td p:first-child {
  margin: 0;
}

div.content p strong {
  font-size: 0.92rem;
}

.paramName {
  font-weight: bold;
  width: 6rem;
}

.paramDoc {
  line-height: 120%;
}

div.section {
  padding: 0;
  margin: 0;
}



/**** EXTRA INFO IN FUNCTION/CLASS/ETC LISTS ****/

div.content td .extrainfo{
  display: block;
  line-height: 105%;
  font-family: monospace;
  font-size: 0.85rem;
  text-align: center;
}

.extrainfo div {
  display: block;
  margin: 0;
}

.extrainfo .attr-const   { color: blueviolet; }
.extrainfo .attr-pure    { color: darkslategray; }
.extrainfo .attr-nothrow { color: brown; }
.extrainfo .attr-nogc    { color: darkgreen; }
.extrainfo .attr-safe    { color: darkblue; }
.extrainfo .attr-trusted { color: firebrick; }
.extrainfo .attr-system  { color: darkred; }
.extrainfo .attr-final   { color: darkolivegreen; }
.extrainfo .attr-ref     { color: fuchsia; }


/**** SYMBOLS (not used by the one-file-for-every-variable writer backend) ****/

div.aggregate-symbol {
  display: flex;
  flex-direction: column;
  display: -webkit-flex;
  -webkit-flex-direction: column;
}

div.aggregate-symbol div.description {
  order: -2;
  -webkit-order: -2;
  max-width: 54rem
}

div.aggregate-symbol div.members {
  order: -1;
  -webkit-order: -1;
  padding-bottom: 0.3rem;
  border-bottom: 3px solid #333;
  margin: 1rem 0rem 1.5rem 0rem;
  max-width: 55rem;
}

div.symbol {
  border-radius: 3px;
  border: 1px solid #aaaaaa;
  padding: 1px 0.4rem;
  margin: 0.5rem 0;
  margin-bottom: 1.1rem;
  max-width: 54rem;
}

a.anchor:target + div.symbol {
  border: 2px solid #943029;
  border-radius: 0;
  background-color: #F7F3F3;
}



/**** SECTION-SPECIFIC STYLES ****/

.section.seealso, .section.note, .section.imports {
  font-size: 0.9rem;
  line-height: 135%;
  background-color: #F0F0F0;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #D0D0D0;
}

.section.imports {
  max-width: 36rem;
}

.description .section.imports {
  max-width: 18rem;
}

.section.seealso h2, .section.note h2 {
  display: block;
  float: left;
  margin: 0 0.7rem -0.05rem 0rem;
  padding: 0;
  font-size: 1.0rem;
}

.section.imports h2 {
  display: inline;
  margin: 0.5rem 0rem;
  padding: 0;
  font-size: 1.0rem;
}

.section.seealso div.seealso-content, .section.note div.note-content {
  display: block;
  margin-left: 6.5rem;
}

.section.imports td {
  border-top: 1px solid #555 !important;
  text-align: left !important;
}

.section.imports table {
  border-bottom: 1px solid #555 !important;
}

.section.imports ul {
  margin: 0;
  margin-top: 0.5rem;
  list-style-type: none;
  padding-left: 1.5rem;

  -moz-column-count: 1;
  -moz-column-gap: 20px;
  -webkit-column-count: 1;
  -webkit-column-gap: 20px;
  column-count: 1;
  column-gap: 20px;
}

@media only screen and (max-width: 1400px) {
  .section.imports ul {
    -moz-column-count: 1;
    -moz-column-gap: 20px;
    -webkit-column-count: 1;
    -webkit-column-gap: 20px;
    column-count: 1;
    column-gap: 20px;
  }
}

@media only screen and (max-width: 1100px) {
  .section.imports ul {
    -moz-column-count: 1;
    -moz-column-gap: 13px;
    -webkit-column-count: 1;
    -webkit-column-gap: 13px;
    column-count: 1;
    column-gap: 13px;
  }
}

@media only screen and (max-width: 800px) {
  .section.imports ul {
    -moz-column-count: 1;
    -moz-column-gap: 7px;
    -webkit-column-count: 1;
    -webkit-column-gap: 7px;
    column-count: 1;
    column-gap: 7px;
  }
}


.section.imports ul a {
  color: #111;
}


.section.seealso *:first-child, .section.note *:first-child {
  margin-top: 0em;
}

.section.seealso ul, .section.note ul {
  padding-left: 1.5em;
}

.section.seealso *:last-child, .section.note *:last-child {
  margin-bottom: 0em;
}

/**** FOOTER ****/

footer {
  text-align: center;
  font-size: 0.6rem;
  color: white;
  background-color: #943029;
  padding: 0.2rem;
}

footer a:link {
  color: white;
}
footer a:visited {
  color: white;
}


/**** CODE ****/

pre {
  margin-top: 0.4em;
  white-space: pre-wrap;
  word-break: break-word;
}

/* DDoc code examples */
code {
  background-color: #F0F0F0;
  border: 1px solid #D0D0D0;
  color: #444444;
  padding: 1rem;
  border-radius: .1rem;
  display: block;
}

code a {
  color: white;
  text-decoration: none;
  border-bottom: 1px dotted #888;
}

/* hgen/libddoc errors */
div.error {
  color: darkred;
}

.pre.prettyprint {
}

.prettyprint a {
  color: black;
}

/*do not affect the first <pre>, which is not in a section*/
div.section pre > code {
  margin-bottom: .5rem;
  border-radius: .1rem;
  padding-bottom: 0;
  /* padding: 0.8em; */
}

div.contract pre > code {
  margin: 0;
  border-radius: .1rem;
  padding: 0.8rem;
  padding-top: 0;
  /* font-size: 85%; */
}

div.description  pre {
  margin-bottom: 0 !important;
}
div.contract > pre {
  margin-top: 0;
}

div.section td pre {
  margin: 0;
  padding: 0;
}


div.section td code:not(.prettyprint) {
  margin: 0;
  padding: 0.6rem;
}


.coffeescript .javascript,
.javascript .xml,
.xml .javascript,
.xml .vbscript,
.xml .css {
  opacity: 0.5;
}


.contract {
  margin: 0;
  font-size: 0.9rem;
  line-height: 110%;
}


.module-comment {
  border-bottom: 1px solid gray;
  border-top:    1px solid gray;
  margin-bottom: 2em;
  max-width:     50em;
}


.module-comment p {
  white-space: pre-wrap;
}


code.inline-code {
  padding: 0.1em 0.25em;
  display: inline;
  line-height: 1.6rem;
}
