/*
 * Handout Style
 */

@import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css);
@import url(course-style.css);

body {
  position: relative; /* required for scrollspy */
}

.markdown:not(.converted) {
  opacity: 0.5;
  white-space: pre-wrap;
}

/* headers and footers */
header {
  background: #333;
  position: relative;
}
footer {
  background: #333;
  text-align: right;
  margin-top: 2em;
}
header, footer {
  color: #fff;
  padding: 1em 2em;
}
header a, header a:focus, header a:hover,
footer.footer-archived a, footer.footer-archived a:focus, footer.footer-archived a:hover {
  color: #fff;
}
footer.footer-archived a {
  text-decoration: underline;
  text-decoration-color: #fffa;
}
header > div {
  float: right;
}
footer.footer-margin {
  text-align: left;
  color: #999;
  background: #fff;
  padding: 0 1em;
}
@media(min-width:768px) {
  footer.footer-margin {
    padding: 0 1em 1em 2em;
    position: absolute;
    bottom: 4em;
  }
}
@media print {
  footer.footer-margin {
    position: static;
    width: 100%;
  }
}
footer.footer-margin > div {
  font-weight: normal;
  font-size: 85%;
  line-height: 1.33;
}
footer.footer-archived {
  text-align: left;
  position: fixed;
  bottom: 0;
  min-width: 33%;
  max-width: 67%;
}
footer.footer-archived::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1.5em;
  height: 100%;
  width: 3em;
  background-color: inherit;
  transform: skew(22.5deg);
}

