//
// Copyright IBM Corp. 2020, 2020
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@import '../../globals/scss/carbon-settings';
@import '../../globals/scss/variables';

@import '~carbon-components/scss/components/button/button';

@keyframes rotate-180-anti {
  0% {
    /* stylelint-disable-next-line carbon/motion-easing-use */
    animation-timing-function: cubic-bezier(0, 0, 0.38, 0.9);
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-180deg);
  }

  50% {
    /* stylelint-disable-next-line carbon/motion-easing-use */
    animation-timing-function: cubic-bezier(0, 0, 0.38, 0.9);
    transform: rotate(-180deg);
  }

  75% {
    transform: rotate(-360deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

.#{$ide-prefix}-btn--rotate-180-anti .#{$prefix}--btn__icon {
  // stylelint-disable-next-line carbon/motion-duration-use -- Carbon motion does not have anything this long
  animation-duration: 2000ms;
  animation-iteration-count: infinite;
  animation-name: rotate-180-anti;
}
