/*  Supplementary CSS file to control the page layout, style table of contents,
    tweak some of the Bootstrap stuff and other enhancements
    Dr. Greg M. Bernstein
*/
#navbarMain {
  margin-left: 150px;
}

a.navbar-brand img {
  position: absolute;
  top: 0px;
  left: 0px;
  background-color: white;
  margin-right: 10px;
  padding: 3px;
  border-bottom-color: #d4d4d4;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-right-color: #d4d4d4;
  border-right-style: solid;
  border-right-width: 1px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.067);
}

ul.grotto-assignments {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding-left: 0;
}

.grotto-assignments li {
  width: 9rem;
}
/* Temp fix for images */

img {
  max-width: 100%;
}

pre {
  max-width: 95%;
}

/* Start of responsive grid layout */

.grotto-content {
  grid-area: content;
}
@media (min-width: 576px) {
  .grotto-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "sidebar" "main";
    grid-column-gap: 1em;
  }

  .grotto-sidebar {
    grid-area: sidebar;
    /* position: -webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto; */
  }
  .grotto-main {
    grid-area: main;
    display: grid;
    grid-template-areas: "content";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-column-gap: 0.7em;
  }

  .grotto-toc {
    display: none;
  }
}


@media (min-width: 768px) {
  .grotto-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-template-areas: "sidebar main";
    grid-column-gap: 1em;
  }

  .grotto-sidebar {
    grid-area: sidebar;
    position: -webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto;
  }
  .grotto-main {
    grid-area: main;
    display: grid;
    grid-template-areas: "content";
    grid-template-columns: minmax(100px, 1fr);
    grid-template-rows: auto 1fr;
    grid-column-gap: 0.7em;
  }

  .grotto-toc {
    display: none;
    grid-area: toc;
    position: -webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}


@media (min-width: 992px) {
  .grotto-layout {
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-areas: "sidebar main";
    grid-column-gap: 1em;
  }

  .grotto-sidebar {
    grid-area: sidebar;
    position: -webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto;
  }
  .grotto-main {
    grid-area: main;
    display: grid;
    grid-template-areas: "content toc";
    grid-template-columns: minmax(100px, 4fr) 1fr;
    grid-template-rows: auto 1fr;
    grid-column-gap: 0.7em;
  }

  .grotto-toc {
    display: block;
    grid-area: toc;
    position: -webkit-sticky;
    position: sticky;
    top: 5rem;
    right: 0;
    z-index: 2;
    height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

#RelatedItems nav {
  max-height: 70vh;
  overflow-y: auto;
}

/* This is used to jump to the right vertical position when going to locations
   within a page.  This is needed due to the fixed header bar.
*/
.jumptarget:before {
  content: "";
  display: block;
  height: 50px;
  /* fixed header height*/
  margin: -50px 0 0;
  /* negative fixed header height */
}
article section:before {
  content: "";
  display: block;
  height: 50px;
  /* fixed header height*/
  margin: -50px 0 0;
  /* negative fixed header height */
}
article p,
article li,
article dt,
article dd {
  font-family: georgia, serif;
  font-size: 18px;
  line-height: 30px;
  font-kerning: auto;
  text-rendering: optimizelegibility;
}
article figcaption {
  font-size: 18px;
  text-align: center;
}
#refs > div:before {
  content: "";
  display: block;
  height: 40px;
  /* fixed header height*/
  margin: -40px 0 0;
  /* negative fixed header height */
}
span.citation {
  color: red;
}
span.citation::before {
  content: "[";
  color: black;
}
span.citation::after {
  content: "]";
  color: black;
}
span.citation:hover {
  cursor: pointer;
}
section h2 {
  border-bottom-color: #eeeeee;
  border-bottom-style: solid;
  border-bottom-width: 1px;
}
.navbar .nav > li > a {
  font-weight: bold;
  font-size: 16px;
}
.footer {
  justify-content: center;
  background-color: #f5f5f5;
  border-top-color: #e5e5e5;
  border-top-style: solid;
  border-top-width: 1px;
  margin-top: 70px;
  padding-bottom: 15px;
  padding-left: 0;
  padding-right: 0;
  padding-top: 15px;
  text-align: center;
}
p.patent {
  margin-left: 8em;
}
.patent .PatNum {
  float: left;
  font-weight: bold;
  margin-left: -8em;
  width: 8em;
}
.patent .Title {
  font-style: italic;
}
.code-caption {
  margin-top: 0;
  margin-bottom: 25px;
  padding-top: 0;
}
.graphDrawing {
  border: solid thin #808080;
  border-radius: 5px;
  width: 100%;
  margin: 0;
  margin-bottom: 15px;
}
.graphDrawing img {
  max-width: 100%;
}
figure img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

/* Table of contents styling */
.grotto-toc {
  font-size: 0.875rem;
}

.toc-contents ul {
  list-style: none;
  padding-left: 0;
}

.toc-contents li {
  margin-bottom: 0.25rem;
}

.toc-contents a:not(:hover) {
  color: inherit;
  text-decoration: none;
}

.grotto-toc h5 {
  border-bottom: solid 1px;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}
