:root {
  --red: #cd2355;
  --red-tint: #d75a64;
  --docsearch-primary-color: var(--red);
  --docsearch-logo-color: var(--red-tint);
}

/* overrides for the old theme */
body {
    font-family: initial;
    font-weight: initial;
    background: transparent;
    color: initial;
    font-size: initial;
    line-height: initial;
    margin: 0;
}

h1 {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    font-size: initial;
    line-height: initial;
    color: initial;
    background: transparent;
}
/* end overrides */

* {
  box-sizing: border-box;
}

body, article, div, nav, h1, h2, h3, h4, p { 
  display: block;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f6f6f6;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.toptitle {
  color: #fff;
  text-align: center;
  width: 100%;
  background-color: #343434;
  position: relative;
  padding-top: 50px;
  padding-bottom: 20px;
  margin-bottom: 0px;
}

.toptitle h1 {
  font-size: 2.5em;
  font-weight: normal;
  letter-spacing: 1px;
  color: #fff;
  position: relative;
  margin-top: 0px;
}

.toptitle h1 a {
  text-decoration: none;
  color: #fff;
}

div.subtitle {
  color: #fff;
  background-color: #343434;
  padding-top: 0;
  padding-bottom: 80px;
  text-align: center;
}

div.subtitle p {
  text-align: center;
  font-size: 1.2em;
  margin-left: auto;
  margin-right: auto;
}

#docsearch .DocSearch-Button {
  margin-top: 30px;
  margin-left: auto;
  margin-right: auto;
}

#container {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 100px 100px 0px 100px;
}

#container nav#contents {
  width: 300px;
  max-width: 400px;
}

nav#mobile-contents {
  display: none;
}

nav#contents {
  --offset: 1rem;
  align-self: start;
  position: -webkit-sticky;
  position: sticky;
  top: var(--offset);
  max-height: calc(100vh - var(--offset));
}

nav#contents {
  overflow-y: auto;
}

nav#mobile-contents {
  overflow-y: auto;
}

nav#mobile-contents {
  max-height: 800px;
  margin-bottom: 30px;
}

nav#contents h2 {
  font-weight: bold;
  font-size: 0.95em;
  color: #343434;
  margin-right: 30px;
  margin-bottom: 15px;
  border-bottom: 1px solid #343434;
}

nav#contents h3,
nav#mobile-contents h3 {
  font-weight: bold;
  font-size: 0.85em;
  line-height: 1.5rem;
  color: #343434;
  cursor: pointer;
}

nav#contents ul,
nav#mobile-contents ul {
  color: #343434;
  list-style-type: none;
}

nav#contents ul.sectlevel1,
nav#mobile-contents ul.sectlevel1,
.tocify-item {
  font-size: 0.85em;
  padding-left: 20px;
  height: auto;
}

nav#contents .itemcontents,
nav#mobile-contents .contents-inner {
  height: auto;
  transition: height 1s;
}

nav#contents .itemcontents.hidden,
nav#mobile-contents .contents-inner.hidden {
  height: 0px;
  overflow: hidden;
}

nav#contents a,
nav#mobile-contents a {
  color: #343434;
  text-decoration: none;
}

nav#contents li ul,
nav#mobile-contents li ul {
  margin-top: 15px;
}

nav#contents li,
nav#mobile-contents li {
  margin-bottom: 15px;
}

nav#contents .tocify-item.active {
  text-decoration: underline;
}

ul#tocify-header0,
ul#tocify-header1 > li:first-of-type {
  display: none;
}

ul#tocify-header1,
ul#tocify-header1 > ul.tocify-subheader {
  margin-left: 0;
  padding-left: 0;
}

#content {
  width: 70%;
  min-width: 600px;
  max-width: 900px;
  margin-left: 50px;
}

#content h1 {
  font-weight: 700;
  font-size: 34px;
  color: var(--red);
  margin-bottom: 40px;
  position: relative;
  margin-left: -1rem;
  padding-left: 1rem;
}

#content h2 {
  font-weight: 700;
  font-size: 30px;
  color: #343434;
  margin-top: 40px;
  margin-bottom: 15px;
  position: relative;
  margin-left: -1rem;
  padding-left: 1rem;
}

#content h3 {
  font-weight: 700;
  font-size: 24px;
  color: #343434;
  margin-top: 40px;
  margin-bottom: 15px;
  position: relative;
  margin-left: -1rem;
  padding-left: 1rem;
}

