body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  flex: none;
  z-index: 1;
}

.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  opacity: 0.5;
  z-index: 1;
  width: 50px;
  height: 50px;
  appearance: normal;
  border: none;
  outline: none;
  background: transparent;

  .menu-icon {
    display: block;
    position: relative;
    z-index: 2;
    height: 50px;
    width: 50px;
    border-radius: 100%;
    background: $darkGray;
    transition: all 0.3s ease-out;
    cursor: pointer;
    color: white;
    font-size: 26px;
    line-height: 50px;
    z-index: 2;
  }

  &:hover, &.menu-toggle--active {
    opacity: 1;
  }

  &:before {
    display: block;
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0;
    left: 0;
  }

  &.menu-toggle--active {
    &:after {
      content: '';
      position: fixed;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.4);
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 1;
    }
  }

  .menu-text {
    position: absolute;
    display: inline-block;
    left: -999em;
  }
}

.content-wrapper {
  display: flex;
  flex: 1 0 auto;
  flex-direction: row;
  background: $lightBlue;
}

.content {
  -ms-flex: 1;
  flex: 1;
  position: relative;
  margin: auto;
}

.examples .content, .docs .content {
  margin: 0;
}

.sidebar-wrapper {
  order: -1;
  flex: 0 0 0;
}

.sidebar {
  transform: translateX(-$sidebarWidth);
  transition: .2s;
  z-index: 2;
}

.sidebar--fixed {
  .sidebar {
    position: fixed;
    transform: translateX(-$sidebarWidth);
    top: 0;
    bottom: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.sidebar--visible {
  .sidebar {
    transform: translateX(0);
  }

  .sidebar-wrapper {
    flex: 0 0 0;
  }
}

.index .menu-toggle {
  display: none;
}

@media (min-width: $breakpointLarge) {
  .menu-toggle {
    left: -999em;
    opacity: 0;
  }

  .sidebar--visible .sidebar-wrapper, .sidebar-wrapper {
    flex: 0 0 $sidebarWidth;
  }

  .sidebar--fixed .sidebar, .sidebar {
    transform: translateX(0);
  }

  .sidebar-content {
    position: absolute;
    top: $sidebarHeaderHeight;
    bottom: 0;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
