.ui-slider {
  display: block;
  min-width: 6rem;
  position: relative;

  &__bubble {
    border-radius: $base-border-radius;
    display: inline-block;
    font-size: 0.75em;
    left: calc(100% * var(--slider-pos));
    line-height: 1;
    padding: 0.3em 0;
    position: relative;
    text-align: center;
    transform: translateX(calc((-24px * var(--slider-pos)) + 2px));
    width: 24px;
    z-index: 1;
  }

  &__min,
  &__max {
    border: 1px solid transparent;
    font-size: 0.75em;
    padding: 0.3em 0;
    position: absolute;
    text-align: center;
    width: 24px;
  }
  &__min {
    left: 0;
  }
  &__max {
    right: 0;
  }

  &__bar {
    border-radius: 4px;
    height: 4px;
    margin: 3px 0;
    position: relative;

    &::after {
      border-radius: 4px 0 0 4px;
      bottom: 0;
      content: "";
      display: block;
      position: absolute;
      top: 0;
      width: calc(100% * var(--slider-pos));
      z-index: 0;
    }

    & > input {
      -webkit-appearance: none;
      background: none;
      bottom: 0;
      left: 0;
      outline: none;
      position: absolute;
      right: 0;
      top: 0;
      width: 100%;
      z-index: 2;

      &::-webkit-slider-thumb {
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDM1My41NjIgMzUzLjU2MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzUzLjU2MiAzNTMuNTYyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgY2xhc3M9IiI+PGc+PGc+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZD0iTTQxLjA2NCwzNTMuNTYyaDEwOS4wMTRWMEg0MS4wNjRWMzUzLjU2MnoiIGRhdGEtb3JpZ2luYWw9IiMwMDAwMDAiIGNsYXNzPSJhY3RpdmUtcGF0aCIgc3R5bGU9ImZpbGw6Izg0OUZBNSIgZGF0YS1vbGRfY29sb3I9IiM3NDhGOTYiPjwvcGF0aD4KCQk8L2c+CgkJPGc+CgkJCTxwYXRoIGQ9Ik0yMDMuNDgyLDB2MzUzLjU2MmgxMDkuMDE3VjBIMjAzLjQ4MnoiIGRhdGEtb3JpZ2luYWw9IiMwMDAwMDAiIGNsYXNzPSJhY3RpdmUtcGF0aCIgc3R5bGU9ImZpbGw6Izg0OUZBNSIgZGF0YS1vbGRfY29sb3I9IiM3NDhGOTYiPjwvcGF0aD4KCQk8L2c+Cgk8L2c+CjwvZz48L2c+IDwvc3ZnPg==");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 12px 6px;
        border-radius: 2px;
        height: 12px;
        width: 24px;
      }
    }
  }
}
