@import './var.less';

.@{modal-prefix-cls} {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;

  &-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
  }

  &-mask-animation {
    opacity: 0;
  }

  &-mask-animation-enter {
    animation: maskFadeIn @animation-enter;
  }

  @keyframes maskFadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  &-mask-animation-leave {
    animation: maskFadeOut @animation-leave;
  }

  @keyframes maskFadeOut {
    from {
      opacity: 1;
    }

    to {
      opacity: 0;
    }
  }

  &-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  &-body {
    position: fixed;
  }
}
