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

@mixin field-text {
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  margin: 0;
  border: 1px solid $border-color;
  border-radius: $border-radius;
  padding: 16px;
  font: 500 11px/120% $font-family;
  letter-spacing: 0.03em;
  color: $color-d-grey;
  background-color: #f7f8fb;
  -moz-appearance: textfield; // stylelint-disable-line
  appearance: textfield;
  transition: border-color $transition-time;

  @media (min-width: $screen-xl) {
    font-size: 13px;
  }

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

  &[disabled],
  &:not(.form-control)[readonly] {
    cursor: not-allowed;
    background-color: $gray-lighter;
  }

  &[readonly] &::-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: #a7a8c7;
    opacity: 1;
    font: 300 11px $font-family;
    line-height: $line-height;
    letter-spacing: 0.03em;

    @media (min-width: $screen-xl) {
      font-size: 13px;
    }
  }
}

@mixin field-help-text {
  display: block;
  padding-top: 0.4em;
  font-weight: 300;
  font-size: 12px;
  line-height: 120%;
  color: #a7a8c7;

  @media (min-width: $screen-xl) {
    font-size: 13px;
  }

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

@mixin field-focus {
  outline: 1px solid rgba(91, 211, 199, 0);
  outline-offset: 4px;
  // box-shadow: 0 0 0 2px rgba(91, 211, 199, 0.7);
}

@mixin field-name {
  display: block;
  margin-bottom: 8px;
  font: 300 12px/120% $font-family;
  color: $color-d-grey;

  @media (min-width: $screen-xl) {
    font-size: 13px;
  }
}
