@import 'https://fonts.googleapis.com/css?family=Istok+Web|Oxygen|Source+Sans+Pro';
@import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css';
body {
  font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;
  background-color: #fefefe;
  margin-top: 0;
}

.title {
    font-size: 2.5rem;
}

.author {
    font-size: 1.5rem;
    padding-top: 10px;
}

.dedication {
    font-style: italic;
    text-align: center;
}

.proposition, .question-begin, .question-end, .exercise {
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 1.2rem;
  color: green;
}

.solution, .solution-begin, .solution-end {
  font-size: 1.4rem;
  font-weight: bold;
  color: red;
}

/* we can remove this eventually
its only here while we sort out the book*/
.solution-body {
    font-weight: normal;
    color: black;
}

.solution-end, .question-end {
/*  width: 55%; */
/*  text-align: right; */
/*  float: right; */
/*  margin-top: -30px; */
    height: 1em;
}

.solution-icon {
    float: right;
}

.clickable {
    cursor: pointer;
}

.margintab {
  margin: 0;
  width: 30%;
  position: relative;
  right: 10%;
}

.MJXc-display {
  width: 55%;
  font-size: 1.1rem;
}

.math {
  font-size: 1.1rem;
}

h1 {
  color: var(--main-bg-color);
  width: 55%;
  border-bottom-color: var(--main-bg-color);
  border-bottom-style: solid;
  padding-bottom: 0.5rem;
}

h2 {
  color: var(--main-bg-color);
  border-bottom-color: var(--main-bg-color);
  border-bottom-style: solid;
  width: 55%;
  padding-bottom: 0.5rem;
  margin-top: 3em;
  font-weight: bold;
}

.tooltip>.internal-link-btn {
  display: none;
  float: none;
  vertical-align: middle;
  padding: 0;
  margin-left: 10px;
  border: none;
  background: none;
  color: #1881c2;
}
h2:hover>.tooltip>.internal-link-btn { display: inline }
h3:hover>.tooltip>.internal-link-btn { display: inline }

.internal-link>a:link {
  text-decoration: none;
  background-size: 0;
}

h3 {
  color: var(--main-bg-color);
  font-size: 1.5rem;
}

h4 {
  font-size: 1.4rem;
}

li p {
  margin-bottom: 0;
}

video {
  width: 100%;
}

.shaka-video-container {
  width: 55%;
  max-width: 100%;
}


/* header bar */

ul.navbar {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--main-bg-color);
    top: 0;
}

li .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    line-height: 2.0rem;
    margin-right: 16px;
    padding-top: 55px;
    padding-bottom: 15px;
}

li .dropdown:hover .dropbtn {
    background-color: red;
}

li.dropdown {
    display: inline-block;
    color: white;
    padding: 0;
}


li .marginnote,li .sidenote {
    width: 61%;
    margin-right: -84.4%;
}

blockquote {
  width: 45%;
  -webkit-padding-start: 5%;
  -webkit-padding-end: 5%;
  -moz-padding-start: 5%;
  -moz-padding-end: 5%;
  display: block;
  margin-block-end: 0;
  margin-block-start: 0;
  margin-inline-start: 0;
  scroll-margin-inline-end: 0;
}

blockquote p {
  width: 100%;
  background-color: #F7F7F7;
  font-size: 1.3rem;
  font-style: italic;
}

blockquote .marginnote, blockquote .sidenote {
    width: 61%;
    margin-right: -84.4%;
}

.msmb {
    display: inline-block;
    color: white;
    padding: 14px 16px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    width: 27.5%;
    z-index: 1;
    margin-right: 140px;
    /*modify margin as window resized */
    right: calc((87.5% - 1400px)/2);
    max-width: 440px;
    font-size: 1.2rem;
}

/* keeps the dropdown menu aligned with header
when window exceeds 1615px */
@media screen and (max-width: 1615px) {
  .dropdown-content {
    margin-right: 0;
    right: 8.75%;
  }
}

.dropdown-content a {
    color: black;
    padding: 4px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    text-shadow: none;
}

.dropdown-content a:hover {
    background-color: rgb(24,129,194,0.4);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown a:link {
    background-position-y: 0;
    text-shadow: none;
    background-size: 0;
}

#active-page {
    background-color: var(--main-bg-color);
    color: white;
}

.toc-sections {
    font-size: 0.7rem;
    padding-left: 0;
    padding-right: 0;
    background-color: rgb(24,129,194,0.3);
    list-style-type: none;
}

li.toc {
    padding: 0;
    font-size: 1.1rem;
}

li.toc a {
    padding-left: 10%;
    padding-top: 1px;
    padding-bottom: 1px;
}

/* formatting tables */
.console {
  width: 80%;
  table-layout: fixed;
  border: 0;
  font-family: monospace;
}

.kable_wrapper {
  border: 0;
  table-layout: fixed;
}

.code {
    font-size: 0.9em;
}

div.sourceCode {
    width: 56%;
    /*padding-left: 1%;*/
}

pre {
    width: auto;
    padding-top: 2px;
    padding-bottom: 2px;
    /*padding-left: 1%;
    padding-right: 1%;*/
    background-color: #F7F7F7;
    margin-bottom: 10px;
    margin-top: 3px;
    margin-top: 4px;
    overflow-x: scroll;
}

.build-date {
  font-size: 0.8em;
  float: left;
  line-height: 1em;
  margin-bottom: 2em;
  margin-top: 0;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 70px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 50%;
  margin-left: -35px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}


.tooltip-eqn {
  position: relative;
  z-index: 100;
}

.tooltip-eqn .tooltiptext {
  visibility: hidden;
  width: 70px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  margin-left: -35px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip-eqn .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip-eqn:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.tooltip-eqn>.internal-link-eqn {
  display: none;
  float: none;
  vertical-align: middle;
  padding: 0;
  margin-left: 10px;
  margin-top: -10px;
  border: none;
  background: none;
  color: black;
  position: absolute;
}
.eqn-mouseover:hover>.tooltip-eqn>.internal-link-eqn { display: inline }

.eqn-mouseover {
  display: flex;
  align-items: center;
}

@media (max-width: 760px) {
    body {
        padding-left: 0;
        margin-left: 2%;
        margin-right: 2%;
        width: auto;
    }
    p {
        width: auto;
        font-size: 1.2em;
    }
    .marginnote, .sidenote {
        left: 0;
    }
    .sourceCode {
        display: inline-block;
        width: 90%;
    }
    .title, .author, .dropdown {
        text-align: center;
    }
    .dropdown {
        width: 100%;
    }
    .dropdown-content {
        position: inherit;
        width: 100%;
    }
    li .dropbtn {
        padding-top: 0;
    }
    h1, h2, h3 {
        width: 100%;
    }
    h3 {
        display: inline-block;
    }
    #TOC {
        max-width: 100%;
    }

}
