/* ALL PAGES */

html {
  --themeBlue: #031A6B;
  --themeBlueHover: #01249B;
  --active: #4CAF50;
  --azureBlue: #0275D8;
  --azureBlueHover: #01447E;
}

body {
  margin:0;
  padding:0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: white;
}

/* Top Navigation Bar */
ul.topnav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  height: 50px;
  background-color: var(--themeBlue);
  top: 0;
  width: 100%;
}
li.topnav {
  float: left;
  font-size: 15px;
  height: 50px;
  line-height: 20px;
}
li.topnav a {
  display: block;
  color: white;
  text-align: center;
  text-decoration: none;
}
li.active, a.active, .subs .active, .hassubs .active, .active {
  background-color: var(--active);
}
.topnav li a, .dropbtn {
  display: block;
  color: white;
  padding: 15px 16px 21px 16px;
  text-decoration: none;
  text-align: left;
}
.dropbtn {
  height: 23px;
}
li.topnav:hover:not(.active), a.topnav:hover:not(.active), .dropdown:hover:not(.active) .dropbtn:not(.active) {
  background-color: var(--themeBlueHover);
}
li.dropdown {
  display: block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--themeBlue);
  min-width: 160px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
.dropdown-content a {
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}
.dropdown:hover .dropdown-content.noTouch {
  display: block;
}
.topnav, .subs, .hassubs {
  z-index: 9999;
}
.smallSearch {
  display: block;
  width: 100px;
}
div.hidden {
  display: none;
}
div.visuallyhidden {
  width: 0;
}
#smallScreenSearchBtn {
  display: none;
}
#largeScreenSearch {
  display: block;
  float: right;
  position: absolute;
  top: -5px;
  right: 0;
  width: 300px;
  height: 45px;
  padding: 0;
  overflow: hidden;
  transition: width 0s;
}
#topnavShowMore2, #topnavShowMore1, #topnavShowMoreDouble0 {
  display: none;
}
#topnavShowLess2, #topnavShowLess1, #topnavShowLess0, #topnavShowLessDouble0 {
  display: block;
}
@media screen and (max-width: 815px) and (min-width: 560px) {
  #largeScreenSearch {
    display: none;
  }
  #smallScreenSearchBtn {
    display: block;
  }
}
@media screen and (max-width: 525px) {
  #largeScreenSearch {
    display: none;
  }
  #smallScreenSearchBtn {
    display: block;
  }
}
@media screen and (min-width: 1340px) {
  #topnavShowMore2 {
    display: none;
  }
  #topnavShowLess2 {
    display: block;
  }
  #topnavShowMore1 {
    display: none;
  }
  #topnavShowLess1 {
    display: block;
  }
  #topnavShowLess0 {
    display: block;
  }
  #topnavShowMoreDouble0 {
    display: none;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
}
@media screen and (max-width: 1340px) and (min-width: 1000px) {
  #topnavShowMore2 {
    display: block;
  }
  #topnavShowLess2 {
    display: none;
  }
  #topnavShowMore1 {
    display: none;
  }
  #topnavShowLess1 {
    display: block;
  }
  #topnavShowLess0 {
    display: block;
  }
  #topnavShowMoreDouble0 {
    display: none;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
}
@media screen and (max-width: 1000px) and (min-width: 815px) {
  #topnavShowMore2 {
    display: none;
  }
  #topnavShowLess2 {
    display: none;
  }
  #topnavShowMore1 {
    display: block;
  }
  #topnavShowLess1 {
    display: none;
  }
  #topnavShowLess0 {
    display: block;
  }
  #topnavShowMoreDouble0 {
    display: none;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
}
@media screen and (max-width: 815px) and (min-width: 560px) {
  #topnavShowMore2 {
    display: none;
  }
  #topnavShowLess2 {
    display: none;
  }
  #topnavShowMore1 {
    display: block;
  }
  #topnavShowLess1 {
    display: none;
  }
  #topnavShowLess0 {
    display: block;
  }
  #topnavShowMoreDouble0 {
    display: none;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
  .smallSearch {
    width: calc(100% - 275px);
  }
}
@media screen and (max-width: 560px) and (min-width: 525px) {
  #topnavShowMore2 {
    display: none;
  }
  #topnavShowLess2 {
    display: none;
  }
  #topnavShowMore1 {
    display: none;
  }
  #topnavShowLess1 {
    display: none;
  }
  #topnavShowLess0 {
    display: none;
  }
  #topnavShowMoreDouble0 {
    display: block;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
}
@media screen and (max-width: 525px) {
  #topnavShowMore2 {
    display: none;
  }
  #topnavShowLess2 {
    display: none;
  }
  #topnavShowMore1 {
    display: none;
  }
  #topnavShowLess1 {
    display: none;
  }
  #topnavShowLess0 {
    display: none;
  }
  #topnavShowMoreDouble0 {
    display: block;
  }
  #topnavShowLessDouble0 {
    display: block;
  }
  .smallSearch {
    width: calc(100% - 50px);
  }
}

