@import '../colors';
@import '../mixins';

$thumb-size: 24px;
$track-height: 4px;

.tix-slider.v4 {
  height: $thumb-size;
  position: relative;
  margin: 0 #{$thumb-size/2};

  &::before {
    content: '';
    display: block;
    height: $track-height;
    background-color: $color-N300;
    position: absolute;
    left: 0px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
  }

  .slider-progress {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    height: $track-height;
    background-color: $color-B400;

    @at-root {
      .disabled#{&} {
        background-color: transparent;
      }
    }
  }

  .slider-thumb {
    @include elevation-1;
    height: $thumb-size;
    width: $thumb-size;
    background-color: $color-N0;
    border-radius: 50%;
    position: absolute;
    transform: translateX(-50%);
    cursor: pointer;

    &.active {
      transition: transform 100ms ease-in;
      transform: translateX(-50%) scale(1.3);
      z-index: 1;
    }

    @at-root {
      .disabled#{&} {
        cursor: default;
      }
    }
  }
}
