.weui-popup-overlay, .weui-popup-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.weui-popup-overlay {
  background-color: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .3s;
}

.weui-popup-container {
  display: none;

  &.weui-popup-container-visible {
    display: block;
  }

  .weui_cells {
    margin: 0;
    text-align: left;
  }
}

.weui-popup-modal {
  width: 100%;
  position: absolute;
  z-index: 100;
  bottom: 0;
  border-radius: 0;
  opacity: 0.6;
  
  color: @color-text;
  transition-duration: .3s;
  height: 100%;
  background: #EFEFF4;

  transform: translate3d(0, 100%, 0);
  transition-property: transform, opacity;

  overflow-x: hidden;
  overflow-y: auto;

  .popup-bottom & {
    height: auto;
  }

  .toolbar {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    z-index: 1;
  }

  .modal-content {
    height: 100%;
    padding-top: 2.2rem;
    overflow: auto;
    box-sizing: border-box;
  }
}

.weui-popup-container-visible {
  .weui-popup-overlay {
    opacity: 1;
  }

  .weui-popup-modal {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}
