/*============================================================================
  Base styles
==============================================================================*/
%plus-button {
  background: none;
  border: 0;
  display: inline-block;
  cursor: pointer;
  color: $color-white;
  padding: ($vertical-unit / 2) ($horizontal-unit * 1.5);
  font-weight: $font-weight-light;
  font-size: em(16);

  @include shopify-breakpoint($tablet-down) {
    font-size: em(14);
    padding: ($vertical-unit / 2) ($horizontal-unit);
  }
}

/*================ Button Icon ================*/
.plus-button__icon {
  padding: 0 ($horizontal-unit / 6);
  color: $color-white;
  position: relative;
  z-index: 1;
  display: inline-block;
  transform: translateY(-1px);
  transition: all 0.2s ease-in;
  opacity: 0.5;
  backface-visibility: hidden;

  .plus-image-button & {
    position: absolute;
    top: $vertical-unit / 2;
    right: $horizontal-unit / 2; //offset icon width
  }

  &:before,
  &:after {
    position: absolute;
    width: 100%;
    height: 2px;
    background: $color-white;
    content: '';
    z-index: -1;
    margin-top: -6px;
    transition: all 0.1s ease-in;
    backface-visibility: hidden;
  }

  .plus-button__icon-wrapper--transparent &:before,
  .plus-button__icon-wrapper--transparent &:after {
    background: $color-text;
  }

  &:before {
    transform: rotate(-90deg);
  }

  &:after {
    transform: rotate(180deg);
  }

  .plus-button__icon-wrapper:hover &,
  .plus-button__icon-wrapper:focus & {
    opacity: 1;
    transform: translate(2px, -2px) scale(0.8);
  }

  .plus-button__icon-wrapper:hover &:before,
  .plus-button__icon-wrapper:focus &:before {
    transform: translateY(-2.5px) rotate(-145deg);
  }

  .plus-button__icon-wrapper:hover &:after,
  .plus-button__icon-wrapper:focus &:after {
    transform: translateY(3px) rotate(145deg);
  }
}

.plus-button__icon-wrapper {
  position: relative;
}

/*============================================================================
  Button Styles
==============================================================================*/
.plus-button {
  @extend %plus-button;
  background: $color-interactive;
  position: relative;
  overflow: hidden;

  &:hover,
  &:focus {
    background: $color-highlight;
    color: $color-white;
  }

  &:active {
    background: $color-interactive;
  }
}

/*================ Highlight Button: Used in main CTA ================*/
.plus-button--highlight {
  background-color: $color-highlight;

  &:hover,
  &:focus {
    background-color: $color-interactive;
  }

  &:active {
    background-color: $color-highlight;
  }
}

/*================ Tertiary Button ================*/
.plus-button--tertiary {
  background-color: $color-dark;

  &:hover,
  &:focus {
    background-color: $color-highlight;
  }

  &:active {
    background-color: $color-dark;
  }
}


