.input,
.select,
.autocompleteInput {
  vertical-align: middle;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--cInputBg);
  color: var(--cText);
  border: 0px solid var(--cInputBorder);
  padding: 0 var(--s4);
  border-radius: var(--s3);
  margin: 0;
  font-size: 1.6rem;
  line-height: 3.4rem;
  font-weight: 400;

  &:disabled {
    background-color: var(--cInputDisabled);
    cursor: not-allowed;
  }

  option:disabled {
    color: var(--cTextSubtle);
  }
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cArrow) 50%),
    linear-gradient(135deg, var(--cArrow) 50%, transparent 50%),
    linear-gradient(to right, var(--cArrowFade), var(--cArrowFade));
  background-position: calc(100% - 1rem) calc(0.6em + 0.6rem), calc(100% - 0.6rem) calc(0.6em + 0.6rem),
  calc(100% - 2rem) 0.2em;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem, 1px 2.8rem;
  background-repeat: no-repeat;
  padding-right: 2.1rem;
  &:disabled {
    background-image: linear-gradient(45deg, transparent 50%, var(--cArrowDisabled) 50%),
      linear-gradient(135deg, var(--cArrowDisabled) 50%, transparent 50%),
      linear-gradient(to right, var(--cArrowDisabled), var(--cArrowDisabled));
  }
}

.range {
  position: relative;
  display: grid;
  place-items: center;
  grid-template-columns: 3.4rem auto;
  gap: 0.8rem;
}

.rangeInput {
  vertical-align: middle;
  width: 100%;
  appearance: none;
  background-color: transparent;
  height: 3.4rem;
  cursor: pointer;

  &::-webkit-slider-runnable-track {
    appearance: none;
    background-color: var(--cRangeTrack);
    height: 0.6rem;
    border-radius: 0.2rem;
  }

  &::-webkit-slider-thumb {
    appearance: none;
    translate: 0 -0.7rem;
    background-color: var(--cRangeThumb);
    border: 0;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
  }

  &[disabled] {
    cursor: not-allowed;

    &::-webkit-slider-runnable-track {
      background-color: var(--cRangeTrackDisabled);
    }

    &::-webkit-slider-thumb {
      background-color: var(--cRangeThumbDisabled);
    }
  }
}

.output {
  display: grid;
  place-items: center;
  background: var(--cRangeOutput);
  color: var(--cRangeOutputText);
  width: 100%;
  height: 2.4rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 400;
  position: relative;
  cursor: default;
  border-radius: var(--s4);

  &::before {
    position: absolute;
    top: 50%;
    right: -0.7rem;
    transform: translateY(-50%);
    content: '';
    width: 0;
    height: 0;
    border-top: 0.8rem solid transparent;
    border-bottom: 0.8rem solid transparent;
    border-left: 0.8rem solid var(--cRangeOutput);
  }

  .range:has(:disabled) & {
    cursor: not-allowed;
    background: var(--cRangeOutputDisabled);
    color: var(--cRangeOutputTextDisabled);

    &::before {
      border-left-color: var(--cRangeOutputDisabled);
    }
  }
}

.drag {
  display: grid;
  place-items: center;
  background-color: transparent;
  color: inherit;
  border: 0;
  width: auto;
  padding: 0;
  opacity: 0.3;
  cursor: grab;

  &:hover,
  &:focus-visible {
    opacity: 1;
  }
}

.dragGhost {
  background-color: hsl(var(--g5H) var(--g5S) var(--g5L) / .3) !important;

  * {
    opacity: 0;
  }
}