/* table of contents */
header.chip {
  display: none;
  background: #fff;
}
header.chip a, header.chip a:focus, header.chip a:hover {
  color: #999;
}
@media screen and (min-width:768px) {
  header.chip {
    display: block;
    position: fixed;
    top: 0;
  }
}
@media(min-width:768px) {
  nav.table-of-contents {
    position: fixed;
    padding: 0;
  }
}
@media print {
  nav.table-of-contents {
    position: absolute;
  }
}
.nav > li > a {
  padding: .5em .5em .5em 2em;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav > li > a:hover {
  background-color: #eee;
  color: #333;
}
.nav > li.active > a {
  color: #fff;
  background-color: #333;
}

/* jump links */
.margin {
  position: fixed;
  height: 100%;
}
a.jump {
  opacity: 0;
  position: absolute;
  left: -7px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: normal;
  padding: 0 7px 7px 7px;
  transition: opacity .5s 0s;
}
h1 a.jump {
  padding-top: 4px;
}
h2 a.jump {
  padding-top: 2px;
}
.alert a.jump.alert-link {
  font-weight: normal;
}
.panel-body a.jump {
  padding-left: 2px;
}
a.jump::after {
  content: '#';
}
.margin:hover ~ * a.jump,
.table-of-contents:hover ~ * a.jump,
a.jump:hover {
  opacity: 1;
  transition: opacity .5s 0s;
}
[id]:target {
  background: #fcf8e3;
}
[id]:target + div[data-outline] {
  animation: highlightout 2s;
}
@keyframes highlightout {
  from { background: #fcf8e3; }
}
mark:target {
  animation: highlightzoom 1s;
}
@keyframes highlightzoom {
  from { box-shadow: 0 0 0 50vh #fcf8e380; }
}

@media print {
  a[href]:after {
    content: none;
  }
}

/* definition lists always act like dl-horizontal */
dl {
  margin-bottom: 0;
}
dl dt {
  float: left;
  width: 160px;
  overflow: hidden;
  clear: left;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
dl dd {
  margin-left: 180px;
}
dl dd:before, dl dd:after {
  display: table;
  content: " ";
}
dl dd:after {
  clear: both;
}

/* alternate styles for ordered lists */
.list-style-lower-alpha > ol {
  list-style-type: lower-alpha;
}
.list-style-upper-alpha > ol {
  list-style-type: upper-alpha;
}
.list-style-sub-lower-alpha > ol > li > ol {
  list-style-type: lower-alpha;
}
.list-style-sub-upper-alpha > ol > li > ol {
  list-style-type: upper-alpha;
}

/* blockquotes are not large */
blockquote {
  margin-bottom: 10px;
  font-size: inherit;
  font-weight: inherit;
}

/* code is not in a different color */
code {
  color: inherit;
  background-color: #f5f5f5;
}

/* tt behaves like code but allows line wrapping */
tt {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  padding: 2px 4px;
  font-size: 90%;
  background-color: #f5f5f5;
  border-radius: 4px;
}

/* ttfont applies code style to children */
.ttfont > * {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 90%;
}
.ttfont > span {
  padding: 2px 4px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

/* danger alerts are a little too dangerous-looking */
.alert-danger {
  background: #f7ebeb;
}

/* make links in handout-solo panels stand out in blue, because when
   they're brown they look identical to boldface */
.handout-solo a.alert-link {
  color: #5a80a0;
}
.handout-solo a.alert-link:hover {
  color: #23527c;
}

mark {
  padding: 0;
  background-color: #fcf8e380;
  box-shadow: 0 0 0 .2em #fcf8e380;
}

.highlighted {
  background: #fcf8e3;
  box-shadow: 0 0 0 4px #fcf8e3;
}

.handout-aside.panel {
  max-width: 40%;
}
.handout-aside.panel.pull-margin {
  max-width: 55%;
}
.handout-aside.panel .panel-heading {
  padding: 6px 8px;
}
.handout-aside.panel .panel-body {
  padding: 8px;
}

/* floating panels */
.panel.pull-right {
  margin: 0 0 10px 10px;
}
.panel.pull-left {
  margin: 0 10px 10px 0;
}

/* inline figures */
.inline-figure img {
  max-width: 100%;
}

/* floating figure panels */
.panel.panel-figure.pull-right {
  clear: both;
}
.panel.panel-figure.pull-left {
  clear: both;
}
@media(max-width:767px) {
  .panel.panel-figure.pull-left img, .panel.panel-figure.pull-right img {
    max-width: 100%;
  }
}
@media(min-width:768px) {
  .pull-margin,
  .panel.pull-margin,
  .panel.panel-figure.pull-right.pull-margin {
    margin-right: -25%;
  }
}

/* borderless figure tables */
.table.table-figure td { border: none; }

/* tables for two-column text */
table.side-by-side td {
  vertical-align: top;
}
table.side-by-side pre {
  padding: 4px;
}
table.side-by-side td:first-child {
  border-right: 1px solid #333;
  padding-right: 1em;
}
table.side-by-side td:last-child {
  padding-left: 1em;
}

/* hovers */
.hover-figure-select {
  cursor: default;
}

/* exercises */
iframe.exercises-status {
  width: 100%;
  height: 140px;
  border: none;
}
@media(min-width:768px) {
  iframe.exercises-status {
    position: absolute;
    right: -25%;
    width: 25%;
    height: 260px;
  }
}
.exercises {
  margin: 20px 15px;
}
.exercises .panel-heading {
  cursor: pointer;
}
.exercise-panel .panel-body {
  position: relative;
}
.exercise-part, .exercise-explain {
  position: relative;
  margin-left: 24px;
  border-left: 8px solid #f5f5f5;
  padding-left: 8px;
}
.exercise-part:before, .exercise-explain:before {
  font-family: 'Glyphicons Halflings';
  font-size: 16px;
  position: absolute;
  top: 0px;
  left: -32px;
  width: 24px;
  text-align: center;
}
.exercise-part.exercise-incomplete {
  border-left-color: #d9edf7;
}
.exercise-part.exercise-incomplete:before {
  content: '\e127';
  color: #31708f;
}
.exercise-part.exercise-answered {
  border-left-color: #f2dede;
}
.exercise-part.exercise-answered:before {
  content: '\e014';
  color: #a94442;
}
.exercise-part.exercise-answered.exercise-correct {
  border-left-color: #dff0d8;
}
.exercise-part.exercise-answered.exercise-correct:before {
  content: '\e013';
  color: #3c763d;
}
.exercise-explain {
  display: none;
  color: #31708f;
  border-left-color: #d9edf7;
}
.exercise-explain a[href] {
  text-decoration: underline;
}
.exercise-explain:before {
  content: '\e080';
  color: #31708f;
}
.exercise-answer {
  display: inline-block;
  margin-left: 0.5em;
  color: #31708f;
}
.exercise-progress {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  height: 6px;
}
.exercise-progress .progress-bar {
  width: 100%;
}
.exercise-error .alert.alert-info {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 6px 24px 6px 12px;
  margin: 15px;
  max-width: 75%;
}
.exercise-error .alert.alert-info .close {
  right: -11px;
}
.exercises .btn {
  text-transform: uppercase;
}
.exercises .btn[disabled] {
  opacity: 0.33;
}

/* special case common pairs of radio buttons */
.radio.exercise-choice:nth-child(1):nth-last-child(2)[data-outline=True],
.radio.exercise-choice:nth-child(2):nth-last-child(1)[data-outline=False],
.radio.exercise-choice:nth-child(1):nth-last-child(2)[data-outline=Yes],
.radio.exercise-choice:nth-child(2):nth-last-child(1)[data-outline=No] {
  display: inline-block;
  margin: 0 20px 0 0;
}

/* tweak form controls */
select.form-control {
  display: inline-block;
  min-width: 25%;
  width: auto;
}
input[type=text].form-control {
  display: inline-block;
  width: 50%;
}

/* videos */
.video-status {
  width: 100%;
}
@media(min-width:768px) {
  .video-status {
    position: absolute;
    right: -25%;
    width: 25%;
  }
}
.video-player {
  display: none;
  position: fixed;
  bottom: 15px;
  right: 15px;
  padding: 0;
}
.video-player .video-close {
  position: absolute;
  top: -1em;
  right: 0;
  color: #999;
  opacity: 1;
}
.video-player .video-portal {
  margin: 0;
  background: black;
}

/* FAQs */
.faq.well {
  padding: 10px;
  background: none;
  color: #444;
}
.faq > :first-child { margin-top: 0; }
.faq > :last-child > :last-child,
.faq > :last-child > :last-child > :last-child,
.faq > :last-child > :last-child > :last-child > :last-child { margin-bottom: 0; }
.faq h3 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  margin-bottom: 0;
  padding-bottom: 10px;
}
.faq h3 a.jump {
  opacity: 1;
  font-weight: bold;
}
.faq h3 + div > p { padding-left: 20px; }

/* Bootstrap/Markdown spacing */
.markdown h2 > small > p:only-child,
.markdown h3 > small > p:only-child,
.markdown h4 > small > p:only-child { display: inline-block; }
.markdown dl { margin-bottom: 10px; }
.markdown table th p { margin: 0; }
.markdown table th:empty { padding-top: 0; padding-bottom: 0; }
.markdown pre > p { margin: 0; }
.markdown .alert { margin-bottom: 10px; }
.markdown .alert > p:not(:last-child),
.markdown .alert > ul:not(:last-child) { margin-bottom: 10px; }
.markdown .alert > dl:last-child,
.markdown .alert > pre:last-child { margin-bottom: 0; }
.markdown .alert > hr { margin: 10px 0; }
.markdown .panel .panel-heading > p,
.markdown .panel .panel-footer > p { margin: 0; }
.markdown .panel .panel-body > h2:first-child,
.markdown .panel .panel-body > h3:first-child,
.markdown .panel .panel-body > h4:first-child { margin-top: 0; }
.markdown .panel .panel-body > p:last-child,
.markdown .panel .panel-body > ol:last-child,
.markdown .panel .panel-body > dl:last-child,
.markdown .panel .panel-body > table:last-child,
.markdown .panel .panel-body > .form-group:last-child { margin-bottom: 0; }
.markdown .table td > ul:last-child,
.markdown .table td > .form-group:last-child { margin-bottom: 0; }
.markdown .well > p:last-child { margin-bottom: 0; }
.markdown label + .form-group > .checkbox:first-child { margin-top: 0; }

/* terminal style using the Panic palette */
.terminal-dark {
  background: rgb(17, 28, 42);
  color: rgb(246, 247, 238);
}
.terminal-dark .bold { font-weight: bold; }
.terminal-dark .black { color: rgb(17, 28, 42); }
.terminal-dark .red { color: rgb(248, 41, 57); }
.terminal-dark .green { color: rgb(59, 235, 42); }
.terminal-dark .yellow { color: rgb(252, 193, 70); }
.terminal-dark .blue { color: rgb(45, 69, 98); }
.terminal-dark .purple { color: rgb(111, 78, 188); }
.terminal-dark .cyan { color: rgb(99, 204, 227); }
.terminal-dark .white { color: rgb(131, 140, 149); }

/* staff notes: postmortems */
.postmortem-incomplete:before {
  content: 'incomplete';
  margin-top: 1.5em;
}
.postmortem-no-time:before {
  content: 'no time';
  margin-top: 0.5em;
}
.postmortem-todo:before {
  content: 'todo';
  margin-top: 0.1em;
}
.postmortem-incomplete:before,
.postmortem-no-time:before,
.postmortem-todo:before {
  color: rgb(238, 95, 91);
  text-transform: uppercase;
  font-size: 150%;
  position: absolute;
  top: 50%;
  left: 0;
  -webkit-transform: rotate(-90deg);
  -webkit-transform-origin: 0 100%;
}
.postmortem-note,
.postmortem-incomplete,
.postmortem-no-time,
.postmortem-todo {
  position: relative;
  background-color: rgba(238, 95, 91, 0.25);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.5) 25%,
                                           transparent 25%,
                                           transparent 50%,
                                           rgba(255, 255, 255, 0.5) 50%,
                                           rgba(255, 255, 255, 0.5) 75%,
                                           transparent 75%,
                                           transparent);
  background-repeat: repeat;
  background-size: 40px 40px;
  padding: 0 10px;
  margin: 0 -10px;
  border-radius: 10px;
}

/* make it possible to click on SVG diagrams in radiobutton/checkbox labels,
   by making the click events fall through the object elt to the label elt */
label object {
  pointer-events: none;
}


.sidenote {
    font-style: italic;
    font-size: 75%;
    position: absolute;
    right: -25%;
    width: 25%;
}


/* links to example code */
.code-container {
  position: relative;
  padding-top: 6px;
}
.code-container .handout-solo {
  position: absolute;
  top: -10px;
  right: 4px;
  padding: 4px;
}



/* staff notes: embedded slides */
.slide {
  width: 384px;
  height: 216px;
  display: block;
  border: 1px solid lightgray;
}
.slides-right {
  float:right
}

a mark {
  color: #337ab7;
}