@import './var';

@keyframes ap-slide-up-enter {
  from {
    transform: translate3d(0, 100%, 0);
  }
}

@keyframes ap-slide-up-leave {
  to {
    transform: translate3d(0, 100%, 0);
  }
}

@keyframes ap-slide-down-enter {
  from {
    transform: translate3d(0, -100%, 0);
  }
}

@keyframes ap-slide-down-leave {
  to {
    transform: translate3d(0, -100%, 0);
  }
}

@keyframes ap-slide-left-enter {
  from {
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes ap-slide-left-leave {
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes ap-slide-right-enter {
  from {
    transform: translate3d(100%, 0, 0);
  }
}

@keyframes ap-slide-right-leave {
  to {
    transform: translate3d(100%, 0, 0);
  }
}

@keyframes ap-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ap-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes ap-swing-top-in {
  0% {
    transform: rotateX(-100deg);
    transform-origin: top;
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg);
    transform-origin: top;
    opacity: 1;
  }
}

@keyframes ap-swing-top-out {
  0% {
    transform: rotateX(0deg);
    transform-origin: top;
    opacity: 1;
  }
  100% {
    transform: rotateX(-100deg);
    transform-origin: top;
    opacity: 0;
  }
}

@keyframes ap-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.ap-fade {
  &-enter-active {
    animation: ap-fade-in @animation-duration-base both
      @animation-timing-function-enter;
  }

  &-leave-active {
    animation: ap-fade-out @animation-duration-base both
      @animation-timing-function-leave;
  }
}

.ap-slide-up {
  &-enter-active {
    animation: ap-slide-up-enter @animation-duration-base both
      @animation-timing-function-enter;
  }

  &-leave-active {
    animation: ap-slide-up-leave @animation-duration-base both
      @animation-timing-function-leave;
  }
}

.ap-slide-down {
  &-enter-active {
    animation: ap-slide-down-enter @animation-duration-base both
      @animation-timing-function-enter;
  }

  &-leave-active {
    animation: ap-slide-down-leave @animation-duration-base both
      @animation-timing-function-leave;
  }
}

.ap-slide-left {
  &-enter-active {
    animation: ap-slide-left-enter @animation-duration-base both
      @animation-timing-function-enter;
  }

  &-leave-active {
    animation: ap-slide-left-leave @animation-duration-base both
      @animation-timing-function-leave;
  }
}

.ap-slide-right {
  &-enter-active {
    animation: ap-slide-right-enter @animation-duration-base both
      @animation-timing-function-enter;
  }

  &-leave-active {
    animation: ap-slide-right-leave @animation-duration-base both
      @animation-timing-function-leave;
  }
}

.ap-swing-top {
  &-enter-active {
    animation: ap-swing-top-in @animation-duration-base both
      cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  &-leave-active {
    animation: ap-swing-top-out @animation-duration-base both
      cubic-bezier(0.6, -0.28, 0.735, 0.045);
  }
}
