/* Interactive textbooks under /books (mirrored from books.trinket.io). */

#books-index .book-entry {
  margin-top: 2em;
  margin-bottom: 2em;
}

#books-index .book-img {
  outline: 2px solid #eee;
  outline-offset: -2px;
  max-width: 100%;
  height: auto;
  display: block;
}

#books-index .book-img.think-java:hover {
  outline: 2px solid #542889;
}

#books-index .book-img.pfe:hover {
  outline: 2px solid #f7931d;
}

.booktoc {
  position: relative;
  margin-bottom: 1rem;
  z-index: 5;
}

.booktoc .books-back-button {
  position: absolute;
  left: -140px;
}

@media only screen and (max-width: 64em) {
  .booktoc .books-back-button {
    position: relative;
    left: 0;
  }
}

.booktoc .books-back-button a {
  color: #777;
}

.bookcopyright {
  font-style: italic;
  margin: 1.25rem 0 2rem;
}

.bookchapter h2,
.bookchapter sup {
  padding-top: 2.8125rem;
  margin-top: -2.8125rem;
}

.bookchapter h1 a:not(.anchorjs-link),
.bookchapter h2 a:not(.anchorjs-link) {
  color: #222;
}

.bookchapter pre {
  background-color: #fafafa;
  border-color: #efefef;
}

.bookchapter pre code {
  background-color: inherit;
}

.bookchapter iframe.lazyload:not(.lazyloaded) {
  min-height: 200px;
}

.bookchapter h2.no-anchor {
  padding: 0;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
}

.bookchapter .theorem em {
  font-style: normal;
}

#think-java .title-area .name .draft-label {
  margin-left: 0.25em;
  display: inline;
  font-weight: bold;
  font-family: "Lato", "Merriweather", Times, Georgia, serif;
}

#think-java .bookchapter *[id^='fig']:before {
  display: block;
  content: "";
  padding-top: 18.75rem;
  margin-top: -18.75rem;
}

#think-java blockquote {
  border-left: 0;
  margin-left: 4ex;
  margin-right: 4ex;
  text-align: left;
}

#think-java .author,
#think-java .title {
  text-align: center;
}

#think-java .title {
  margin: 2ex auto;
}

#think-java .li-itemize,
#think-java .li-enumerate {
  margin: 1ex 0;
}

#think-java .dd-description {
  margin: 0 0 1ex 4ex;
}

#think-java .dt-description {
  margin: 0;
}

#think-java .footnotetext {
  margin: 0;
  padding: 0;
}

#think-java div.footnotetext p {
  margin: 0;
  text-indent: 1em;
}

#think-java .thefootnotes {
  text-align: left;
  margin: 0;
}

#think-java .dt-thefootnotes {
  margin: 0;
}

#think-java .dd-thefootnotes {
  margin: 0 0 0 2em;
}

#think-java .footnoterule {
  margin: 1em auto 1em 0;
  width: 50%;
}

#think-java .caption {
  padding-left: 2ex;
  padding-right: 2ex;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1em;
}

#think-java .caption table {
  border: none;
}

#think-java .center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#think-java table {
  border-collapse: collapse;
}

#think-java td {
  padding: 0;
}

#think-java .cellpadding0 tr td {
  padding: 0;
}

#think-java .cellpadding1 tr td {
  padding: 1px;
}

#think-java pre {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

#think-java td p {
  margin: 0;
}

#think-java .hbar {
  border: none;
  height: 2px;
  width: 100%;
  background-color: black;
}

#think-java .display {
  border-collapse: separate;
  border-spacing: 2px;
  width: auto;
  border: none;
}

#think-java .dcell {
  white-space: nowrap;
  padding: 0;
  border: none;
}

#think-java .dcenter {
  margin: 0 auto;
}

#think-java .theorem {
  text-align: left;
  margin: 1ex auto 1ex 0;
}

#think-java .figure img {
  border: 0;
  margin-top: 1em;
  max-width: 100%;
  height: auto;
}

#think-java .lstlisting {
  font-family: monospace;
  white-space: pre;
  margin-right: auto;
  margin-left: 0;
  text-align: left;
  padding: 3pt;
}

#think-java .lstframe {
  margin: 1em;
  width: calc(100% - 1em);
}

#think-java hr {
  margin: inherit;
}

/* Python for Everybody (pandoc) source blocks */
#pfe div.sourceCode {
  overflow-x: auto;
}

#pfe table.sourceCode,
#pfe tr.sourceCode,
#pfe td.lineNumbers,
#pfe td.sourceCode {
  margin: 0;
  padding: 0;
  vertical-align: baseline;
  border: none;
}

#pfe table.sourceCode {
  width: 100%;
  line-height: 100%;
}

#pfe td.lineNumbers {
  text-align: right;
  padding-right: 4px;
  padding-left: 4px;
  color: #aaa;
  border-right: 1px solid #aaa;
}

#pfe td.sourceCode {
  padding-left: 5px;
}

#pfe .bookchapter img {
  max-width: 100%;
  height: auto;
}

#pfe code > span.kw { color: #007020; font-weight: bold; }
#pfe code > span.dt { color: #902000; }
#pfe code > span.dv,
#pfe code > span.bn,
#pfe code > span.fl { color: #40a070; }
#pfe code > span.ch,
#pfe code > span.st { color: #4070a0; }
#pfe code > span.co { color: #60a0b0; font-style: italic; }
#pfe code > span.ot { color: #007020; }
#pfe code > span.fu { color: #06287e; }
#pfe code > span.cf { color: #007020; font-weight: bold; }
#pfe code > span.op { color: #666; }
#pfe code > span.va { color: #19177c; }
#pfe code > span.cn { color: #800; }
