@import '~styles/items/modal';
@import '~styles/mixins';

$top-success-error: 50px;

.image-gallery {
  overscroll-behavior: contain;

  @include customAppearTransition('image-gallery') {
    .image-preview {
      opacity: 1;
    }
  }

  // .slider-wrapper {
  //   overscroll-behavior: contain;
  //   left: 50%;
  //   position: fixed;
  //   top: 50%;
  //   transform: translate3d(-50%, -50%, 0);
  //   z-index: 1003;
  //   max-width: 85%;
  //   max-height: 85%;
  //   text-align: center;
  //   img {
  //     max-width: 85vw;
  //     max-height: 85vh;
  //   }
  // }

  .image-preview {
    z-index: 12;
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    @include transition(all);
    opacity: 0;
    width: 85vw;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      max-width: 100%;
      object-fit: contain;
      max-height: 100%;
    }
  }

  .image-gallery-btn {
    .prev,
    .next,
    .close {
      position: fixed;
      top: 50%;
      -webkit-transform: translateY(-50%);
      transform: translateY(-50%);
      height: 40px;
      width: 40px;
      cursor: pointer;
      padding: 10px;
      background: #fff;
      border-radius: 50%;
      z-index: 1009;
      opacity: 0.7;
      @include phone {
        width: 30px;
        height: 30px;
        padding: 5px;
      }
    }

    .prev {
      left: 65px;
      @include phone {
        left: 20px;
      }
      img {
        left: -2px;
      }
    }

    .next {
      right: 65px;
      @include phone {
        right: 20px;
      }
      img {
        right: -2px;
      }
    }

    .close {
      top: 40px;
      right: 20px;
      img {
        width: 20px;
      }
    }
  }
}
