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

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

  &-index {
    position: fixed;
    z-index: 2002;
    top: scale-px(50px);
    text-align: center;
    left: 0;
    right: 0;
    background: transparent;
    color: $white;

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

  &-close {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    background: transparent;
    color: $white;

    .nut-icon {
      color: $white;
    }

    &.top-right {
      top: scale-px(50px);
      right: scale-px(20px);
    }

    &.top-left {
      top: scale-px(50px);
      left: scale-px(20px);
    }

    &.bottom {
      bottom: scale-px(50px);
      left: 0;
      right: 0;
      text-align: center;
    }
  }

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

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

      .nut-image,
      .nut-video {
        display: flex;
        justify-content: center;
        align-items: center;
      }

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

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

[dir='rtl'] .nut-imagepreview,
.nut-rtl .nut-imagepreview {
  &-index {
    .arrow {
      left: auto;
      right: scale-px(15px);
      transform: rotateZ(-180deg);
    }
  }
  &-close {
    &.top-right {
      right: auto;
      left: scale-px(20px);
    }

    &.top-left {
      left: auto;
      right: scale-px(20px);
    }
  }
}