/* Side Navigation Bar */
#sidebar {
  height: calc(100% - 8px);
  width: 52px;
  position: fixed;
  top: 8px;
  left: -52px;
  background-color: var(--themeBlue);
  overflow-x: hidden;
  padding-top: 2px;
  z-index: 1;
}
#sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  color: white;
  display: block;
  transition: 0.3s;
}
#sidebarButton {
  background-color: var(--themeBlue);
  font-size: 20px;
  cursor: pointer;
  color: white;
  padding: 10px 15px;
  border: none;
  margin-left: 0;
}
.sideLink i:hover:not(.active), a.sideLink:hover:not(.active) {
  background-color: var(--themeBlueHover);
}
a.link, button.link {
  border-bottom: 1px solid white;
}
a.sideLink {
  margin-left: 0;
  padding-left: 0;
  color: white;
  height: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}
button.sideLink {
  margin-left: 0;
  padding-left: 0;
  color: white;
  height: 32.5px;
  font-family: Arial, Helvetica, sans-serif;
}
.accordion:not(.active) {
  background-color: var(--themeBlue);
}
.accordion {
  color: white;
  cursor: pointer;
  padding: 10px 18px;
  width: 100%;
  border: none;
  text-align: left;
  font-size: 20px;
  transition: 0.4s;
}
.accordion:hover:not(.active) {
  background-color: var(--themeBlueHover);
}
.panel:not(.active) {
  background-color: var(--themeBlue);
}
.panel {
  padding: 0 18px;
  color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  text-align: right;
}
.rotated {
  transform: rotateZ(180deg);
}

/* Main Content */
div.main {
  padding: 20px;
  margin-top: 0;
  background-color: white;
  z-index: 0;
  transition: width 0.5s, margin 0.5s;
  position: absolute;
  top: 58px;
  overflow: auto;
  height: auto;
}

/* Scroll Progress Bar */
#scrollProgressContainer {
  width: 100%;
  height: 8px;
  top: 50px;
  background: #ccc;
  z-index: 2;
}
#scrollProgressBar {
  height: 8px;
  top: 50px;
  background: var(--azureBlue);
  width: 0;
  z-index: 3;
}

/* Printing Styles */
@media print {
  .topnav, #sidebar, #largeScreenSearch, .smallSearch, #topBtn, #scrollProgressContainer {
    display: none!important;
  }
  div.main {
    width: 100%!important;
    margin: 0!important;
    padding:0;
    position: relative;
    top: 0;
  }
}


/* SUBJECT HOMEPAGES */

/* A to Z Links */
#azindex {
  box-sizing: border-box;
  background-color: var(--themeBlue);
  padding: 5px;
  border-radius: 10px;
  overflow: auto;
  width: 100%;
  margin: auto;
}
#azindex a {
  display: block;
  height: 0;
  margin: 5px;
  font-weight: bold;
  text-align:center;
  position: relative;
  float: left;
  -webkit-user-select: none; /* Safari 3.1+ */
  -moz-user-select: none; /* Firefox 2+ */
  -ms-user-select: none; /* IE 10+ */
  user-select: none; /* Standard syntax */
  text-decoration:none;
}
#azindex a div {
  font-size: 16px;
  padding-top: calc(50% - 8px);
}
.disabled {
  background: #999;
  color: #444;
}
#azindex a:not(.disabled), #azindex a:visited:not(.disabled) {
  background-color: white;
  color: var(--themeBlue);
}
#azindex a:hover:not(.disabled) {
  color: var(--themeBlueHover);
  text-decoration: underline;
}
@media screen and (min-width: 1340px) {
  #azindex a {
    width: calc((100% - 260px) / 26);
    padding-bottom: calc((100% - 260px) / 26);
  }
  #azindex {
    max-width: 1500px;
  }
}
@media screen and (min-width: 1000px) and (max-width: 1340px) {
  #azindex a {
    width: calc((100% - 130px) / 13);
    padding-bottom: calc((100% - 130px) / 13);
  }
  #azindex {
    max-width: 750px;
  }
}
@media screen and (min-width: 650px) and (max-width: 1000px) {
  #azindex a {
    width: calc((100% - 90px) / 9);
    padding-bottom: calc((100% - 90px) / 9);
  }
  #azindex {
    max-width: 600px;
  }
}
@media screen and (min-width: 500px) and (max-width: 650px) {
  #azindex a {
    width: calc((100% - 70px) / 7);
    padding-bottom: calc((100% - 70px) / 7);
  }
  #azindex {
    max-width: 500px;
  }
}
@media screen and (max-width: 500px) {
  #azindex a {
    width: calc((100% - 40px) / 4);
    padding-bottom: calc((100% - 40px) / 4);
  }
  #azindex {
    max-width: 300px;
  }
}

