
.nut-imagepreview {
  position: relative;
  width: 100%;
  height: 100%;

  &-scroll__container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
  }

  &-error__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &-swiper {
    height: 100%;
    width: 100vw;
    background-color: transparent;
  }

  &-index {
    position: fixed;
    z-index: 2002;
    left: 0;
    right: 0;
    height: 56px;
    line-height: 56px;
    font-size: 14px;
    //background: transparent;
    background-image: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.00) 100%);
    padding: 0px 24px;
    color: #fff;
    transform: translateZ(0);

    &__position--top {
      top: 0;
    }
    &__position--bottom {
      bottom: 0;
    }
    &__align--center {
      text-align: center;
    }
    &__align--left {
      text-align: left;
    }
    &__align--right {
      text-align: right;
    }

    .arrow {
      position: absolute;
      left: 15px;
      transform: rotateZ(180deg);
    }
  }

  &-desc {
    position: fixed;
    z-index: 2002;
    max-width: $image-preview-desc-max-width;
    bottom: $image-preview-desc-bottom;
    left: 50%;
    height: $image-preview-desc-height;
    line-height: $image-preview-desc-height;
    font-size: 12px;
    color: #fff;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.25);
    border-radius: 4px;
    padding: $image-preview-desc-padding;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &-desc__has-indicator {
    bottom: 70px;
  }

  &-icon__close {
    position: fixed;
    z-index: 2002;
    top: 24px;
    right: 24px;
    color: #fff;
    display: flex;
    transform: translateZ(0);
  }

  .popup-bg {
    background: rgba(0, 0, 0, 0.9);
  }

  .popup-box {
    height: 100%;
    overflow: visible;
    background-color: transparent;
  }

  &-pop {
    height: 100%;
    background: #000000 !important;
    display: flex;
    align-items: center;
    width: 100%;
  }

  &-swiper {
    swiper {
      width: 100%;
      height: 100%;
    }

    swiper-item {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;

      .nut-image-preview-box {
        width: 100%;
      }

      .nut-video {
        video {
          object-fit: contain;
        }
      }
    }

    .nut-swiper-item {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;

      .nut-image-preview-box {
        width: 100%;
      }

      .nut-video {
        video {
          object-fit: contain;
        }
      }
    }
  }
}
