.rc-cascader {
  font-size: 12px;

  &-menus {
    font-size: 12px;
    overflow: hidden;
    background: $page-bg;
    position: absolute;
    border: $panel-border;
    border-radius: $border-radius;
    box-shadow: $typeahead-shadow;
    white-space: nowrap;

    &-hidden {
      display: none;
    }

    &.slide-up-enter,
    &.slide-up-appear {
      animation-duration: 0.3s;
      animation-fill-mode: both;
      transform-origin: 0 0;
      opacity: 0;
      animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
      animation-play-state: paused;
    }

    &.slide-up-enter.slide-up-enter-active.rc-cascader-menus-placement,
    &.slide-up-appear.slide-up-appear-active.rc-cascader-menus-placement {
      &-bottomLeft {
        animation-name: SlideUpIn;
        animation-play-state: running;
      }

      &-topLeft {
        animation-name: SlideDownIn;
        animation-play-state: running;
      }
    }

    &.slide-up-leave {
      animation-duration: 0.3s;
      animation-fill-mode: both;
      transform-origin: 0 0;
      opacity: 1;
      animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
      animation-play-state: paused;

      &.slide-up-leave-active.rc-cascader-menus-placement {
        &-bottomLeft {
          animation-name: SlideUpOut;
          animation-play-state: running;
        }

        &-topLeft {
          animation-name: SlideDownOut;
          animation-play-state: running;
        }
      }
    }
  }

  &-menu {
    display: inline-block;
    /* width: 100px; */
    max-width: 50vw;
    height: 192px;
    list-style: none;
    margin: 0;
    padding: 0;
    border-right: $panel-border;
    overflow: auto;

    &:last-child {
      border-right: 0;
    }

    &-item {
      height: 32px;
      line-height: 32px;
      padding: 0 2.5em 0 16px;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: all 0.3s ease;
      position: relative;

      &:hover {
        background: $typeahead-selected-bg;
      }

      &-disabled {
        cursor: not-allowed;
        color: $text-color-weak;

        &:hover {
          background: transparent;
        }

        &:after {
          position: absolute;
          right: 12px;
          content: 'loading';
          color: $text-color-weak;
          font-style: italic;
        }
      }

      &-active {
        color: $typeahead-selected-color;
        background: $typeahead-selected-bg;

        &:hover {
          color: $typeahead-selected-color;
          background: $typeahead-selected-bg;
        }
      }

      &-expand {
        position: relative;

        &:after {
          content: '>';
          font-size: 12px;
          color: $text-color-weak;
          position: absolute;
          right: 16px;
          line-height: 32px;
        }
      }
    }
  }
}

@keyframes SlideUpIn {
  0% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0.8);
  }

  100% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }
}

@keyframes SlideUpOut {
  0% {
    opacity: 1;
    transform-origin: 0% 0%;
    transform: scaleY(1);
  }

  100% {
    opacity: 0;
    transform-origin: 0% 0%;
    transform: scaleY(0.8);
  }
}

@keyframes SlideDownIn {
  0% {
    opacity: 0;
    transform-origin: 0% 100%;
    transform: scaleY(0.8);
  }

  100% {
    opacity: 1;
    transform-origin: 0% 100%;
    transform: scaleY(1);
  }
}

@keyframes SlideDownOut {
  0% {
    opacity: 1;
    transform-origin: 0% 100%;
    transform: scaleY(1);
  }

  100% {
    opacity: 0;
    transform-origin: 0% 100%;
    transform: scaleY(0.8);
  }
}
