// Removes some box-shadows
@mixin euiFormControlFocusStyle($borderOnly: false) {
  // sass-lint:disable-block indentation, empty-args
  background-color: tintOrShade($euiColorEmptyShade, 0%, 40%);
  background-image: euiFormControlGradient();
  background-size: 100% 100%; // 1
  outline: none; // Blanket remove all outlines relying on our own bottom border

  @if ($borderOnly) {
    box-shadow: inset 0 0 0 1px $euiFormBorderColor;
  } @else {
    box-shadow:
      inset 0 0 0 1px $euiFormBorderColor;
  }
}

// Removes euiSlightShadow
@mixin euiCustomControl($type: null, $size: $euiSize) {
  @if $size {
    $size: $size - 2px; // subtract 2px from size to account for border size
    padding: $size / 2;
  }

  border: 1px solid $euiFormCustomControlBorderColor;
  background: $euiColorEmptyShade no-repeat center;

  @if $type == 'round' {
    border-radius: $size;
  } @else if $type == 'square' {
    border-radius: $euiCheckboxBorderRadius;
  }
  // sass-lint:disable-block indentation
  transition: background-color $euiAnimSpeedFast ease-in,
              border-color $euiAnimSpeedFast ease-in;
}

// Adjusts form controls border radius
@mixin euiFormControlSideBorderRadius($borderRadius, $side, $internal: false) {
  @if $internal == true {
    $borderRadius: $borderRadius - 1;
  }
  @if $side == 'left' {
    border-radius: $borderRadius 0 0 $borderRadius;
  } @else if $side == 'right' {
    border-radius: 0 $borderRadius $borderRadius 0;
  }
}
