#sidebar {
  text-align: center;
  padding: 20px 10px;
  background-color: #CFD8DC;
}

#sidebar h2 {
  text-align: left;
  margin-bottom: 0;
}

/* Hide the blurb on a small screen */
#blurb {
  display: none;
}

#sidebar-toggle {
  display: none;
  box-shadow: unset;
}

#sidebar-toggle:active {
  border: 2px solid #2196F3;
}

#sidebar-toggle:hover {
  border: 1px solid #2196F3;
}

#collapse *:first-child {
  margin-top: 10px;
}

/* add the three horizontal bars icon for the toggle */
.navbar-toggler-icon {
  background-image: url("../images/menu-icon-white.png");
}

.navbar-toggler {
  box-shadow: unset;
}

@media (min-width: 480px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 15%;
    text-align: left;
    transition: margin 0.3s ease-in-out, padding 0.3s ease-in-out;
  }

  #sidebar-toggle {
    display: inline-block;
    position: relative;
    top: 0;
    transition: top 0.3s ease-in-out;
  }

  /* add negative margin to sidebar to achieve the collapse */
  #sidebar.collapsed {
    margin-left: calc(-15% + 40px);
    padding-right: 5px;
  }

  /* move the sidebar toggle up to the top left corner */
  #sidebar.collapsed #sidebar-toggle {
    top: -20px;
  }

  /* also adjust margin of page content */
  #sidebar.collapsed ~ #page-content {
    margin-left: 65px;
  }

  /* move all contents of navbar other than header (containing toggle) further
      off-screen */
  #sidebar.collapsed > *:not(:first-child) {
    margin-left: -60px;
    margin-right: 60px;
  }

  /* reveal the blurb on a large screen */
  #blurb {
    display: block;
  }

  /* Hide the toggle on a large screen */
  #navbar-toggle {
    display: none;
  }

  #collapse {
    display: block;
  }

  /* set margins of the main content so that it doesn't overlap the sidebar */
  #page-content {
    margin-left: 15%;
    transition: margin-left 0.3s ease-in-out;
  }
}

.sidebar-title {
  margin: 5px 0 5px 40px;
  color: #263238;
  font-weight: 500;
}
