@import "variables";
@import "mixins";

.keen-slider {
  $dot-color: rgba(
    $color: $col-prm,
    $alpha: 0.4,
  ) !default;

  $dot-active-color: rgba(
    $color: $col-prm,
    $alpha: 1,
  ) !default;

  $dot-size: 10px !default;
  $dots-padding: 10px !default;

  &:not([data-keen-slider-disabled]) {
    align-content: flex-start;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    align-items: stretch;
    margin: 0;

    > * {
      transition: none;
      width: 100%;
    }

    &[data-keen-slider-reverse] {
      flex-direction: row-reverse;
    }

    &[data-keen-slider-v] {
      flex-wrap: wrap;
    }
  }

  [data-keen-slider-moves] * {
    pointer-events: none;
  }

  &.has-dots,
  .has-arrows {
    position: relative;
  }

  &.has-adaptive-height {
    transition: height $trans ease;
  }

  &.has-dots {
    padding-bottom: calc(#{2 * $dots-padding} + #{$dot-size});
    box-sizing: content-box;
  }

  .dots {
    display: flex;
    padding: $dots-padding 0;
    justify-content: center;
    position: absolute;
    bottom: 0;
    .dot {
      @include circle($dot-size, $dot-color);
      border: none;
      background: $dot-color;
      margin: 0 5px;
      padding: 5px;
      cursor: pointer;
      &:focus {
        outline: none;
      }

      &.active {
        background: $dot-active-color;
      }
    }
  }

  .keen-arrow {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    z-index: 99;
    &.left {
      left: 0;
    }
    &.right {
      right: 0;
    }
  }

  &.has-dots .keen-arrow {
    height: calc(100% - calc(#{2 * $dots-padding} + #{$dot-size}));
  }

  .products {
    display: flex;
    flex-direction: row;
  }

  &.thumbs {
    margin-top: var(--keen-slider-spacing);
    .thumb img {
      width: 100%;
    }
  }
}
