// SIDEBAR
// -----------------------------------------------
// -----------------------------------------------

.sidebar-toggle {
  background: none;
  border: none;
  color: $brand-tertiary;
  display: inline-block;
  padding: 24px 32px;
  position: relative;
  text-align: center;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;

  .menu-icon {
    position: absolute;
    top: 37%;
    left: 38%;
  }

  &:hover {
    color: $brand-primary;
    cursor: pointer;
    transform: scaleX(1.5);
  }
}

#sidebar-wrapper {
  background-image:
    linear-gradient(
      to bottom,
      $brand-primary,
      $brand-secondary
    );
  left: 0;
  height: 100%;
  overflow-y: auto;
  position: fixed;
  transition: left 0.4s ease-in-out;
  width: 250px;
  z-index: 11;

  .sidebar-toggle {
    display: none;
  }

  div[id$='version-dropdown'] {
    .button {
      width: 100%;
      padding: ($base-point-grid * 2) 0;
      border-radius: 0;
    }
  }
}

#wrapper {
  padding-left: 250px;
  transition: padding 0.4s ease-in-out;

  &.toggled {
    padding-left: 0;

    #sidebar-wrapper {
      left: -250px;
    }
  }
}

@include bp(medium) {
  #wrapper {
    padding-left: 0;
    transition: all 0.4s ease-in-out;
  }

  #sidebar-wrapper {
    left: -100%;
  }

  #wrapper.toggled {
    #sidebar-wrapper {
      left: 0;
      width: 100%;

      .sidebar-toggle {
        display: block;
        opacity: 0.7;
        transition: opacity 0.3s ease, transform 0.3s ease;

        &:hover {
          opacity: 1;
          transform: rotate(-180deg);
        }
      }
    }
  }
}

#doc-wrapper {
  width: 100%;
}
