input[type="range"] {
  -webkit-appearance: none;
  margin: 10px 0;
  height: 0;
  width: 100%;
  background-color: transparent;
  position: relative;

  @media only screen and (max-width: 410px) {
    position: unset;
  }

  &:focus {
    outline: none;
  }
  &::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    animate: 0.2s;
    background: var(--textColor);
    border-radius: 3px;
  }
  @mixin slider-thumb {
    box-shadow: 1px 1px 1px #30302f, 0px 0px 1px #30302f;
    border: 1px solid #000000;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--textColor);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -5px;
  }
  &::-webkit-slider-thumb {
    @include slider-thumb();
  }
  &::-moz-range-thumb {
    @include slider-thumb();
  }
  &:hover, &:active, &:focus, &:focus-within {
    &::after {
      content: attr(value) "px";
      position: absolute;
      left: 105%;
      top: 50%;
      transform: translateY(-50%);
      color: var(--textColorOpposite);
      border-radius: 3px;
      padding: 10px;
      background: var(--textColor);

      @media only screen and (max-width: 410px) {
        right: 15px;
        top: 15px;
        left: unset;
        transform: unset;
      }
    }
    &::before {
      width: 0;
      height: 0;
      border-right: 15px solid var(--textColor);
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      z-index: 222;
      content: " ";
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      left: 103%;

      @media only screen and (max-width: 410px) {
        display: none;
      }
    }
  }
  &[name="colorDifference"] {
    &:hover, &:active, &:focus {
      &::after {
        content: attr(value);
      }
    }
  }
  &:focus {
    &::-ms-fill-lower,
    &::-ms-fill-upper,
    &::-webkit-slider-runnable-track {
      background: var(--textColor);
    }
  }
  &::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    animate: 0.2s;
    background: var(--textColor);
    border-radius: 1.3px;
  }
  &::-moz-range-thumb,
  &::-ms-thumb {
    box-shadow: 1px 1px 1px #30302f, 0px 0px 1px #30302f;
    border: 1px solid #000000;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--textColor);
    cursor: pointer;
  }
  &::-ms-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    animate: 0.2s;
    background: transparent;
    border-color: transparent;
    border-width: 16px 0;
    color: transparent;
  }
  &::-ms-fill-lower,
  &::-ms-fill-upper {
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
  }
}

input[type="text"] {
  border: 3px solid var(--textColor);
  color: #001f3f;
  padding: 0px 5px;
  font-size: 15px;
  font-weight: bold;
  height: 32px;
  width: 85px;
  display: inline-block;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 3px solid var(--textColor);

  &::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  &::-webkit-color-swatch {
    border: none;
  }
}

/* Tooltip container */
.tooltip {
  position: relative;
  display: inline-block;
}

/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;

  /* Position the tooltip text */
  position: absolute;
  z-index: 1;
  bottom: 130%;
  left: 0;

  /* Fade in tooltip */
  opacity: 0;
  transition: opacity 0.3s;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 22px;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.checkbox {
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  left: -9999px;
  z-index: -9999;
}

.checkbox span {
  width: 20px;
  height: 20px;
  display: block;
  background: var(--textColorOpposite);
  padding: 2px;
  border-radius: 3px;
  border: 3px solid var(--textColor);
  position: relative;
}

.checkbox input:checked + span:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  height: 10px;
  border-radius: 1px;
  width: 10px;
  background: var(--textColor);
}