$track-color: $ami-white !default;
$thumb-color: $ami-white !default;

$thumb-radius: 0.611rem !default;
$thumb-height: 0.611rem !default;
$thumb-width: 0.611rem !default;

$track-width: 100% !default;
$track-height: 1px !default;
$track-border-color: red !default;

$track-radius: 5px !default;
$contrast: 5% !default;

@mixin track {
  cursor: pointer;
  height: $track-height;
  transition: all $transition-duration ease;
  width: $track-width;
}

@mixin thumb {
  background: $thumb-color;
  border-radius: $thumb-radius;
  cursor: pointer;
  height: $thumb-height;
  width: $thumb-width;
}

[type='range'] {
  -webkit-appearance: none;
  margin: $thumb-height / 2 0;
  width: $track-width;

  &:focus {
    outline: 0;

    &::-webkit-slider-runnable-track {
      background: lighten($track-color, $contrast);
    }

    &::-ms-fill-lower {
      background: $track-color;
    }

    &::-ms-fill-upper {
      background: lighten($track-color, $contrast);
    }
  }

  &::-webkit-slider-runnable-track {
    @include track;
    background: $track-color;
    border-radius: $track-radius;
  }

  &::-webkit-slider-thumb {
    @include thumb;
    -webkit-appearance: none;
    margin-top: -$thumb-height / 2;
  }

  &::-moz-range-track {
    @include track;
    background: $track-color;
    border-radius: $track-radius;
  }

  &::-moz-range-thumb {
    @include thumb;
  }

  &::-moz-range-progress {
    background-color: $ami-yellow;
    height: 1px;
  }

  &::-ms-track {
    @include track;
    background: transparent;
    border-color: transparent;
    border-width: ($thumb-height / 2) 0;
    color: transparent;
  }

  &::-ms-fill-lower {
    background: darken($track-color, $contrast);
    border-radius: $track-radius * 2;
    background-color: $ami-yellow;
  }

  &::-ms-fill-upper {
    background: $track-color;
    border-radius: $track-radius * 2;
  }

  &::-ms-thumb {
    @include thumb;
    margin-top: 0;
  }
}

.zoom-slider-runner-lower {
  background-color: $ami-yellow;
  height: 1px;
  width: 0%;
  position: absolute;
  bottom: 0.3055rem;
}
