@import '../fonts/ZillaSlab/ZillaSlab.css';
@import '../fonts/SourceCodePro/SourceCodePro.css';
@import '../fonts/Montserrat/Montserrat.css';

:root {
  --sans-font: "Avenir Next", "Avenir", "Montserrat", sans-serif;
  --han-pink: #e50056;
}


body {
  font-family: "Zilla Slab";
  font-size: 14px;
  line-height: 1.4em;
  color: #444;
  background-color: #f8f8f8;
  margin: 0;
  padding: 0;
  display: grid;
  grid-gap: 0px;
  grid-template-columns: fit-content(300px) 1fr fit-content(300px);
  grid-template-areas:
     "logo  header  header"
     "leftBar content rightBar"
     "footer  footer  footer";
}

#page {
  grid-area: content;
  width: calc(100% - 60px);
  background-color: white;
  margin: 4em 30px 20em 30px;
  box-shadow: 3px 3px 29px 0px rgba(0,0,0,0.3);
}

main {
  width: 650px;
  /* margin-top: 4em; */
  /* margin-bottom: 4em; */
  margin-left: auto;
  margin-right: auto;
  
  padding: 3em;
}

#toc-column {
  grid-area: leftBar;
  opacity: 0.2;
  transition: opacity 0.5s;
}
#toc-column:hover {
  opacity: 1;
}
#toc {
  padding: 1.5em;
  font-family: var(--sans-font);
  font-size: 9pt;
}
.toc1 {
  font-weight: normal;
  font-size: 12pt;
  line-height:1.1em;
  /* top: 1em; */
  margin-top: 2em;
  margin-bottom: 1em;
}
.toc2 {
  font-weight: bold;
  line-height:1.1em;
  margin-top: 1em;
  margin-left: 1.5em;
}
.toc3 {
  line-height:1.1em;
  margin-top: 0.7em;
  margin-left: 1.5em;
  position: relative;
}
.toc4 {
  margin-top: 0.4em;
  margin-left: 3em;
  line-height:1.1em;
}
.toc-icon {
  height: 0.8em;
  vertical-align: baseline;
  margin-right: 0.2em;
  position: relative;
  top: 1px;
}

#scrollToTop {
  position: fixed;
  height: 30px;
  padding: 5px 10px;
  background-color: white;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  /* color: var(--han-pink); */
  color: #888;
  border: 1px solid #ddd;
  border-bottom: none;
  bottom: -40px;
  transition: bottom 0.6s;
  left: 20px;
  font-family: var(--sans-font);
  box-sizing: border-box;
  cursor: pointer;
}
#scrollToTop.visible {
  bottom: 0px;
}
#scrollToTop:hover {
  color: #444;
}


#agenda {
  grid-area: rightBar;
  padding: 1.5em;
  font-family: var(--sans-font);
  font-size: 9pt;
  opacity: 0.2;
  transition: opacity 0.3s;
}

body.index {
  grid-template-columns: 1fr max-content fit-content(700px);
}

body.index #agenda {
  opacity: 1;
  margin-right: 100px;
  padding-top: 0;
  padding-bottom: 100px;
}

#agenda:hover {
  opacity: 1;
}

#agenda-pointer, #time-table-heading {
  grid-area: content;
  margin-top: 21px;
  margin-left: 20px;
  text-align: left;
  font-family: var(--sans-font);
  font-size: 18pt;
  color: #aaa;
}
#time-table-heading {
  display: none;
  margin-bottom: 1em;
}
#welcome {
  grid-area: header;
  margin: 100px 0px 100px 20px;
  text-align: left;
  font-family: var(--sans-font);
  font-size: 18pt;
  line-height: 1.5em;
  color: black;
  font-weight: 400;
  margin-right: 40px;
}


#agenda h1, #toc h1 {
  margin-top: 7em;
  font-size: 12pt;
}
#agenda h2 {
  margin-top: 1.5em;
  margin-bottom: 0em;
  font-size: 14px;
}
#agenda h6 {
  margin-top: 1em;
  margin-bottom: 0em;
  font-size: 11px;
  font-weight: 400;
  color: #444;
}
#agenda h3 {
  margin-top: 0.0em;
  margin-bottom: 0.0em;
  font-size: 14px;
  font-weight: 400;
}
#agenda .week {
  margin-top: 1;
  margin-bottom: 0.5em;
}

#agenda .lesson.current h6, 
#agenda .lesson.current h3 {
  font-weight: bold;
}

#agenda .lesson.closed h3 a {
  pointer-events: none;
  color: black;
}

#agenda .lesson ul.lesson-content {
  margin-top: 0;
  margin-bottom: 0;
  display: none;
  padding-inline-start: 1.2em;
}
#agenda .lesson.open .lesson-content {
  display: block;
}

#agenda .lesson-content li::marker {
  color: #888;
}

@media (max-width: 800px) { 
  body {
    grid-template-areas:
      "icon"
      "header"
      "leftBar" 
      "content"
      "rightBar"
      "footer";
  }
  main {
    padding: 1em;
    width: auto;
  }
  #agenda-pointer {
    display: none
  }
  #time-table-heading {
    display: block;
  }
}


a {
  color: var(--han-pink);
  text-decoration: none;
}
#toc a {
  color: #444;
  text-decoration: none;
}
a:hover, #toc a:hover { 
  color: var(--han-pink);
  text-decoration: underline solid var(--han-pink)80 1px;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--sans-font);
  margin-top: 4em;
  margin-bottom: 0.5em;
  color: #000;
  font-variant-numeric: oldstyle-nums;
}

