@charset "utf-8";

:host {
  display: inline-block;
  --duration: .2s;
  --size: 12px;
  --reduce: 2px;
  --radius: 6px;
  --height: 2px;

  --stroke-static: var(--color-details-light);
  --stroke-active: var(--color-details);
  --stroke-ripple: var(--color-text-lighten);
  --fill-ripple:   var(--color-details-light);
}

div.root {
  /* box-sizing: border-box; */
  user-select: none;
  font: normal 1em / normal Tahoma, sans-serif;
  transition: 0.3s all ease;
  position: relative;
  padding: 1.8em 0 0;
}

div.root:hover {
  border-bottom-color: var(--stroke-ripple);
}

div.root > input {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  outline: none;
  display: block;
  width: 100%;
  height: var(--height);
  margin: 0;
  padding: 0;
  background: var(--stroke-static);
  border: none;
  outline: none;
  font: normal 1em / normal Tahoma, sans-serif;
  transition: 0.2s all ease;
  border-radius: 0; /* iOS */
}

div.root > input::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--stroke-active);
  cursor: pointer;
  transition: .2s ease all;
}

div.root > input::-moz-range-progress {
  background: red;
}

div.root > input::-moz-range-thumb {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--stroke-active);
  cursor: pointer;
}

div.root > input::-webkit-slider-thumb:hover {
  width: calc(var(--size) - var(--reduce));
  height: calc(var(--size) - var(--reduce));
  margin: calc(var(--reduce) / 2);
  box-shadow: 0 0 0 var(--radius) var(--fill-ripple);
}

div.root > input::-moz-range-thumb:hover {
  width: calc(var(--size) - var(--reduce));
  height: calc(var(--size) - var(--reduce));
  margin: calc(var(--reduce) / 2);
  box-shadow: 0 0 0 var(--radius) var(--fill-ripple);
}

div.root > input::-webkit-slider-thumb:active {
  box-shadow: 0 0 0 calc(var(--radius) * 2) var(--fill-ripple);
}

div.root > input::-moz-range-thumb:active {
  box-shadow: 0 0 0 calc(var(--radius) * 2) var(--fill-ripple);
}

div.root > input + label {
  position: absolute;
  color: gray;
  left: 0.6em;
  top: 1.5em;
}

div.root > input:focus + label, div.root > input:valid + label {
  font-size: .8em;
  color: var(--stroke-active);
  top: .2em;
}

slot {
  display: block;
  position: relative;
}

div.root:after {
  content: '';
  position: absolute;
  display: block;
  height: 2px;
  width: var(--value);
  bottom: 0;
  left: 0;
  border: none;
  background: var(--stroke-active);
}
