@import '../../style/themes';
@import '../../style/mixins';

.x-slider {
  @include reset-component();
  
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 0;
  // margin: 10px 0;
  
  &::before {
    content: ' ';
    position: absolute;
    left: 0;
    top: calc(50% - 1px);
    width: 100%;
    height: 2px;
    background: further($gray, 4);
  }

  &:hover {
    &::before {
      background: further($gray, 6.5);
    }
  }
  &:active {
    &::before {
      background: further($gray, 4);
    }
  }

  &-marks {
    // margin: 16px 0 28px;
    margin-bottom: 28px;
  }

  &-disabled {
    opacity: .6;
    pointer-events: none;
    filter: grayscale(100%);
    &::before {
      background: further($gray, 2);
    }
  }
  
  &_bar {
    position: absolute;
    height: 2px;
    margin-top: -1px;
    background: $primary-color;
    pointer-events: none;
  }

  &_marks {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
  }
  &_mark {
    position: absolute;
    display: inline-block;
    cursor: pointer;
    transform: translateX(-50%);
    word-break: keep-all;
    &::after {
      content: ' ';
      position: absolute;
      left: 50%;
      top: -6px;
      width: 1px;
      height: 4px;
      background: $gray;
    }
  }

  &_steps {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 100%;
    height: 0;
  }
  &_dot {
    position: absolute;
    height: 4px;
    width: 4px;
    transform: translate(-50%, -50%);
    background: further($gray, 4);
  }
  
  &_handle {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 24px;
    border-radius: 8px;
    background: $primary-color;
    transform: translate(-50%, -50%);
    outline: 0;
    &:hover {
      background: further($primary-color, 7);
      z-index: 1;
    }
    &-focused {
      @if $theme != dark {
        background: further($gray, 2) !important;
      } @else {
        background: further($gray, 4) !important;
      }
      z-index: 1;
    }
  }

  &-tooltip {
    min-width: unset;
    padding: 2px 8px;
    font-size: $font-size-base + 1;
    border: 1px $border-color-base solid;
    box-shadow: unset;
  }

}