/* TOP LEVEL CSS */

html {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    font-size: 14pt;
}

body {
    height: 98vh;
    max-width: 1920px;
    margin: auto;
}

a {
    color: blue;
    cursor: pointer;
    text-decoration-line: underline;
}

img {
    max-height: 700px;
}

figcaption {
    display: table-caption;
    caption-side: bottom;
    /*background: pink;*/
    padding: 10px;
    text-align: left;
}

#main-wrapper {
    position: relative;
    display: flex;
    max-width: 1920px;
    margin: auto;
}

.float-left {
    float: left;
}

.float-right {
    float: right;
}

.outer-wrapper {
    margin: auto;
}

.sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}

/* LIGHT/DARK MODE SWITCH */

.light-dark-mode-wrapper {
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
}

.switch-wrapper {
    display: flex;
}

#light-mode-icon, #dark-mode-icon {
    max-width: 20pt;
    vertical-align: middle;
    padding: 0 5px;
    filter: invert(99%) sepia(0%) saturate(0%) hue-rotate(290deg) brightness(116%) contrast(100%);
}

#light-mode-icon > svg {
    color: white;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3f3f3f;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

.switch {
    position: relative;
    display: inline-block;
    width: 80pt;
    height: 22pt;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

/* CONTROLS */

.controls {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

/* MAIN CONTENT DISPLAY */

.abstract {
    border-bottom: 1px solid darkgray;
}

.content-display {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    box-sizing: border-box;
    overflow: initial;
    margin-top: 3.2rem;
    padding: 5px;
}

#display {
    border: 2px solid darkgray;
    border-radius: 10px;
    max-height: 100vh;
    min-width: 300px;
    overflow: auto;
    padding: 5px;
    width: 100%;
    margin: 0 5px;
    height: 90vh;
}

/* TITLES */

h2 {
    color:#157495;
}

/* inner title */
.content-display > div > div > h2 {
    font-size: large;
}

#title-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;
    text-align: center;
    font-size: 15pt;
    color: whitesmoke;
    background: #2082a0;
    height: 40px;
    font-weight: bold;
    border-top: 0;
    border-left: 1px solid darkgray;
    border-right: 1px solid darkgray;
    border-bottom: 1px solid darkgray;
    border-radius: 0 0 10px 10px;
}

.title-bar {
    font-size: 20pt;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid darkgray;
    margin-bottom: 10px;
    color:#0F627D;
}

/* DARK MODE SETTINGS */

body.darkmode {
    background-color: #555555;
    color: lightgray;
}

body.darkmode h2, body.darkmode .title-bar {
    color: #E8EFF0;
}

body.darkmode a {
    color: lightblue;
}

body.darkmode .math-wrapper, body.darkmode .math-wrapper-inline {
    color: lightgray;
}

body.darkmode .example, body.darkmode .note {
    background-color: #757575;
}

body.darkmode .item > span:hover {
    background-color: #646464;
}

body.darkmode #openCloseTOC, #goBack, #goForward {
    background: lightgray;
    color: black;
}

body.darkmode .breadcrumb {
    color: white;
}

/* BREADCRUMBS */

.breadcrumb-title {
    padding-right: 10pt;
}

.breadcrumb {
    color: #0F627D;
    font-weight: bold;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.breadcrumb-extender {
    display: none;
}

.breadcrumb-extender .active {
    display: block;
    padding-left: 5px;
    padding-right: 5px;
}

/* TABLE OF CONTENTS */

.item:not(.expandable).active  > span {
    /*background: #b8b8b8;*/
    font-weight: bold;
    font-size: larger;
}

/*#toc-wrapper {*/
/*    border: 2px solid darkgray;*/
/*    border-radius: 10px;*/
/*    text-align: left;*/
/*    width: 25%;*/
/*    min-width: 200px;*/
/*    padding: 5px;*/
/*    margin: 0;*/
/*    height: 90vh;*/
/*    overflow: scroll;*/
/*    display: none;*/
/*}*/

#toc-wrapper {
    text-align: left;
    border-radius: 10px;
    /*height: 90vh;*/
    z-index: 1;
    overflow-x: hidden;
    overflow-y: scroll;
    transition: max-width 0.5s, min-width 0.5s, min-height 0.5s, max-height 0.5s, opacity 0.5s;
}

#toc-wrapper.closed-toc {
    border: 0 solid darkgray;
    max-width: 0;
    min-width: 0;
    max-height: 0;
    min-height: 0;
    width: 0;
    height: 0;
    opacity: 0;
}

#toc-wrapper.open-toc {
    border: 2px solid darkgray;
    width: auto;
    max-height: 90.5vh;
    min-height: 90.5vh;
    max-width: 250px;
    min-width: 150px;
}

#toc {
    margin-top: 5px;
    padding-left: 5pt;
}

#openCloseTOC, #goBack, #goForward {
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    background: #e5e5e5;
    margin-left: 5px;
}

#openCloseTOC:hover, #goBack:hover, #goForward:hover {
    background-color: #cbcbcb;
}

#openCloseTOC.open-toc {
    -webkit-box-shadow: inset 0 0 5px #7f7f7f;
    -moz-box-shadow: inset 0 0 5px #7f7f7f;
    box-shadow: inset 0 0 5px #7f7f7f;
    outline: none;
}

.item {
    cursor: pointer;
    font-size: 12px;
    padding: 3px;
    list-style: none;
    margin: 5px;
}

