/*
 * 6.005 Handout Style
 */

@import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700);
@import url(highlight-eclipse.css);

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

.container {
  -webkit-font-variant-ligatures: common-ligatures;
  font-variant-ligatures: common-ligatures;
}

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

header {
  background: #933;
}
footer {
  background: #999;
  text-align: right;
  margin-top: 2em;
}
header, footer {
  color: #fff;
  padding: 1em 2em;
}
header, footer, h1, h2, h3, h4, h5, h6, nav {
  font-family: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
}
header a, header a:focus, header a:hover {
  color: #fff;
}
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;
  }
}
footer.footer-margin > div {
  font-weight: normal;
  font-size: 85%;
  line-height: 1.33;
}

/* table of contents */
@media(min-width:768px) {
  nav.navigation {
    position: fixed;
    padding: 0;
  }
}
.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: #933;
}

/* tweak header sizes */
h3, .h3 {
  font-size: 22px;
}
h4, .h4 {
  font-size: 17px;
}

/* handout classes */
.handout-edx > i {
  font-weight: bold;
  color: #999;
}

/* 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;
}

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

/* 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.panel-figure.pull-right.pull-margin {
    margin-right: -25%;
  }
}

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

/* 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 > p:last-child,
.markdown .panel .panel-body > table:last-child { margin-bottom: 0; }
.markdown .table td > ul:last-child { margin-bottom: 0; }

/* 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-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;
}
