@import '../../style/';

.hiui-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

.hiui-modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .8);
  display: table;
  z-index: 1;

  &:hover+.hiui-modal .hiui-modal-close {
    opacity: 1;
  }
}

.hiui-modal {
  position: absolute;
  z-index: 2;

  .hiui-modal-close {
    position: absolute;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
  }

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

    .hiui-modal-close {
      right: 5px;
      top: 5px;
      font-size: 18px;
    }
  }

  &-top {
    top: 0;
    left: 0;
    width: 100%;

    .hiui-modal-close {
      right: 5px;
      top: 100%;
      transform: translateY(5px);
    }
  }

  &-bottom {
    bottom: 0;
    left: 0;
    width: 100%;

    .hiui-modal-close {
      right: 5px;
      bottom: 100%;
      transform: translateY(-5px);
    }
  }

  &-left {
    top: 0;
    left: 0;
    height: 100%;

    .hiui-modal-close {
      left: 100%;
      top: 5px;
      transform: translateX(5px);
    }
  }

  &-right {
    top: 0;
    right: 0;
    height: 100%;

    .hiui-modal-close {
      right: 100%;
      top: 5px;
      transform: translateX(-5px);
    }
  }

  &:not(&-center) .hiui-modal-close {
    color: #666;
  }

  &-hasMask:not(&-center) .hiui-modal-close {
    color: #fff;
  }
}

.hiui-modal-body {
  width: 100%;
  height: 100%;
  background-color: #fff;

  &-use_shadow {
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, .36);
  }
}

.hiui-modal-banScroll {
  overflow: hidden;

  body {
    overflow: hidden;
  }
}