h1 {
  margin-bottom: 2em;
  font-weight: normal;
  font-size: 4em;
  margin-top: 1em;
  line-height: 1.2em;
  font-variant-numeric: lining-nums;
}
h1 > .chapter-num {
  font-size: 14px;
  line-height: 1em;
  font-family: var(--sans-font);
  font-weight: bold;
  color: var(--han-pink);
  letter-spacing: 4px;
  margin-bottom: 10px;
}

h2 { 
  font-size: 2em;
  font-weight: 600;
}

h4 {
  color: #666;
  margin-top: 2em;
}

h6 {
  margin: 1em 0 0 0;
  /* position: relative; */
}

td {
  vertical-align: top;
}

ol[type='a']  {
  padding-left: 1em;
}

ol[type='a'] > li {
  padding-left: 0.5em;
}

span.task-type {
  color: #888;
  font-weight: normal;
}

img.full-width {
  max-width: 100%;
  width: 100%;
  height: auto;
}

.videoWrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
  height: 0;
  margin-top: 2em;
}
.videoWrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}


.attention, 
.theory,
.instruction,
.hint-content {
  background-color: #e8e8e8;
  /* border: 1px solid #dcdcdc; */
  color: black;
  padding: 3em 1em 2em 2em;
  border-radius: 3px;
  margin: 1em 0 1em 0;
  position: relative;
}

.attention > h3:nth-child(1), 
.theory > h3:nth-child(1),
.instruction > h3:nth-child(1),
.hint-content > h3:nth-child(1) {
  margin-top: 1em;
}


.attention::before, 
.theory::before, 
.instruction::before,
.hint-content::before {
  font-family: var(--sans-font);
  display: inline-block;
  color: white;
  padding: 0.5em 2em;
  position: absolute;
  top: 0;
  left: 0;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 5px;
  border-top-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

.attention::before {
  content: "attention";
  background-color: var(--han-pink);
}

.theory::before {
  content: "more to know";
  background-color: #76c58c;
}

.instruction::before {
  content: "instruction";
  background-color: #61c2ee;
}
.hint-content {
  margin-top: 4pt;
}

.hint-content::before {
  content: "hint";
  color: #666;
  background-color: #fde051;
}

span.inline-note, span.inline-bonus {
  font-family: var(--sans-font);
  font-weight: bold;
  text-transform: uppercase;
  color: var(--han-pink);
  letter-spacing: 2px;
  font-size: smaller;
}

span.inline-note {
  color: var(--han-pink);
}
span.inline-bonus {
  color: #61c2ee;
}

.assignment-block,
.hint-block {
  font-family: var(--sans-font);
  font-size: 80%;
  line-height: 1.3em;
  background-color: #e8e8e8;
  /* border: 1px solid #dcdcdc; */
  padding: 0.5em;
  display: table;  /* trick to make its width fit its content */
  border-radius: 3px;
  margin: 4pt 0;
}

.hint-content .hint-content {
  background-color: #00000010;
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}

.hint-block-wrapper,
.hint-content-wrapper {
  transition: max-height 1000ms ease, opacity 1000ms ease;
  overflow-y: hidden;
  box-sizing: border-box;
}

.hint-block > .cancel-button {
  background: none;
  color: #444;
  display: inline;
  padding-left: 0px;
  padding-right: 0px;
}
.hint-block.step0 > .cancel-button {
  display: none;
}

.hint-block > .hint-button {
  color: #444;
  background-color: #fde051;
  border: 1px solid #ecc919;
}


.todo {
  color: white;
  background-color: #0c0;
  font-family: "Comic Sans MS";
  padding: 1em;
  border-radius: 10px;
}
.todo::before {
  color: #080;
  font-family: "Comic Sans MS";
  font-weight: bold;
  display: block;
  content: "TODO:";
  letter-spacing: 5px;
}

main table {
  table-layout: fixed;
  border-collapse: collapse;
}

main tr {
  border-top: 1px dotted #888;
  border-bottom: 1px dotted #888;
}

main td, main th {
  padding: 4px 10px;
}
main th {
  background-color: #00000006;
}

button {
  font-family: var(--sans-font);
  background: var(--han-pink);
  font-weight: 500;
  color: white;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  margin: 0px 3px;
}

button:hover, button:active {
  background: #c7004c;
}

button[disabled] {
  background: #999 !important;
}

button:hover:active {
  position: relative;
  top: 1px;
  left: 1px;
}

.buttonIcon {
  height: 14px;
  position: relative;
  top: 2px;
  margin: 0px 4px;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}

@keyframes pausedRotation {
  0% {
    transform: rotate(0deg);
  }
  95% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(90deg);
  }
}

main::after {
  content: "";
  display: block;
  margin: 8em auto 2em auto;
  height: 16px;
  width: 16px;
  background-color: #ccc;
  animation: pausedRotation 10s infinite linear;
  border-radius: 3px;
}




span.note {
  display: inline-block;
  width: 13px;
  height: 13px;
  position: relative;
  background-color: #0c0;
  animation: rotation 3s infinite linear;
  margin-right: 3px;
  top: 2px;
  border-radius: 3px;
}


.tippy-tooltip {
  background-color: #0c0;
  color: white;
  font-family: "Comic Sans MS";
  font-size: 90%;
}

.tippy-tooltip[data-placement^='top'] .tippy-arrow {
  border-top-color: #0c0;
}
.tippy-tooltip[data-placement^='bottom'] .tippy-arrow {
  border-bottom-color: #0c0;
}
.tippy-tooltip[data-placement^='left'] .tippy-arrow {
  border-left-color:  #0c0;
}
.tippy-tooltip[data-placement^='right'] .tippy-arrow {
  border-right-color: #0c0;
}