/* Contents Accordion */
.contentsAcc {
  background-color: var(--themeBlue);
  color: white;
  padding: 10px;
  width: calc(100% - 20px);
  border: none;
  text-align: left;
  font-size: 15px;
  overflow: hidden;
  line-height: 30px;
  transition: background-color 0.4s ease-out;
}
.contentsAcc:first-of-type {
  clear: both;
  border-radius: 10px 0 0 0;
}
.contentsAcc a {
  color: white;
}
.contentsPanel {
  padding: 0;
  background-color: var(--themeBlue);
  color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}
.contentsPanel:last-of-type {
  border-radius: 0 0 10px 10px;
}
.contentsPanel a {
  color: white;
  text-decoration: none;
}
.contentsPanel a:hover {
  text-decoration: underline;
}
.contentsPanel ul {
  padding-bottom: 15px;
}
.openCloseAllBtn {
  background-color:var(--themeBlue);
  color:white;
  padding:5px;
  border-radius:5px 5px 0 0;
  border:none;
  float:right;
  cursor:pointer;
}
.openCloseAllBtn:hover {
  background-color: var(--themeBlueHover);
}
.toggleContentsAcc {
  color: white;
  background: var(--themeBlue);
  width: 30px;
  height: 30px;
  position: relative;
  float: right;
  font-size: 20px;
  cursor: pointer;
  border: 0;
  padding: 0;
  transition: background-color 0.4s ease-out;
}
.contentsAcc:hover, .contentsAcc:hover .toggleContentsAcc {
  background-color: var(--themeBlueHover);
}
.plus, .minus {
  color: white;
  padding: 5px;
  width: 30px;
  height: 30px;
  line-height: 20px;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  box-sizing: border-box;
  transition: 0.4s all ease-out;
}
.plus {
  opacity: 1;
  transform: rotate(0deg);
}
.rotateAccBtn .plus {
  opacity: 0;
  transform: rotate(90deg);
}
.minus {
  opacity: 0;
  transform: rotate(-90deg);
}
.rotateAccBtn .minus {
  opacity: 1;
  transform: rotate(0deg);
}


/* SUBJECT HOMEPAGES AND CONTENT PAGES */

#largeScreenPretext {
  padding: 20px;
  margin-top: 0;
  background-color: white;
  transition: 0.4s;
  position: absolute;
  top: 58px;
  width: calc(100% - 40px);
  z-index: 0;
  display: none;
}
@media screen and (min-width: 1340px) {
  #largeScreenPretext {
    display: block;
  }
  #smallScreenPretext {
    display: none;
  }
}
/* Breadcrumb Navigation */
ul.breadcrumb {
  padding: 10px 16px;
  list-style: none;
  background-color: #eee;
}
ul.breadcrumb li {
  display: inline;
  font-size: 18px;
}
ul.breadcrumb li + li::before { /* + is the adjacent sibling combinator. This rule adds a "/" before every li that is after another li (i.e. before every li other than the first one) */
  padding: 8px;
  color: black;
  content: "/\00a0";
}
ul.breadcrumb li a {
  color: var(--azureBlue);
  text-decoration: none;
}
ul.breadcrumb li a:hover {
  color: var(--azureBlueHover);
  text-decoration: underline;
}

/* To Top Button */
#topBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 5;
  font-size: 18px;
  border: none;
  background-color: red;
  color: white;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  line-height: 50px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
}
#topBtn:hover {
  background-color: #F55656;
}


/* CONTENT PAGES */

/* Section Headings */
h2 {
  text-decoration: underline double;
  color: var(--themeBlueHover);
  font-family: 'Varela Round', sans-serif;
}

