#topicSidebar {
  display: flex;
  position: fixed;
  top: 60px; /*Header height*/
  height: 100%;
  align-self: stretch;
  min-width: 0px;
  width: 0px;
  margin-top: 3px;
  padding: 10px 0;
  flex-direction: column;
  background-color: white;
  color: #222;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 1px 0 5px 0 gray;
  transition: 0.5s;
  z-index: 3;
}

#topicSidebar.mobile-show {
  display: flex;
  position: fixed;
  width: 250px;
  width: 250px;
  min-width: 250px;
  padding: 10px 0;
}

#topicSidebar.sticky-sidebar {
  width: 0;  
}

#topicSidebar a {
  margin: 10px 15px;
  font-size: 16px;
  text-decoration: none;
  color: black;
  width: 220px; /*Width minus margins*/
}

#topicSidebar a:hover {
  color: dodgerblue;
}

#topicSidebar h2 {
  margin: 10px 15px;
}

.topic-sidebar .heading {
  border-top: 1px solid gray;
  padding: 10px 0 0 0;
}

.topic-sidebar .heading:first-child {
  border-top: 0;
  margin: 20px 15px 0 15px;
}

/* -- Toggle Button -- */

#sidebarToggleButton {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 0;
  top: 3px;
  margin-top: calc(60px + 3px);  /*header height and margin*/
  width: 30px;
  height: 50px; /*Navbar height*/
  padding: 5px;
  background-color: white;
  box-shadow: 0px 2px 5px 0 gray;
  opacity: 0.8;
  cursor: pointer;
  z-index: 2;
  transition: left 0.5s;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ and Edge */
  user-select: none; /* Standard syntax */
}

#sidebarToggleButton.mobile-show {
  left: 250px;
  transition: 0.5s;
}

#sidebarToggleButton.mobile-show i {
  color: darkviolet;
}

#sidebarToggleButton.mobile-show:hover i {
  color: #555;
}


#sidebarToggleButton i {
  color: gray;
}

#sidebarToggleButton:active {
  background-color: gray;
}

#sidebarToggleButton:hover i {
  color: darkviolet;
}


/* Disable hovering effects for mobile/touch applications */
@media (hover: none) {
  #sidebarToggleButton.mobile-show:hover i{
    color: darkviolet;
  }

  #sidebarToggleButton:hover i {
    color: gray;
  }

  #topicSidebar a:hover {
    color: black;
  }

}


@media only screen and (min-width: 800px) {
  #topicSidebar {
    width: 250px;
    min-width: 250px;
    padding: 10px 0;
    margin-top: calc(50px + 3px); /*Navbar height and margin*/
    transition: 0.5s;
  }

  #topicSidebar.sticky-sidebar {
    position: fixed;
    top: 60px; /*Header height*/
    width: 250px;
    min-width: 250px;
    height: 100%;
    margin-top: 3px;
  }

  #topicSidebarSpacer {
    min-width: 250px;
    width: 250px;
  }

  #sidebarToggleButton {
    display: none;
  }
}

@media only screen and (min-width: 1000px) {
  #topicSidebar {
    width: 250px;
  }

  #topicSidebarSpacer.sticky-sidebar-spacer {
    display: flex;
    min-width: 250px;
    width: 250px;
  }

  #topicSidebar.mobile-show {
    position: fixed;
    top: 60px; /*Header height*/
    width: 250px;
    min-width: 250px;
    height: 100%;
  }
}