range-input {
  position: relative;
  display: flex;
  height: 18px;
  width: 130px;
  margin: 2px;
  font: inherit;
  line-height: 16px;
  overflow: visible;
}

/* Disabled inputs are greyed out */
range-input[disabled] {
  filter: grayscale(1);
}

range-input::before {
  content: '';
  display: block;
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  box-shadow: 0 -.5px 0 rgba(0,0,0,0.3), inset 0 .5px 0 rgba(255,255,255,0.2), 0 .5px 0 rgba(255,255,255,0.3);
  background: linear-gradient(#34B9EB, #218ab1) 0/ var(--value-percent, 0%) 100% no-repeat #eee;
}

.input {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
}

.thumb {
  pointer-events: none;
  position: absolute;
  bottom: 3px;
  left: var(--value-percent, 0%);
  margin-left: -6px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><circle cx="5" cy="5" r="1" fill="%235D509E" /></svg>') center no-repeat #34B9EB;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  box-shadow: 0 0.5px 2px rgba(0,0,0,0.3);
}

.thumb-wrapper {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 0;
  overflow: visible;
}

.value-display {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="62" fill="none"><path fill="%2334B9EB" d="M27.3 27.3C25 29.6 17 35.8 17 43v3c0 3 2.5 5 3.2 5.8a6 6 0 1 1-8.5 0C12.6 51 15 49 15 46v-3c0-7.2-8-13.4-10.3-15.7A16 16 0 0 1 16 0a16 16 0 0 1 11.3 27.3z"/><circle cx="16" cy="56" r="1" fill="%235D509E"/></svg>') top center no-repeat;
  position: absolute;
  box-sizing: border-box;
  left: var(--value-percent, 0%);
  bottom: 3px;
  width: 32px;
  height: 62px;
  text-align: center;
  padding: 8px 3px 0;
  margin: 0 0 0 -16px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
  transform-origin: 50% 90%;
  opacity: 0.0001;
  transform: scale(.2);
  color: #fff;
  font: inherit;
  font-size: calc(100% - var(--value-width, 3) / 5 * .2em);
  text-overflow: clip;
  text-shadow: 0 -.5px 0 rgba(0,0,0,0.4);
  transition: all 200ms ease;
  transition-property: opacity, transform;
  will-change: transform;
  pointer-events: none;
  overflow: hidden;
}

.touch-active + .thumb-wrapper .value-display {
  opacity: 1;
  transform: scale(1);
}

.touch-active + .thumb-wrapper .thumb {
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