#content h4 {
  font-weight: 700;
  font-size: 16px;
  color: #343434;
  margin-top: 40px;
  margin-bottom: 15px;
  position: relative;
  margin-left: -1rem;
  padding-left: 1rem;
}

#content h5, 
#content h6 {
  position: relative;
  margin-left: -1rem;
  padding-left: 1rem;
}

#content div.listingblock div.content div.ttc {
  display: none;
}

h1 .anchor, 
h2 .anchor, 
h3 .anchor, 
h4 .anchor, 
h5 .anchor, 
h6 .anchor {
  position: absolute;
  top: 0px;
  text-decoration: none;
  width: 1.75ex;
  margin-left: -1.5ex;
  visibility: hidden;
  font-size: .8em;
  font-weight: 400;
  padding-top: .05em;
}

h1 .anchor, 
h2 .anchor {
  top: -5px;
}

h3 .anchor {
  top: -3px;
}

h4 .anchor, 
h5 .anchor, 
h6 .anchor {
  top: -2px;
}

h1:hover .anchor, 
h2:hover .anchor, 
h3:hover .anchor, 
h4:hover .anchor, 
h5:hover .anchor, 
h6:hover .anchor {
  color: var(--red);
  visibility: visible;
}

h1 .anchor::before, 
h2 .anchor::before, 
h3 .anchor::before, 
h4 .anchor::before, 
h5 .anchor::before, 
h6 .anchor::before {
  content: "\00a7";
}

#content p {
  font-size: 0.95em;
  font-weight: 300;
  line-height: 1.5em;
  margin-bottom: 15px;
}

#content div.edit-link {
  font-size: 0.8em;
  font-style: italic;
  margin-top: -12px;
  margin-bottom: 20px;
  margin-left: 5px;
}

#content div.imageblock {
  margin-top: 20px;
  margin-bottom: 20px;
}

#content div.listingblock {
  margin-bottom: 15px;
  position: relative;
}

#content div.listingblock button.copy-button {
  position: absolute;
  top: 1px;
  right: 1px;
  border: 1px solid #d8d8d8;
  min-width: 27px;
  padding: 3px;
}

#content div.listingblock button.copy-button.hidden,
#content div.listingblock button.copy-button span.tooltip.hidden {
  display: none;
}

#content div.listingblock button.copy-button div.copy-button-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#content div.listingblock button.copy-button svg {
  width: 18px;
}

#content div.listingblock button.copy-button strong.copy-button-label,
#content div.listingblock button.copy-button span.tooltip {
  white-space: pre;
  line-height: 15px;
}

#content div.listingblock div.content {
  color: #fff;
  background-color: #343434;
  padding: 7px 15px 7px;
  overflow-x: auto !important;
}

#content div.listingblock div.content div.line,
#content div.listingblock div.content div,
#content div.listingblock div.content div div {
  font-family: monospace;
  white-space: pre;
}

#content div.listingblock div.content div.line a,
#content div.listingblock div.content div a,
#content div.listingblock div.content div div a {
  color: var(--red-tint);
}

span.mlabels {
  position: absolute;
  bottom: 8px;
  right: 0;
}

td.mlabels-right {
  padding-left: 30px;
  vertical-align: bottom;
}

span.mlabel {
  display: inline-block;
  background-color: var(--red);
  color: #ffffff;
  padding: 3px;
  border-radius: 2px;
  font-size: 0.8em;
  margin-right: 10px;
}

#content table {
  margin-bottom: 15px;
}

#content td {
  font-size: 0.95em;
}

#content table.tableblock {
  border-collapse: collapse;
}

#content table.tableblock th {
  font-size: 0.85em;
  background-color: #d8d8d8;
  text-align: left;
  padding: 5px 7px 5px 7px;
  border: 1px solid #343434;
}

#content td.tableblock {
  border-collapse: collapse;
  padding: 5px 7px 5px 7px;
  border: 1px solid #343434;
}

#content td.tableblock p {
  margin-bottom: 0;
}

#content table.tableblock th.halign-left,
#content table.tableblock td.halign-left {
  text-align: left;
}

#content table.tableblock th.halign-right,
#content table.tableblock td.halign-right {
  text-align: right;
}

#content table.tableblock th.halign-center,
#content table.tableblock td.halign-center {
  text-align: center;
}

