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

.wm-popup-layer {
  z-index: 100;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  visibility: hidden;

  &-active {
    visibility: visible;
  }

  .mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 200;
  }

  .body {
    position: absolute;
    z-index: 300;
    background-color: #fff;

    .header {
      display: flex;
      position: relative;
      height: 96px;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;

      .title {
        flex: 1;
        font-size: 32px;
        text-align: center;
      }
    }

    .close {
      display: flex;
      position: absolute;
      right: 32px;
      top: 28px;
      width: 40px;
      height: 40px;
      z-index: 400;

      &-img {
        width: 40px;
        height: 40px;
      }
    }
  }

  &-right {
    .body {
      width: 80%;
      height: 100%;
      bottom: 0;
      right: 0;
      border-radius: 0;
    }
  }

  &-left {
    .body {
      width: 80%;
      height: 100%;
      bottom: 0;
      left: 0;
      border-radius: 0;
    }
  }

  &-bottom {
    .body {
      width: 100%;
      min-height: calc(500px + env(safe-area-inset-bottom));
      bottom: 0;
      left: 0;
      border-radius: 16px 16px 0 0;
    }
  }
}
