@mixin euiFocusRing($size: 'small', $amsterdamOnlyProp: null) {
  @if $size == 'large' {
    // It's always OK to use the focus animation. This will take precedence over times we turn it off individually like EuiButtonEmpty
    // sass-lint:disable-block no-important
    animation: $euiAnimSpeedSlow $euiAnimSlightResistance 1 normal forwards focusRingAnimateLarge !important;
  } @else {
    // sass-lint:disable-block no-important
    animation: $euiAnimSpeedSlow $euiAnimSlightResistance 1 normal forwards focusRingAnimate !important;
  }
}

// Keyframe animation declarations can be found in
// utility/animations.scss

@mixin euiFocusBackground($color: $euiColorPrimary) {
  background-color: tintOrShade($euiColorPrimary, ((1 - $euiFocusTransparency) * 100%), ((1 - $euiFocusTransparency) * 100%));
}

@mixin euiHoverState {
  cursor: pointer;
  text-decoration: underline;
}

@mixin euiFocusState($color: $euiColorPrimary) {
  @include euiHoverState;
  @include euiFocusBackground($color);
}

@mixin euiDisabledState($color: $euiButtonColorDisabledText) {
  cursor: not-allowed;
  text-decoration: none;

  @if ($color) {
    color: $euiButtonColorDisabledText;
  }
}

@mixin euiInteractiveStates($focusColor: $euiColorPrimary, $disabledColor: $euiButtonColorDisabledText) {
  &:hover {
    @include euiHoverState;
  }

  &:focus {
    @include euiFocusState($focusColor);
  }

  &:disabled {
    @include euiDisabledState($disabledColor);
  }
}
