// ==================================================================
// Input Component
// ==================================================================
label,
.sprk-b-Label {
  @include TextCrop(
    $line-height: $line-height-body-one,
    $top-crop: $line-height-collision-top-crop,
    $bottom-crop: $line-height-collision-bottom-crop,
    $crop-font-size: (strip-unit($font-size-body-one) * 16),
    $crop-line-height: $line-height-body-one);

  font-size: $font-size-body-one;
  color: $blue-dark;
  font-weight: $font-weight-body-one;
  line-height: $line-height-body-one;
}

.sprk-b-Label--inline {
  display: inline-block;
  vertical-align: middle;
}

.sprk-b-SubLabel {
  color: $color-body-two;
  font-size: $font-size-body-two;
  font-weight: $font-weight-body-two;
}

.sprk-b-TextInput,
.sprk-b-Select,
textarea {
  color: $gray-dark;
  outline: none;
  font-size: $font-size-body-two;

  &:focus {
    border-color: $blue-medium;
    box-shadow: $input-box-shadow;
  }
}

.sprk-b-TextInput--date-picker,
.sprk-b-TextInput--monetary {
  position: relative;
}

.sprk-b-TextInput--date-picker .sprk-c-Icon,
.sprk-b-TextInput--monetary::before {
  color: $gray-dark;
  position: absolute;
  left: 0.55rem;
  z-index: $layer-height-xs;
}

.sprk-b-TextInput--date-picker .sprk-c-Icon {
  top: 0.85rem;
}

.sprk-b-TextInput--monetary::before {
  content: '$';
  top: 0.6rem;
}

.sprk-b-TextInput--error,
.sprk-b-Select--error {
  background-color: $red-light;
  border-color: $red-medium;

  &:focus {
    border-color: $red-medium;
    box-shadow: $input-error-box-shadow;
    background-color: $red-light;
  }
}

.sprk-b-TextInput[readonly] {
  color: $white;

  &:focus {
    box-shadow: $input-disabled-box-shadow;
  }
}

.sprk-b-SelectionContainer {
  display: flex;
  align-items: center;
  margin: $space-s 0;
}

.sprk-b-SelectionContainer .sprk-b-Label {
  font-weight: normal;
  line-height: 1.2;
}

.sprk-b-InputContainer {
  max-width: 27.5rem;
}

.sprk-b-InputContainer\@sm {
  max-width: none;
}

.sprk-b-InputContainer .sprk-b-Legend > .sprk-b-Label,
.sprk-b-InputContainer > .sprk-b-Label {
  margin-bottom: $space-s;
}

.sprk-b-HelperText {
  color: $gray-medium;
}

.sprk-b-ErrorText {
  color: $red-medium;
}

.sprk-b-TextArea {
  min-height: 125px;
  margin: $space-stack-m;
}

.sprk-b-Fieldset {
  padding: 0;
}

// Placeholder colors
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
::placeholder {
  color: $gray-medium;
}
