@import './variables.less';
@import './mixins.less';

.@{routes-prefix-cls} {
  display: grid;
  overflow: hidden;

  .@{routes-prefix-cls}-item {
    grid-area: 1 / 1 / 2 / 2;
    max-width: 100vw;
    max-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;

    &:not(:only-child) {

      &.@{routes-prefix-cls}-forward-enter-active,
      &.@{routes-prefix-cls}-forward-exit-active,
      &.@{routes-prefix-cls}-backward-enter-active,
      &.@{routes-prefix-cls}-backward-exit-active {
        transition: transform 400ms ease;
      }

      &.@{routes-prefix-cls}-no-animation-enter-active,
      &.@{routes-prefix-cls}-no-animation-exit-active {
        transition: transform 200ms ease;
      }
    }
  }

  //no animation

  .@{routes-prefix-cls}-no-animation-enter {
    transform: translateX(0);
    opacity: 0;
  }

  .@{routes-prefix-cls}-no-animation-enter-active {
    opacity: 1;
  }

  .@{routes-prefix-cls}-no-animation-exit {
    transform: translateX(0);
    opacity: 1;
  }

  .@{routes-prefix-cls}-no-animation-exit-active {
    opacity: 0;
  }

  // backward
  .@{routes-prefix-cls}-backward-enter {
    transform: translateX(-100%);
  }

  .@{routes-prefix-cls}-backward-enter-active {
    transform: translateX(0);
  }

  .@{routes-prefix-cls}-backward-exit {
    transform: translateX(0);
  }

  .@{routes-prefix-cls}-backward-exit-active {
    transform: translateX(100%);
  }

  // forward
  .@{routes-prefix-cls}-forward-enter {
    transform: translateX(100%);
  }

  .@{routes-prefix-cls}-forward-enter-active {
    transform: translateX(0);
  }

  .@{routes-prefix-cls}-forward-exit {
    transform: translateX(0);
  }

  .@{routes-prefix-cls}-forward-exit-active {
    transform: translateX(-100%);
  }

}