@import '../../src/style/tools.css';

.bx-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  background-color: var(--popup-bg-color);
  transform: translate3d(-50%, -50%, 0);
  transition: transform 0.3s ease;

  &.bx-popup--top {
    width: 100%;
    top: 0;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
  }

  &.bx-popup--right {
    top: 50%;
    right: 0;
    bottom: auto;
    left: auto;
    height: 100%;
    transform: translate3d(0, -50%, 0);
  }

  &.bx-popup--bottom {
    width: 100%;
    top: auto;
    bottom: 0;
    right: auto;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
  }

  &.bx-popup--left {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 0;
    height: 100%;
    transform: translate3d(0, -50%, 0);
  }

  &.bx-popup-slide--top-enter,
  &.bx-popup-slide--top-leave-active {
    transform: translate3d(-50%, -100%, 0);
  }

  &.bx-popup-slide--right-enter,
  &.bx-popup-slide--right-leave-active {
    transform: translate3d(100%, -50%, 0);
  }

  &.bx-popup-slide--bottom-enter,
  &.bx-popup-slide--bottom-leave-active {
    transform: translate3d(-50%, 100%, 0);
  }

  &.bx-popup-slide--left-enter,
  &.bx-popup-slide--left-leave-active {
    transform: translate3d(-100%, -50%, 0);
  }
}
