@import '~scss/variables';
@import '~scss/mixins';

.sliderWrapper {
  padding-bottom: 24px;
  margin-bottom: 12px;

  :global {
    .tooltip-content {
      user-select: none;
    }
  }
}

.slider {
  position: relative;
  height: 20px;
  padding: 5px 0;
  margin-top: 7px;
}

.rail {
  height: 10px;
  border-radius: 5px;
  background-color: $bg-color;
}

.track {
  position: absolute;
  top: 5px;
  height: 10px;
  border-radius: 5px;
  background-color: $primary;
}

.handler {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid $primary;
  background-color: #fff;
  box-shadow: 0 4px 8px 0 rgba(85, 188, 138, 0.36);
  transition: box-shadow $trans-speed ease-in-out;
  cursor: pointer;
  outline: none;
  user-select: none;

  &:active {
    box-shadow: none;
  }

  &::after {
    content: '';
    display: block;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: $primary;
    transition: transform $trans-speed ease-in-out;
  }

  &:hover,
  &:active {
    &::after {
      transform: scale(1.35);
    }
  }
}

.mark {
  position: relative;
  margin-top: 9px;
  user-select: none;

  & > span {
    position: absolute;
    @include TypographyParagraph($dark-color01);
    user-select: none;
    transform: translateX(-50%);

    &:first-of-type,
    &:last-of-type {
      transform: none;
    }

    &:last-of-type {
      left: unset !important;
      right: 0;
    }
  }
}

.inputWrapper {
  padding: 12px;
  border-radius: 4px;
  background-color: $lightest;
}

.inputGroup {
  position: relative;
  padding: 0 8px;
  padding-left: 68px;

  :global {
    .icon {
      position: absolute;
      top: 0;
      left: 8px;
    }
  }

  img {
    position: absolute;
    top: 0;
    left: 8px;
  }

  .input {
    position: relative;
    display: flex;
    align-items: center;

    &.error {
      :global .input {
        border-color: $red !important;
        box-shadow: none !important;
      }
    }

    .label {
      width: 53px;
      line-height: 20px;
      margin-right: 8px;
      display: flex;
      align-items: center;
      @include TypographyParagraph();
    }

    .inputBox {
      flex: 1;
    }

    .unit {
      right: 12px;
      @include TypographySymbolText();
      @include vertical-center;
    }

    & + .input {
      margin-top: 8px;
    }

    :global {
      input.input {
        width: 100%;
      }

      .select {
        width: 100%;

        .icon {
          align-self: center;
          position: relative;
        }
      }
    }
  }
}

.message {
  span + span {
    margin-left: 8px;
  }
}
