@use '../abstracts/variables';
@use '../abstracts/mixins';

.miter-input {
  *,
  *:before,
  *:after {
    box-sizing: border-box;
  }

  align-items: flex-end;
  border-bottom: 1px solid variables.$secondary-hover;
  display: flex;
  height: 53px;
  padding-bottom: 7px;

  &--active {
    border-bottom: 1px solid variables.$primary;
  }

  &--disabled {
    border-bottom: 1px solid variables.$secondary-hover;

    *,
    *:before,
    *:after {
      cursor: not-allowed;
      opacity: 60%;
    }
  }

  &--invalid {
    border-bottom: 1px solid variables.$error;
  }

  &--hovered {
    background-color: variables.$background;
  }
}

.miter-input__prepend {
  *,
  *:before,
  *:after {
    align-items: center;
  }

  align-items: center;
  display: flex;
  height: 40px;
  justify-items: flex-end;
  margin-right: 8px;
}

.miter-input__append {
  align-items: center;
  display: flex;
  height: 40px;
  justify-items: flex-end;
  margin-left: auto;

  &--active {
    color: variables.$primary;
  }

  &--invalid {
    *,
    *:before,
    *:after {
      color: variables.$error;
    }
  }
}

.miter-input__text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  height: 40px;
  justify-content: center;
  width: 100%;

  input {
    background-color: inherit;
  }
}

.miter-input__label {
  font-size: 13px;
  font-family: variables.$font--secondary;
  line-height: 18px;
  letter-spacing: -0.09px;
  font-weight: 600;
}

.miter-input__input {
  border: 0;
  line-height: 24px;
  font-family: variables.$font--secondary;
  font-size: 16px;
  letter-spacing: -0.4px;
  padding-left: 0;
  
  &:focus {
    border-color: transparent;
    outline-style: none;
  }

  &--hovered {
    background-color: variables.$background;
  }

  &--disabled {
    background-color: transparent;
  }
}

.miter-input__subtitle {
  font-size: 11px;
  line-height: 14px;
  margin-bottom: 0;
  margin-top: 0;
  opacity: 60%;
  padding-left: 2px;
}
