$button-width: 76px;                    // The width of the button area
$button-height: 103px;                  // The height of the button area
$bar-thickness: 3px;                    // The thickness of the button bars
$button-pad: 25px;                      // The left/right padding between button area and bars.
$button-bar-space: 5px;                 // The spacing between button bars
$duration: 0.2s;                        // The transition duration

.c-hamburger {
  position: relative;
  display: block;
  overflow: hidden;
  width: 65px;
  height: 76px;
  margin: 0;
  padding: 0 20px;
  cursor: pointer;
  transition: background $duration;
  text-align: left;
  text-indent: -9999px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  @include breakpoint($desktop-nav-breakpoint) {
    width: 140px;
    height: 103px;
    text-indent: 0;
  }

  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  &:hover {
    span,
    span::before,
    span::after {
      background-color: $colour-black;
    }
  }
  span {
    position: absolute;
    top: 32px;
    right: 15px;
    display: block;
    width: 36px;
    height: 3px;
    background-color: $colour-jasper-grey;

    @include breakpoint($screen-md) {
      top: 39px;
    }

    @include breakpoint($desktop-nav-breakpoint) {
      top: 50px;
      right: 20px;
      &:before {
        top: -9px;
        height: 4px;
      }
      &:after {
        bottom: -9px;
        height: 4px;
      }
    }
    &::before,
    &::after {
      position: absolute;
      display: block;
      width: 100%;
      height: $bar-thickness;
      content: "";
      transition-delay: $duration, 0s;
      transition-duration: $duration, $duration;
      background-color: $colour-jasper-grey;
    }
  }
  &.is-active {
    background-color: #f9f9f9;
    span {
      background: none;
      &:before {
        top: 0;
        transition-delay: 0s, $duration;
        transform: rotate(45deg);
        background-color: $colour-black;
      }
      &:after {
        bottom: 0;
        transition-delay: 0s, $duration;
        transform: rotate(-45deg);
        background-color: $colour-black;
      }
    }
  }
}
.c-hamburger__text {
  top: 37px;
  position: absolute;
  font-family: $body-font;
}
.c-hamburger span::before {
  top: -$bar-thickness - $button-bar-space;
  transition-property: top, transform;
}
.c-hamburger span::after {
  bottom: -$bar-thickness - $button-bar-space;
  transition-property: bottom, transform;
}
