// Chevron Toggle Buttons (Expand/Collapse)
//================================================== //

@mixin btn-chevron-style {
  background-color: transparent !important;
  border-color: transparent;
  color: $font-color-highcontrast;
  height: 38px;
  margin: 0 3px;
  min-width: 0;
  padding: 0 10px;
  width: 40px;

  > * {
    pointer-events: none;
  }

  + a {
    width: calc(100% - 57px);
  }

  .icon {
    padding-left: 0;
    padding-right: 1px;
    position: relative;

    &:not(.plus-minus) {
      top: -1px;
    }

    &.plus-minus {
      position: static;
      width: auto;

      &::before,
      &::after {
        background-color: $accordion-icon-color;
        left: 13px;
        top: 17px;
        width: 12px;
      }
    }

    &.chevron {
      @include css3(transform, rotateX(0deg));
      @include transition(transform 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94));

      padding-right: 0;

      &.active {
        @include css3(transform, rotateX(180deg));
      }
    }
  }

  &:focus {
    box-shadow: none;

    &:not(.hide-focus) {
      border-color: $accordion-selected-bg-color;
      box-shadow: $focus-box-shadow;
    }

    &:active {
      background-color: $accordion-selected-bg-color;
    }
  }

  &:active {
    .icon {
      color: $button-color-tertiary-active-font;
    }

    .plus-minus {
      &::before,
      &::after {
        background-color: $button-color-tertiary-active-font;
      }
    }
  }
}

.btn-expander {
  @include btn-chevron-style;
}
