.slider {
  box-sizing: content-box;
  max-width: $slider-max-width-px;

  &__label,
  &__tooltip,
  &__tooltip::before {
    background: $color-brand--white;
  }

  &__label {
    @include font-style('body--m');
    border: 1px solid $color--grey;
    border-radius: $border-radius;
    color: $color-brand--two;
    display: inline-block;
    padding: ($baseline * 0.5) 10px;
    position: relative;
    text-align: center;
    z-index: 1;
  }

  &__tooltip {
    border: 1px solid $color--grey;
    border-width: 0 1px 1px 0;
    border-radius: $border-radius--s;
    bottom: -($slider-tooltip-size/2);
    height: $slider-tooltip-size;
    left: 0;
    margin: 0 auto;
    position: absolute;
    right: 0;
    transform: rotate(45deg);
    transform-origin: center;
    width: $slider-tooltip-size;
    z-index: 2;

    &::before {
      content: '';
      display: block;
      height: ($slider-tooltip-size * 2 - 1);
      margin: -($slider-tooltip-size/2) 0 0 2px;
      transform: rotate(45deg);
      width: 5px;
    }
  }

  &__range {
    appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    height: 100%; //IE 11 fix
    min-height: 30px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;

    &:focus {
      outline: none;
    }
  }

  // Webkit
  &__range::-webkit-slider-runnable-track {
    background: $slider-range-track-color;
    height: $slider-range-track-height;
    width: 100%;
  }

  &__range::-webkit-slider-thumb {
    @include range-slider-thumb($slider-range-thumb-color);
    appearance: none;
    box-shadow: webkit-slider-thumb-shadow($slider-range-thumb-color, 1);
    margin-top: (-$slider-range-thumb-size/2);
    position: relative;
    top: 50%;
  }

  // Firefox
  &__range::-moz-range-track {
    background: $slider-range-thumb-color;
    height: $slider-range-track-height;
    width: 100%;
  }

  &__range::-moz-range-progress {
    background: $slider-range-track-color;
  }

  &__range::-moz-range-thumb {
    @include range-slider-thumb($slider-range-thumb-color);
    appearance: none;
    margin: 0;
  }

  // Internet Explorer
  &__range::-ms-track {
    background: transparent; // color needed to hide track marks
    border: 0;
    color: transparent; // color needed to hide track marks
    height: $slider-range-track-height;
    width: 100%;
  }

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

  &__range::-ms-fill-upper {
    background: $slider-range-thumb-color;
  }

  &__range::-ms-thumb {
    @include range-slider-thumb($slider-range-thumb-color);
    box-shadow: none;
    margin: 0;
    top: 0;
  }

  &__range[data-rs-slider-range-line]::-ms-tooltip {
    display: none;
  }

  &__values {
    @include font-style('body--m');
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  &__value > span {
    margin-left: 5px;
  }

  // background mapping
  @include slider-background-mapping;
}
