@import './mask.scss';
@import "../../styles/themes/variable.scss";
@import "../../styles/themes/animation.scss";

#{$xh-prefix}-popup {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: constant(safe-area-inset-bottom);
  overflow: auto;
  &.visible {
    visibility: visible;
    .xh-popup-content {
      animation: slide-up 0.3s;
    }
  }
  &.hidden {
    visibility: hidden;
  }
  &::after {
    content: "";
    position: fixed;
    bottom: 0;
    width: 100%;
    height: env(safe-area-inset-bottom);
    height: constant(safe-area-inset-bottom);

    background: #fff;
  }

  &-content {
    position: absolute;
    z-index: 999;

    &-left {
      top: 0;
      left: 0;
      height: 100vh;
    }

    &-right {
      top: 0;
      right: 0;
      height: 100vh;
    }

    &-top {
      left: 0;
      top: 0;
      width: 100vw;
    }

    &-bottom {
      left: 0;
      bottom: 0;
      width: 100vw;
      // animation: slide-up 0.3s;
    }
  }
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
