@use "sass:math";

.spicr {
  position: relative;
  overflow: hidden;
  .item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
  }
  .active.item,
  .next.item {
    display: block;
  }
}
.spicr-inner {
  position: relative;
  width: 100%;
}
// spicr-layer
.spicr-layer {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
// arrows
.spicr-control {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 15%;
  font-size: 20px;
  color: #fff;
  text-align: center;
  opacity: .5;
  &.right {
    right: 0;
    left: auto;
  }
  &:focus { color: #fff; }
  &:hover {
    color: #fff;
    text-decoration: none;
    outline: 0;
    opacity: .9;
  }
  .arrow-prev, .arrow-next {
    position: absolute;
    top: 50%;
    display: inline-block;
    // margin-top: #{-$arrow-width/2};
    margin-top: math.div(-$arrow-width, 2);
  }
  .arrow-prev {
    left: 50%;
  }
  .arrow-next {
    right: 50%;
  }
}
// spicr carousel pages navigation
.spicr-pages {
  position: absolute;
  padding: 0;
  margin: 0;
  li { display: inline-block; line-height: 1; }
  &.top-left { top: 0; left: 0; }
  &.bottom-left { bottom: 0; left: 0; }
  &.top-right { top: 0; right: 0; }
  &.bottom-right { right: 0; bottom: 0; }
}
.spicr-control,
.spicr-pages > * {
  cursor: pointer;
}
.spicr-icon {
  width: $arrow-width;
  height: $arrow-width;
  fill: currentColor;
}
// zIndex is important
// .active.item .spicr-layer { z-index: auto }
.spicr-pages, .spicr-control,
.spicr .next.item { z-index: 1; }

// .spicr-layer { opacity: 0 }
// .item.active .spicr-layer { opacity: 1 }
