.navbar-brand img {
    max-height: 50px;
    width: auto;
    height: 3rem;
}

.navbar-light {
    background: #fff !important;
    box-shadow: 0 .125rem .25rem 0 rgba(0,0,0,.11);
}

.navbar-nav li a {
    padding: 0 15px;
    /* line-height: 50px; */
}

.navbar-nav > .active > .nav-link {
  font-weight: 600;
  color: #130654 !important;
}

.navbar-header a {
    padding: 0 15px;
    /* line-height: 50px; */
}

.bd-search {
    position: relative;
    padding: 1rem 15px;
    margin-right: -15px;
    margin-left: -15px;
    border-bottom: 1px solid rgba(0,0,0,.05);
}


/* minimal copy paste from bootstrap docs css to get sidebars working */

.bd-toc {
    -ms-flex-order: 2;
    order: 2;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    /* font-size: 0.875rem; */
    /* add scrolling sidebar */
    height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  @supports ((position: -webkit-sticky) or (position: sticky)) {
    .bd-toc {
      position: -webkit-sticky;
      position: sticky;
      top: 4rem;
      height: calc(100vh - 4rem);
      overflow-y: auto;
    }
  }

  .section-nav {
    padding-left: 0;
    border-left: 1px solid #eee;
    border-bottom: none;
  }

  .section-nav ul {
    padding-left: 1rem;
  }

  .toc-entry {
    display: block;
  }

  .toc-entry a {
    display: block;
    padding: .125rem 1.5rem;
    color: #77757a;
  }

  .toc-entry a:hover {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
  }


  .bd-sidebar {
    -ms-flex-order: 0;
    order: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  @media (min-width: 768px) {
    .bd-sidebar {
      border-right: 1px solid rgba(0, 0, 0, 0.1);
    }
    @supports ((position: -webkit-sticky) or (position: sticky)) {
      .bd-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 5rem;
        z-index: 1000;
        height: calc(100vh - 4rem);
      }
    }
  }

  @media (min-width: 1200px) {
    .bd-sidebar {
      -ms-flex: 0 1 320px;
      flex: 0 1 320px;
    }
  }

  .bd-links {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-right: -15px;
    margin-left: -15px;
  }

  @media (min-width: 768px) {
    @supports ((position: -webkit-sticky) or (position: sticky)) {
      .bd-links {
        max-height: calc(100vh - 9rem);
        overflow-y: auto;
      }
    }
  }

  @media (min-width: 768px) {
    .bd-links {
      display: block !important;
    }
  }

  .bd-sidenav {
    display: none;
  }

  .bd-toc-link {
    display: block;
    padding: .25rem 1.5rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.65);
  }

  .bd-toc-link:hover {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
  }

  .bd-toc-item.active {
    margin-bottom: 1rem;
  }

  .bd-toc-item.active:not(:first-child) {
    margin-top: 1rem;
  }

  .bd-toc-item.active > .bd-toc-link {
    color: rgba(0, 0, 0, 0.85);
  }

  .bd-toc-item.active > .bd-toc-link:hover {
    background-color: transparent;
  }

  .bd-toc-item.active > .bd-sidenav {
    display: block;
  }

  .bd-sidebar .nav > li > a {
    display: block;
    padding: .25rem 1.5rem;
    font-size: 90%;
    color: rgba(0, 0, 0, 0.65);
  }

  .bd-sidebar .nav > li > a:hover {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    background-color: transparent;
  }

  .bd-sidebar .nav > .active > a,
  .bd-sidebar .nav > .active:hover > a {
    font-weight: 600;
    color: #130654;
    /* adjusted from original
    color: rgba(0, 0, 0, 0.85);
    background-color: transparent; */
  }

  .bd-sidebar .nav > li > ul {
    list-style: none;
    padding: .25rem 1.5rem;
  }

  .bd-sidebar .nav > li > ul > li > a {
    display: block;
    padding: .25rem 1.5rem;
    font-size: 90%;
    color: rgba(0, 0, 0, 0.65);
  }

  .bd-sidebar .nav > li > ul > .active > a,
  .bd-sidebar .nav > li > ul > .active:hover > a {
    font-weight: 600;
    color: #130654;
  }

/* offsetting html anchor titles to adjust for fixed header, https://github.com/pandas-dev/pandas-sphinx-theme/issues/6*/
  h2::before, h3::before,
  h4::before, h5::before,
  h6::before  {
    display: block;
    content: "";
    height: 80px;
    margin: -80px 0 0;
}

/* add padding to body to avid overlap with navbar   */
body {
  padding-top: 80px
}


/* adjust toc font sizes to improve overview */
.toc-h2 {
    font-size: 0.85rem;
  }

.toc-h3 {
    font-size: 0.75rem;
}

.toc-h4 {
    font-size: 0.65rem;
}

.toc-entry > .nav-link.active {
    font-weight: 600;
    color: #130654;
    background-color: transparent;
    border-left: 2px solid #563d7c;
}

.nav-link:hover {
    border-style: none;
}

#navbar-main-elements li.nav-item i {
  font-size: 0.7rem;
  padding-left: 2px;
  vertical-align: middle;
}

/* Collapsing of the TOC sidebar while scrolling */

/* Nav: hide second level (shown on .active) */
.bd-toc .nav .nav {
  display: none;
}

.bd-toc .nav > .active > ul {
  display: block;
}


/* Previous / Next buttons */
div.prev-next-bottom {
  margin: 20px 0px;
}

div.prev-next-bottom a.left-prev, div.prev-next-bottom a.right-next {
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, .2);
  max-width: 45%;
  overflow-x: hidden;
  color: rgba(0, 0, 0, 0.65);
}

div.prev-next-bottom a.left-prev {
  float: left;
}

div.prev-next-bottom a.left-prev:before {
  content: "<< "
}

div.prev-next-bottom a.right-next {
  float: right;
}

div.prev-next-bottom a.right-next:after {
  content: " >>"
}

/* Alert Styling */
.alert {
  /* Avoid too large empty space below alert boxes. */
  padding-bottom: 0;
}

.alert-info a {
  /* higher contrast for links in info boxes. */
  color: #e83e8c;
}

/* Header Styling */

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

/* Social media buttons */

i.fab {
  vertical-align: middle;
  font-style: normal;
  font-size: 1.5rem;
  line-height:1.25;
}

i.fa-github-square:before {
  color:#333;
}

i.fa-twitter-square:before {
  color: #55acee
}

/* TOC section headers */
.tocsection {
  padding-left: 10px;
  border-left: 1px solid #eee;
  padding: .3rem 1.5rem;
}

div.tocsection i {
  padding-right: .5rem;
}

div.editthispage {
  padding-bottom: .6rem;
}