.item > span {
    padding-top: 2px;
    padding-right: 2px;
    padding-bottom: 2px;
    border-radius: 2px;
}

.clickable-module:hover {
    background: darkgray;
    cursor: pointer;
}

.item > span:hover {
    background-color: lightgray;
}

.nested {
    transition: visibility 0.5s, opacity 0.5s linear;
    padding-left: 10pt;
}

.expandable:not(.active) > span::before {
    content: "⯈"
}

.expandable.active > span::before{
    content: "▼"
}

.nested {
    display: none;
}

.active {
    display: block;
}

.displayed-section {
    font-weight: bold;
}

/* NOTES */

.note, .example, .check-understanding {
    position: relative;
    margin: 3rem auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
    border: .2rem solid #dcdcdc;
    background-color: #ededed;
    max-width: 90%;
    overflow: auto;
}

.check-understanding > header > h3, .example > header > h3, .note > header > h3 {
    border-bottom: 1px solid darkgray;
    margin: auto;
    padding: 10px;
}

.equation-callout {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    box-sizing: border-box;
    overflow: auto;
    /*margin: 3rem 0;*/
    border: .2rem solid #dcdcdc;
    background-color: #ededed;
    margin: auto;
}

.equation {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    box-sizing: border-box;
    overflow: auto;
    display: table;
    width: 100%;
    margin: auto;
}

.equation-number {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    box-sizing: border-box;
    overflow: initial;
    display: table-cell;
    width: 5%;
    vertical-align: middle;
}

.equation-number > span {
    padding: 5px;
    border: 1px solid black;
    text-align: center;
    vertical-align: middle;
    overflow: initial;
    box-sizing: border-box;
}

/* MATHJAX WRAPPERS */

.math-wrapper {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    box-sizing: border-box;
    margin: 1em 0;
    position: relative;
    display: block!important;
    text-indent: 0;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    width: 100%;
    overflow: initial;
    text-align: center;
}

.math-wrapper-inline {
    font-family: "Neue Helvetica W01",Helvetica,Arial,sans-serif;
    -webkit-print-color-adjust: exact;
    --content-text-scale: 1;
    color: #424242;
    box-sizing: border-box;
    overflow: initial;
}

.MathJax {
    display: inline;
    font-style: normal;
    font-weight: normal;
    line-height: normal;
    font-size: 100%;
    font-size-adjust: none;
    text-indent: 0;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    float: none;
    direction: ltr;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    border: 0;
    padding: 0;
    margin: 0;
}


/* TABLES */

thead {
    color: white;
    background-color: #027EB5;
}
table {
    margin: auto;
}

.table-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
}

.table-wrapper > .table-caption {
    text-align: center;
    padding-top: 5px;
}

#main-wrapper {
    display: flex;
    justify-content: space-between;
    align-content: center;
    padding: 5px;
}



/* NAV BAR */

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-content: center;
    background: #0f627d;
    border: 1px solid darkgray;
    border-radius: 10px;
    padding: 5px;
    word-wrap: break-word;
    height: 25px;
}

.nav-link {
    color: whitesmoke;
    font-weight: bold;
    padding: 5px;
}

.misc {
    display: flex;
    padding: 5px 2px 2px;
    margin: 5px;
}

.toggle-toc {
    margin-left : 10px;
    cursor: pointer;
}

/* SCROLL BAR */

::-webkit-scrollbar {
    width: 10px;
    border-radius: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* FIGURES AND IMAGES */

figure {
    text-align: left;
    display: table;
    margin: auto;
}

figcaption {
    max-width: 100%;
    font-size: smaller;
}

figure {
    text-align: center;
}

.media-wrapper {
    width: 100%;
}

.media-wrapper > img {
    max-width: 100%;
}

/* MISCELLANEOUS */

.solution {
    display: none;
}

/* SNACK BAR POPUP */

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: #333; /* Black background color */
    border-radius: 10px;
    color: #fff; /* White text color */
    text-align: center; /* Centered text */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.6s;
    animation: fadein 0.5s, fadeout 0.5s 2.6s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}


/* FOOTER */

.footer {
    text-align: center;
    margin: auto;
    padding: 5px;
}

#goForward.disabled, #goBack.disabled {
    background: #7b7a7a;
    cursor: default;
}

/* Loading Overlay */

#content-loading {
    /*background: black;*/
    /*opacity: 0.4;*/
    display: none;
    z-index: 10;
}

#content-loading.active {
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}

.lds-spinner {
    /*color: official;*/
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-spinner div {
    transform-origin: 40px 40px;
    animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 3px;
    left: 37px;
    width: 6px;
    height: 18px;
    border-radius: 20%;
    background: #fff;
}
.lds-spinner div:nth-child(1) {
    transform: rotate(0deg);
    animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
    transform: rotate(30deg);
    animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
    transform: rotate(60deg);
    animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
    transform: rotate(90deg);
    animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
    transform: rotate(120deg);
    animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
    transform: rotate(150deg);
    animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
    transform: rotate(180deg);
    animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
    transform: rotate(210deg);
    animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
    transform: rotate(240deg);
    animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
    transform: rotate(270deg);
    animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
    transform: rotate(300deg);
    animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
    transform: rotate(330deg);
    animation-delay: 0s;
}
@keyframes lds-spinner {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