#content table.tableblock th.valign-top,
#content table.tableblock td.valign-top {
  vertical-align: top;
}

#content table.tableblock th.valign-bottom,
#content table.tableblock td.valign-bottom {
  vertical-align: bottom;
}

#content table.tableblock th.valign-middle,
#content table.tableblock td.valign-middle {
  vertical-align: middle;
}

#content td.icon {
  font-weight: bold;
  color: #343434;
  vertical-align: top;
  padding-right: 10px;
}

#content td.content {
  font-weight: 300;
}

#content p > code,
td code {
  font-size: 1.1em;
  background-color: #dedede;
}

td div.listingblock div.content code {
  background-color: transparent;
}

#content img {
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 100%;
  height: auto;
}

div.imageblock div.title {
  font-style: italic;
  font-weight: 300;
  font-size: 0.8em;
  margin-top: -15px;
  margin-bottom: 30px;
}

.w10 { width: 10%; }
.w20 { width: 20%; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w90 { width: 90%; }

#content .imageblock.left {
  float: left;
  margin-right: 30px;
}

#content .imageblock.right {
  float: right;
  margin-left: 30px;
}

#content .imageblock.left,
#content .imageblock.left img,
#content .imageblock.right,
#content  .imageblock.right img {
  margin-top: 0px;
}

#content .imageblock.left img,
#content  .imageblock.right img {
  max-width: 250px;
}

div.admonitionblock table {
  display: flex;
  width: 100%;
}

div.admonitionblock tbody {
  width: 100%;
}

div.admonitionblock tr {
  display: flex;
  flex-direction: column;
}

div.admonitionblock td div.title {
  color: var(--red);
  text-transform: uppercase;
}

div.admonitionblock td.content {
  border: 2px solid var(--red);
  padding: 10px;
  margin-top: 10px;
  width: 100%;
}

#content div.admonitionblock.note td.content p {
  margin-bottom: 0px;
}

div.videoblock {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

div.videoblock iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* WHITEPAPER BLOCKS */

.whitepaper {
  margin-bottom: 30px;
}

.whitepaper .content {
  border: 2px solid var(--red);
  padding: 10px;
}

.whitepaper::before {
  content: "Whitepaper";
  text-transform: uppercase;
  display: block;
  color: var(--red);
  margin-bottom: 10px;
  font-weight: bold;
}

.whitepaper div.inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.whitepaper .coverimage {
  background-color: #fff;
  background-repeat: no-repeat;
  background-image: url(whitepaper_coverimage.png);
  background-size: 177px 242px;
  flex: 2 0 auto;
  margin-right: 10px;
  height: 242px;
  width: 177px;
  border: 1px solid #cecece;
  text-align: right;
  padding: 80px 15px 15px;
  font-family: monospace;
  color: var(--red);
  font-size: 10px;
  cursor: pointer;
}

#content .whitepaper .coverimage p.title {
  font-family: monospace;
  font-weight: bold;
  margin-bottom: 6px;
}

#content .whitepaper h5 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 10px;
}

/* TUTORIAL BLOCKS */

#content .tutorialcard {
  max-width: 400px;
  border: 1px solid #dedede;
  border-radius: 5px;
}

#content .tutorialcard p.caption {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.9em;
}

/* DOXYGEN ELEMENTS */

div.memproto {
  background-color: #dedede;
  padding: 7px;
  margin-bottom: 15px;
  position: relative;
}

div.memproto table,
#content div.memproto table {
  margin-bottom: 0px;
}

div.memitem {
  border: 1px solid black;
  padding: 10px;
}

table.params, 
p.returns {
  font-weight: 300;
}

table.params td {
  padding-right: 8px;
}

td.paramname {
  vertical-align: top;
  font-weight: bold;
}

table.memname td, table.memname td.paramname {
  vertical-align: bottom;
}

ul.memberdecls {
  list-style-type: none;
  padding-left: 0;
}

ul.memberdecls li.memitem {
  padding-top: 10px;
  list-style-type: disc;
  margin-left: 16px;
}

#content ul.memberdecls li.memitem p {
  font-weight: bold;
  font-family: monospace;
  font-size: 1.1em;
}

ul.memberdecls li.memdesc {
  margin-left: 16px;
  list-style-type: none;
}

p.see span.label {
  display: inline-block;
  margin-right: 5px;
}

span.obfuscator {
  display: none;
}

/* LEGAL */

