// stylelint-disable plugin/selector-bem-pattern

@mixin field-text {
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  // min-height: calc(#{$line-height}em + #{$field-padding-vertical} + #{$field-padding-vertical} + 2px);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: $border-radius;
  padding: 18px 20px;
  line-height: $line-height;
  font-size: 1em;
  font-family: inherit;
  background-color: transparent;
  -moz-appearance: textfield; // stylelint-disable-line
  appearance: textfield;
  transition: border-color $transition-time;
  color: #fff;

  &:focus {
    outline: 0;
    border-color: #ffffff;
    // @include field-focus;
  }

  &[disabled],
  &[readonly] {
    cursor: not-allowed;
    background-color: $gray-lighter;
  }

  &::-webkit-search-cancel-button,
  &::-webkit-search-decoration,
  &::-webkit-inner-spin-button,
  &::-webkit-outer-spin-button {
    -webkit-appearance: none; // stylelint-disable-line  property-no-vendor-prefix
  }

  &[type="color"] {
    padding: 0;
  }

  &::placeholder {
    color: #fff;
    opacity: 1;
  }
}

@mixin field-help-text {
  position: absolute;
  display: block;
  padding-top: 0.4em;
  font-size: $font-size-sm;
  line-height: 1.2em;
  color: #fff;

  &:empty {
    // stylelint-disable-line
    display: none;
  }
}

@mixin field-focus {
  outline: 0;
  box-shadow: 0 0 0 2px rgba($color-main, $opacity);
}

@mixin field-name {
  display: block;
  margin-bottom: 0.4em;
  line-height: $line-height;
  font-weight: 700;
}