/* Contents Section */
.contents {
  background-color: var(--themeBlue);
  color: white;
  font-size: 1em;
  padding: 0 20px;
  overflow: auto;
  border-radius: 10px;
}
.contents a {
  color: white;
  line-height: 1.5em;
}
.contents li {
  list-style: disc;
  width: fit-content;
  padding: 0 5px;
}
#largeScreenContents {
  width: 250px;
  min-height: calc(100vh - 220px);
  max-height: calc(100vh - 50px);
  position: fixed;
  bottom: 20px;
  right: 30px;
  display: none;
  transition: background-color 0.4s;
  z-index: 2;
}
#smallScreenContents li:hover {
  list-style: "\25BC\200A";
}
#largeScreenContents .currentHash {
  list-style: "\25BA";
}
@media screen and (min-width: 1340px) {
  #largeScreenContents {
    display: block;
  }
  #smallScreenContents {
    display: none;
  }
}
@media screen and (max-height: 609px) {
  #largeScreenContents {
    max-height: calc(100vh - 100px);
  }
}

/* Definition Boxes */
.definition {
  border: 3px solid blue;
  padding: 1em;
  border-radius: 5px 5px 0 5px;
}
a.viewGlossary {
 background-color: blue;
 color: white;
 padding: 5px;
 text-decoration: none;
 border-radius: 0 0 5px 5px;
}
a.viewGlossary:hover {
  text-decoration: underline;
}
div.viewGlossary {
  text-align: right;
  position: relative;
  bottom: 12px;
}

/* Formula Boxes */
.formula {
  border: 3px solid red;
  padding: 10px 20px;
  border-radius: 0 5px 5px 5px;
  text-align: center;
  overflow: auto;
}
.formulaHeader {
  background-color: red;
  color: white;
  padding: 10px 10px 5px 10px;
  border-radius: 5px 5px 0 0;
  display: inline-block;
}

/* Example Boxes */
.example {
  border: 3px solid black;
  padding: 10px 20px;
  border-radius: 0 5px 5px 5px;
  overflow: auto;
}
.exampleHeader {
  background-color: black;
  color: white;
  padding: 10px 10px 5px 10px;
  border-radius: 5px 5px 0 0;
  display: inline-block;
}

/* Back to Subject Home Button */
.backHome {
  background-color: var(--themeBlue);
  color: white;
  padding: 10px;
  border: none;
  float: right;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
}
.backHome:hover {
  font-weight: bold;
}
.backHome::after {
  content: attr(data-text);
  content: attr(data-text) / "";
  display: block;
  height: 0;
  visibility: hidden;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  font-weight: bold;
}

/* iFrame for Topic Quiz */
.iframe-container {
  overflow: hidden;
  padding-top: 62.5%;
  position: relative;
}
#quizFrame {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

/* Prevent the gap between lines increasing when using superscript or subscript */
sup, sub {
  line-height: 0;
}


/* GLOSSARY PAGES */

#glossaryInput {
  background-image: url('/search-icon.svg');
  background-position: 5px 5px;
  background-repeat: no-repeat;
  width: calc(100% - 50px);
  font-size: 16px;
  padding: 12px 20px 12px 40px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
  box-sizing: border-box;
}
#glossaryTable {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #ddd;
  font-size: 16px;
  box-sizing: border-box;
  z-index: 100000;
}
#glossaryTable th, #glossaryTable td {
  text-align: left;
  padding: 12px;
}
#glossaryTable tr {
  border-bottom: 1px solid #ddd;
}
#glossaryTable td, #glossaryTable th {
  border-right: 1px solid #ddd;
}
#glossaryTable tr.header, #glossaryTable tr:hover {
  background-color: #f1f1f1;
}
.sortDropbtn {
  background-color: var(--themeBlue);
  color: white;
  padding: 4px 8px 4px 8px;
  font-size: 36px;
  border: none;
  cursor: pointer;
}
.sortDropbtn:hover, .sortDropbtn:focus {
  background-color: var(--themeBlueHover);
}
.sortDropdown {
  position: relative;
  display: block;
  float: right;
}
.sortDropdown-content {
  display: none;
  position: absolute;
  background-color: var(--themeBlue);
  min-width: 160px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
  z-index: 1000000;
  right: 0;
  text-align: right;
}
.sortDropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.sortDropdown-content a.active {
  background-color: var(--active);
}
.sortDropdown-content a:hover:not(.active) {
  background-color: var(--themeBlueHover);
}
.sortShow {
  display:block;
}
