// Swiper 3.4.0
// Most modern mobile touch slider and framework with hardware accelerated transitions
//
// http://www.idangero.us/swiper/
//
// Copyright 2016, Vladimir Kharlampidi
// The iDangero.us
// http://www.idangero.us/
//
// Licensed under MIT
//
// Released on: October 16, 2016

.swiper-container {
  position: relative;
  // Fixes Webkit flickering
  z-index: 3;
  overflow: hidden;
  margin-right: auto;
  margin-left: auto;

  .swiper-notification {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1000;
    opacity: 0;
    pointer-events: none;
  }
}

.swiper-container-no-flexbox {
  .swiper-slide {
    float: left;
  }
}

.swiper-container-vertical > .swiper-wrapper {
  flex-direction: column;
}

.swiper-wrapper {
  position: relative;
  z-index: 3;
  display: flex;
  box-sizing: content-box;
  width: 100%;
  height: 100%;
  transition-property: transform;
}

.swiper-container-android .swiper-slide,
.swiper-wrapper {
  transform: translate3d(0, 0, 0);
}

.swiper-container-multirow > .swiper-wrapper {
  flex-wrap: wrap;
}

.swiper-container-free-mode > .swiper-wrapper {
  margin: 0 auto;
  transition-timing-function: ease-out;
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;

  background-position: center;
  background-size: cover;

  flex-shrink: 0;
}

// Auto Height
.swiper-container-autoheight {
  &,
  .swiper-slide {
    height: auto;
  }

  .swiper-wrapper {
    transition-property: transform, height;

    align-items: flex-start;
  }
}

// IE10 Windows Phone 8 Fixes
.swiper-wp8-horizontal {
  touch-action: pan-y;
}

.swiper-wp8-vertical {
  touch-action: pan-x;
}

// Arrows
.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  top: 50%;
  z-index: 10;
  margin: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(color(gray, minus2), 0.6);
  cursor: pointer;
  transform: translateY(-50%);

  .icon {
    width: 100%;
    height: 100%;
    fill: color(gray, plus3);
  }

  &.swiper-button-disabled {
    opacity: 0.35;
    cursor: auto;
    pointer-events: none;
  }
}

.swiper-button-prev {
  left: 0;
}

.swiper-button-next {
  right: 0;
}

// Pagination Styles
.swiper-pagination {
  position: absolute;
  z-index: 10;
  text-align: center;
  transition: 300ms;
  transform: translate3d(0, 0, 0);

  &.swiper-pagination-hidden {
    opacity: 0;
  }
}

// Common Styles
.swiper-pagination-fraction,
.swiper-pagination-custom {
  bottom: 10px;
  left: 0;
  width: 100%;
}

// Bullets
.swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: color(black);
  opacity: 0.2;
}

button.swiper-pagination-bullet {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;

  appearance: none;
}

.swiper-pagination-clickable {
  .swiper-pagination-bullet {
    cursor: pointer;
  }
}

.swiper-pagination-white {
  .swiper-pagination-bullet {
    background: color(white);
  }

  .swiper-pagination-bullet-active {
    background: color(white);
  }
}

.swiper-pagination-bullet-active {
  background: color(primary);
  opacity: 1;
}

.swiper-pagination-black {
  .swiper-pagination-bullet-active {
    background: color(black);
  }
}

.swiper-container-vertical > .swiper-pagination-bullets {
  top: 50%;
  right: 10px;
  transform: translate3d(0, -50%, 0);
}

.swiper-container-vertical > .swiper-pagination-bullets {
  .swiper-pagination-bullet {
    display: block;
    margin: 5px 0;
  }
}

.swiper-container-horizontal > .swiper-pagination-bullets {
  .swiper-pagination-bullet {
    margin: 0 5px;
  }
}

// Progress
.swiper-pagination-progress {
  position: absolute;
  background: rgba(color(black), 0.25);

  .swiper-pagination-progressbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color(primary);
    transform: scale(0);
    transform-origin: left top;
  }

  &.swiper-pagination-white {
    background: rgba(color(white), 0.5);
  }

  &.swiper-pagination-white {
    .swiper-pagination-progressbar {
      background: color(white);
    }
  }

  &.swiper-pagination-black {
    .swiper-pagination-progressbar {
      background: color(black);
    }
  }
}

.swiper-container-rtl {
  .swiper-pagination-progress {
    .swiper-pagination-progressbar {
      transform-origin: right top;
    }
  }
}

.swiper-container-horizontal > .swiper-pagination-progress {
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.swiper-container-vertical > .swiper-pagination-progress {
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

// Fade
.swiper-container-fade {
  &.swiper-container-free-mode {
    .swiper-slide {
      transition-timing-function: ease-out;
    }
  }

  .swiper-slide {
    transition-property: opacity;
    pointer-events: none;
  }
}

.swiper-container-fade .swiper-slide-active,
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
  pointer-events: auto;
}

.swiper-zoom-container {
  display: flex;
  width: 100%;
  height: 100%;
  text-align: center;

  justify-content: center;
  align-items: center;
}

.swiper-zoom-container > img,
.swiper-zoom-container > svg,
.swiper-zoom-container > canvas {
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
}

// Scrollbar
.swiper-scrollbar {
  position: relative;
  border-radius: 10px;
  background: rgba(color(black), 0.1);

  -ms-touch-action: none;
}

.swiper-container-horizontal > .swiper-scrollbar {
  position: absolute;
  bottom: 3px;
  left: 1%;
  z-index: 50;
  width: 98%;
  height: 5px;
}

.swiper-container-vertical > .swiper-scrollbar {
  position: absolute;
  top: 1%;
  right: 3px;
  z-index: 50;
  width: 5px;
  height: 98%;
}

.swiper-scrollbar-drag {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: rgba(color(black), 0.5);
}

.swiper-scrollbar-cursor-drag {
  cursor: move;
}

.swiper-container {
  width: 100%;
  height: 80%;
}

.swiper-slide {
  .swiper-lazy {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
  }
}

.gallery .swiper-container .swiper-pagination {
  bottom: 0;
  width: 100%;
  height: 2rem;
  background: linear-gradient(to top, rgba(color(black), 0.4), rgba(color(gray, minus2), 0));

  .swiper-pagination-bullet {
    background: rgba(color(white), 0.9);
    opacity: 0.8;
    transition: opacity 300ms ease background 300ms ease;

    &.swiper-pagination-bullet-active {
      background: color(primary);
      opacity: 1;
      transition: opacity 300ms ease background 300ms ease;
    }
  }
}

.gallery-thumbs {
  box-sizing: border-box;
  padding: 10px 0;
  height: 20%;

  .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.4;
    transition: opacity 200ms ease-in-out;
  }

  .swiper-slide-selected {
    opacity: 1;
    transition: opacity 200ms ease-in-out;
  }
}