div.legal {
  margin: 60px auto 0 auto;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-bottom: 40px;
}

div.legal + div.legal {
  margin-top: 5px;
}

div.legal-inner {
  width: 100%;
}

div.contribute {
  margin: 60px auto 0 auto;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: -60px;
}

div.contribute + div.contribute {
  margin-top: 5px;
}

div.contribute-inner {
  width: 100%;
}



p#copyright {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 0.85em;
  color: #707070;
}

footer {
  margin-top: 30px;
}

.c-footer-social__link--facebook {
    background-image: url(https://www.raspberrypi.com/app/themes/mind-control/images/application/footer/social/facebook.svg);
}
.c-footer-social__link--twitter {
    background-image: url(https://www.raspberrypi.com/app/themes/mind-control/images/application/footer/social/twitter.svg);
}
.c-footer-social__link--instagram {
    background-image: url(https://www.raspberrypi.com/app/themes/mind-control/images/application/footer/social/instagram.svg);
}
.c-footer-social__link--youtube {
    background-image: url(https://www.raspberrypi.com/app/themes/mind-control/images/application/footer/social/youtube.svg);
}

@media screen and (max-width: 1350px) {
  div.contribute {
    padding-left: 50px;
    padding-right: 50px;
  }

  .legal {
    padding-left: 50px;
    padding-right: 50px;
  }
}

@media screen and (max-width: 1200px) {
  #content {
    width: 625px;
  }
}

@media screen and (max-width: 1149px) {
  #container {
    margin-left: 50px;
    margin-right: 50px;
  }
}

@media screen and (max-width: 1024px) {
  #container {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
  }

  #container nav#contents {
    display: none;
  }

  nav#mobile-contents {
    display: block;
  }

  nav#mobile-contents h2 {
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    color: #343434;
    margin-bottom: 15px;
  }

  nav#mobile-contents div.mobile-contents-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    margin-left: auto;
    margin-right: auto;
  }

  nav#mobile-contents span.mobile-contents-line {
    width: 100%;
    inline-size: 100%;
    height: 4px;
    block-size: 4px;
    margin-bottom: 7px;
    background-color: #000;
    border-radius: 4px;
    content: " ";
    display: block;
    transform-origin: left center;
    transition-duration: .15s;
    transition-property: background-color,opacity,transform;
    transition-timing-function: cubic-bezier(.68,-.55,.265,1.55);
    will-change: background-color,opacity,transform;
  }

  nav#mobile-contents.active span.mobile-contents-line {
    opacity: 0;
  }

  nav#mobile-contents.active span.mobile-contents-line:first-child,
  nav#mobile-contents.active span.mobile-contents-line:last-child {
    opacity: 1;
    width: 104%;
  }

  nav#mobile-contents.active span.mobile-contents-line:first-child {
    transform: rotate(45deg);
  }

  nav#mobile-contents.active span.mobile-contents-line:last-child {
    transform: rotate(-45deg);
  }

  nav#mobile-contents .contents-inner {
    margin-top: 20px;
  }

  nav#mobile-contents .contents-inner.hidden {
    margin-top: 0px;
  }

  #content {
    width: 100%;
    min-width: auto;
    margin-left: 0px;
  }

  .w10, .w20, .w30, .w40, .w50, .w60, .w70, .w80, .w90 {
    width: 100%;
  }

  #content .imageblock.left {
    float: none;
  }

  #content .imageblock.right {
    float: none;
  }

  #content .imageblock.left,
  #content .imageblock.left img,
  #content .imageblock.right,
  #content .imageblock.right img {
    margin-top: 20px;
    margin-right: 0px;
    margin-left: 0px;
  }
}

@media screen and (max-width: 700px) {
  #content {
    margin-left: 0px;
  }
  #container {
    margin-left: 25px;
    margin-right: 25px;
  }
}

@media print {
  header,
  footer,
  div.toptitle,
  div.toptitle h1,
  nav#contents, 
  div#search-container,
  div#tab-menu,
  ul#tab-container li,
  ul#tab-container li a {
    display: none !important;
  }
  div#container {
    margin-left: 0;
    margin-right: 0;
    justify-content: center !important;
  }
  #content div.listingblock div.content {
    overflow-x: hidden;
  }
  #content div.listingblock div.content pre,
  #content div.listingblock div.content div.line {
    white-space: pre-wrap;
    word-break: break-all;
  }
}
