/* range inputs */

input[type=range] {
  width: 100%;
  background: transparent;
  outline: 0;
  -webkit-appearance: none;

  &::-webkit-slider-runnable-track {
    width: 100%;
    height: var(--hiq-range-input-track-height);
    border-radius: var(--hiq-range-input-track-border-radius);
    background-color: var(--hiq-range-input-track-background-color);
    transition: background-color var(--hiq-speed) var(--hiq-easing);
    cursor: pointer;
  }

  &::-moz-range-track {
    width: 100%;
    height: var(--hiq-range-input-track-height);
    background-color: var(--hiq-range-input-track-background-color);
    transition: background-color var(--hiq-speed) var(--hiq-easing);
    cursor: pointer;
  }

  &::-ms-track {
    width: 100%;
    height: var(--hiq-range-input-track-height);
    border-width: var(--hiq-range-input-thumb-height);
    border-color: transparent;
    background-color: transparent;
    color: transparent;
    transition: background-color var(--hiq-speed) var(--hiq-easing);
    cursor: pointer;
  }

  &::-ms-fill-lower {
    background-color: var(--hiq-range-input-track-background-color);
  }

  &::-ms-fill-upper {
    background-color: var(--hiq-range-input-track-background-color);
  }

  &::-webkit-slider-thumb {
    width: var(--hiq-range-input-thumb-width);
    height: var(--hiq-range-input-thumb-height);
    margin-top: -.5rem;
    border-color: transparent;
    border-radius: var(--hiq-range-input-thumb-border-radius);
    background-color: var(--hiq-range-input-thumb-background-color);
    -webkit-appearance: none;
    cursor: pointer;
  }

  &:focus::-webkit-slider-thumb {
    outline: var(--hiq-outline-color) solid var(--hiq-outline-width);
  }

  &::-moz-range-thumb {
    width: var(--hiq-range-input-thumb-width);
    height: var(--hiq-range-input-thumb-height);
    border-color: transparent;
    border-radius: var(--hiq-range-input-thumb-border-radius);
    background-color: var(--hiq-range-input-thumb-background-color);
    cursor: pointer;
  }

  &:focus::-moz-range-thumb {
    box-shadow: 0 0 0 var(--hiq-outline-width) var(--hiq-outline-color);
  }

  &::-ms-thumb {
    width: var(--hiq-range-input-thumb-width);
    height: var(--hiq-range-input-thumb-height);
    border-color: transparent;
    border-radius: var(--hiq-range-input-thumb-border-radius);
    background-color: var(--hiq-range-input-thumb-background-color);
    cursor: pointer;
  }

  &:focus::-ms-thumb {
    outline: var(--hiq-outline-color) solid var(--hiq-outline-width);
  }

  &:disabled,
  &[aria-disabled] {
    &::-webkit-slider-runnable-track {
      background-color: var(--hiq-disabled-background-color);
      cursor: not-allowed;
    }

    &::-moz-range-track {
      background-color: var(--hiq-disabled-background-color);
      cursor: not-allowed;
    }

    &::-ms-fill-lower {
      background-color: var(--hiq-disabled-background-color);
      cursor: not-allowed;
    }

    &::-ms-fill-upper {
      background-color: var(--hiq-disabled-background-color);
      cursor: not-allowed;
    }

    &::-webkit-slider-thumb {
      background-color: var(--hiq-range-input-thumb-disabled-background-color);
      cursor: not-allowed;
    }

    &::-moz-range-thumb {
      background-color: var(--hiq-range-input-thumb-disabled-background-color);
      cursor: not-allowed;
    }

    &::-ms-thumb {
      background-color: var(--hiq-range-input-thumb-disabled-background-color);
      cursor: not-allowed;
    }
  }
}
