.ne-image {
  position: relative;
  display: inline-block;
  &:hover {
    .ne-image-mask {
      opacity: 1;
    }
  }
  &-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
  }
}

.ne-image-preview {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  &-auto {
    pointer-events: auto;
  }
  &-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /*入场动画开始*/
    &.fade-enter {
      opacity: 0;
      transform: scale(0.8);
    }

    /*入场动画过程*/
    &.fade-enter-active {
      opacity: 1;
      transform: scale(1);
      transition: all 0.3s ease-in;
    }

    /*入场动画结束*/
    &.fade-enter-done {
      opacity: 1;
      transform: scale(1);
    }

    /*离场动画开始*/
    &.fade-exit {
      opacity: 1;
      transform: scale(1);
    }

    /*离场动画过程*/
    &.fade-exit-active {
      opacity: 0;
      transform: scale(0.8);
      transition: all 0.3s ease-in;
    }

    /*离场动画结束*/
    &.fade-exit-done {
      opacity: 0;
      transform: scale(0.8);
    }

    /*页面第一次加载时的开始状态*/
    &.fade-appear {
      opacity: 0;
      transform: scale(0.8);
    }

    /*页面第一次加载时的动画过程*/
    &.fade-appear-active {
      opacity: 1;
      transform: scale(1);
      transition: all 0.3s ease-in;
    }
  }
  &-img {
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    user-select: none;
    pointer-events: auto;
    cursor: grab;
  }
  &-operations {
    &-close {
      position: absolute;
      top: 106px;
      right: 57px;
      width: 24px;
      height: 24px;
      cursor: pointer;
      z-index: 1020;
      opacity: 0;
      transition: opacity 0.3s ease-in;
    }
    &-btns {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: 134px;
      padding: 17px 33px;
      height: 50px;
      border-radius: 10px;
      box-sizing: border-box;
      background-color: rgba(0, 0, 0, 0.6);
      z-index: 1020;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #ffffffd9;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease-in;
      & li {
        margin-left: 12px;
        padding: 12px;
        cursor: pointer;
        pointer-events: auto;
      }
      &-operation-disabled {
        color: #ffffff40;
        pointer-events: none;
      }
    }
  }
  &-switch {
    &-left,
    &-right {
      position: absolute;
      top: 50%;
      right: 10px;
      z-index: 1020;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      margin-top: -22px;
      color: #ffffffd9;
      background: rgba(0, 0, 0, 0.1);
      border-radius: 50%;
      cursor: pointer;
      pointer-events: auto;
      opacity: 0;
      transition: opacity 0.3s ease-in;
    }
    &-left {
      left: 10px;
    }
    &-right {
      right: 10px;
    }
  }
  &-switch-left-disabled,
  &-switch-right-disabled,
  &-operations-btn-disabled {
    color: #ffffff40;
    cursor: not-allowed;
  }
  &:hover {
    & .ne-image-preview-switch-left,
    & .ne-image-preview-switch-right,
    & .ne-image-preview-operations-close,
    & .ne-image-preview-operations-btns {
      opacity: 1;
    }
  }
}
