@mixin button-focus {
  background-color: $btn-focus-bgcolor;
  border-color: $btn-focus-border-color;
  color: $btn-focus-color;
  outline: $btn-focus-outline;
  outline-offset: $btn-focus-outline-offset;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-focus-bgcolor, 50%), $btn-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name == 'tailwind' or $skin-name == 'bootstrap5' or $skin-name == 'FluentUI' {
    box-shadow: $btn-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin button-active {
  background-color: $btn-active-bgcolor;
  border-color: $btn-active-border-color;
  color: $btn-active-color;
  @if $skin-name != 'FluentUI' {
    outline: $btn-active-outline;
    outline-offset: $btn-active-outline-offset;
  }
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-active-bgcolor, 50%), $btn-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin primary-focus {
  background-color: $btn-primary-focus-bgcolor;
  border-color: $btn-primary-focus-border-color;
  color: $btn-primary-focus-color;
  outline: $btn-primary-outline;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-primary-focus-bgcolor, 50%), $btn-primary-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-primary-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin primary-active {
  background-color: $btn-primary-active-bgcolor;
  border-color: $btn-primary-active-border-color;
  color: $btn-primary-active-color;
  @if $skin-name != 'FluentUI' {
    outline: $btn-active-outline;
  }
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-primary-active-bgcolor, 50%), $btn-primary-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin primary-disabled {
  background-color: $btn-primary-disabled-bgcolor;
  border-color: $btn-primary-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-primary-disabled-color;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}

@mixin outline-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-outline-focus-bgcolor, 50%), $btn-outline-default-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin outline-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-outline-active-bgcolor, 50%), $btn-outline-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else {
    background-color: $btn-outline-active-bgcolor;
    border-color: $btn-outline-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-outline-active-color;
}

@mixin outline-primary-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-outline-primary-focus-bgcolor, 50%), $btn-outline-primary-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-primary-focus-box-shadow;
  }
}

@mixin outline-primary-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-primary-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-primary-active-bgcolor, 50%), $btn-outline-primary-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'bootstrap5') {
    background-color: $btn-primary-bgcolor;
  }
  @else {
    background-color: $btn-primary-active-bgcolor;
    border-color: $btn-outline-primary-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-primary-active-color;
}

@mixin outline-success-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-success-focus-bgcolor, 50%), $btn-success-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-success-focus-box-shadow;
  }
}

@mixin outline-success-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-success-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-success-active-bgcolor, 50%), $btn-success-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else {
    background-color: $btn-success-active-bgcolor;
    border-color: $btn-success-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-success-active-color;
}

@mixin outline-info-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-info-hover-bgcolor, 50%), $btn-info-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-info-focus-box-shadow;
  }
}

@mixin outline-info-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-info-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-info-active-bgcolor, 50%), $btn-info-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'bootstrap5') {
    background-color: $btn-info-bgcolor;
  }
  @else {
    background-color: $btn-info-active-bgcolor;
    border-color: $btn-info-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-info-active-color;
}

@mixin outline-warning-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-warning-hover-bgcolor, 50%), $btn-warning-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-warning-focus-box-shadow;
  }
}

@mixin outline-warning-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-warning-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-warning-active-bgcolor, 50%), $btn-warning-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else {
    background-color: $btn-warning-active-bgcolor;
    border-color: $btn-warning-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-warning-active-color;
}

@mixin outline-danger-focus {
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-danger-hover-bgcolor, 50%), $btn-danger-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-danger-focus-box-shadow;
  }
}

@mixin outline-danger-active {
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-danger-bgcolor;
    border-color: transparent;
    $color-rgba: rgba(mix(lighten($btn-danger-active-bgcolor, 50%), $btn-danger-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else {
    background-color: $btn-danger-active-bgcolor;
    border-color: $btn-danger-active-border-color;
    @if $skin-name != 'bootstrap5' {
      box-shadow: $btn-outline-active-box-shadow;
    }
  }
  color: $btn-danger-active-color;
}

@mixin outline-disabled {
  background-color: $btn-outline-bgcolor;
  @if $skin-name == 'bootstrap4' or $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' {
    border-color: $btn-outline-disabled-border-color;
    color: $btn-outline-disabled-color;
  }
  @else if $skin-name == 'bootstrap5' {
    border-color: $btn-outline-disabled-border-color;
    color: $btn-outline-active-bgcolor;
  }
  @else {
    border-color: $btn-outline-primary-disabled-border-color;
    box-shadow: $btn-flat-box-shadow;
    color: $btn-outline-primary-disabled-color;
  }
}

@mixin outline-primary-disabled {
  @if $skin-name == 'bootstrap5' {
    background-color: $btn-outline-primary-disabled-border-color;
  }
  @else {
    background-color: $btn-outline-bgcolor;
  }
  border-color: $btn-outline-primary-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-outline-primary-disabled-color;
}

@mixin outline-success-disabled {
  @if $skin-name == 'bootstrap5' {
    background-color: $btn-outline-success-disabled-border-color;
  }
  @else {
    background-color: $btn-outline-bgcolor;
  }
  border-color: $btn-outline-success-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-outline-success-disabled-color;
}

@mixin outline-info-disabled {
  @if $skin-name == 'bootstrap5' {
    background-color: $btn-info-disabled-border-color;
  }
  @else {
    background-color: $btn-outline-bgcolor;
  }
  border-color: $btn-outline-info-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-outline-info-disabled-color;
}

@mixin outline-warning-disabled {
  @if $skin-name == 'bootstrap5' {
    background-color: $btn-outline-warning-disabled-border-color;
  }
  @else {
    background-color: $btn-outline-bgcolor;
  }
  border-color: $btn-outline-warning-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-outline-warning-disabled-color;
}

@mixin outline-danger-disabled {
  @if $skin-name == 'bootstrap5' {
    background-color: $btn-outline-danger-disabled-border-color;
  }
  @else {
    background-color: $btn-outline-bgcolor;
  }
  border-color: $btn-outline-danger-disabled-border-color;
  box-shadow: $btn-flat-box-shadow;
  color: $btn-outline-danger-disabled-color;
}

@mixin success-focus {
  background-color: $btn-success-focus-bgcolor;
  border-color: $btn-success-focus-border-color;
  color: $btn-success-hover-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-success-focus-bgcolor, 50%), $btn-success-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-success-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin success-active {
  background-color: $btn-success-active-bgcolor;
  border-color: $btn-success-active-border-color;
  color: $btn-success-active-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-success-active-bgcolor, 50%), $btn-success-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin info-focus {
  background-color: $btn-info-focus-bgcolor;
  border-color: $btn-info-focus-border-color;
  color: $btn-info-hover-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-info-focus-bgcolor, 50%), $btn-info-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-info-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin info-active {
  background-color: $btn-info-active-bgcolor;
  color: $btn-info-active-color;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    border-color: $info-border-color-pressed;
  }
  @else {
    border-color: $btn-info-active-border-color;
  }
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-info-active-bgcolor, 50%), $btn-info-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin warning-focus {
  background-color: $btn-warning-focus-bgcolor;
  border-color: $btn-warning-focus-border-color;
  color: $btn-warning-hover-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-warning-focus-bgcolor, 50%), $btn-warning-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-warning-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin warning-active {
  background-color: $btn-warning-active-bgcolor;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    border-color: $warning-border-color-pressed;
  }
  @else {
    border-color: $btn-warning-active-border-color;
  }
  color: $btn-warning-active-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-warning-active-bgcolor, 50%), $btn-warning-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin danger-focus {
  background-color: $btn-danger-focus-bgcolor;
  border-color: $btn-danger-focus-border-color;
  color: $btn-danger-hover-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-danger-focus-bgcolor, 50%), $btn-danger-focus-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    box-shadow: $btn-focus-box-shadow;
  }
  @else if ($skin-name == 'bootstrap5') {
    box-shadow: $btn-danger-focus-box-shadow;
  }
  @else {
    box-shadow: $btn-hover-focus-box-shadow;
  }
}

@mixin danger-active {
  background-color: $btn-danger-active-bgcolor;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark') {
    border-color: $danger-border-color-pressed;
  }
  @else {
    border-color: $btn-danger-active-border-color;
  }
  color: $btn-danger-active-color;
  @if $skin-name == 'bootstrap4' {
    $color-rgba: rgba(mix(lighten($btn-danger-active-bgcolor, 50%), $btn-danger-active-border-color, 15%), .5);
    box-shadow: 0 0 0 .25em $color-rgba;
  }
  @else if $skin-name != 'bootstrap5' {
    box-shadow: $btn-active-box-shadow;
  }
}

@mixin link-focus {
  border-radius: 0;
  text-decoration: underline;
  @if $skin-name == 'bootstrap4' {
    background-color: $btn-link-bgcolor;
    border-color: $btn-link-border-color;
    box-shadow: none;
    color: $btn-link-hover-color;
  }
  @else {
    color: $btn-link-hover-color;
  }
}

@mixin link-hover {
  border-radius: 0;
  color: $btn-link-hover-color;
  text-decoration: underline;
  @if $skin-name == 'bootstrap4' {
    background-color: transparent;
    border-color: transparent;
  }
}

@mixin success-disabled {
  background-color: $btn-success-disabled-bgcolor;
  @if $skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5' {
    border-color: $success-border-color-disabled;
  }
  @else {
    border-color: $btn-disabled-border-color;
  }
  box-shadow: $btn-flat-box-shadow;
  color: $btn-success-disabled-color;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}

@mixin info-disabled {
  background-color: $btn-info-disabled-bgcolor;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5') {
    border-color: $btn-info-disabled-border-color;
  }
  @else {
    border-color: $btn-disabled-border-color;
  }
  box-shadow: $btn-flat-box-shadow;
  color: $btn-info-disabled-color;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}

@mixin warning-disabled {
  background-color: $btn-warning-disabled-bgcolor;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5') {
    border-color: $btn-warning-disabled-border-color;
  }
  @else {
    border-color: $btn-disabled-border-color;
  }
  box-shadow: $btn-flat-box-shadow;
  color: $btn-warning-disabled-color;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}

@mixin danger-disabled {
  background-color: $btn-danger-disabled-bgcolor;
  @if ($skin-name == 'tailwind' or $skin-name == 'tailwind-dark' or $skin-name == 'bootstrap5') {
    border-color: $btn-danger-disabled-border-color;
  }
  @else {
    border-color: $btn-disabled-border-color;
  }
  box-shadow: $btn-flat-box-shadow;
  color: $btn-danger-disabled-color;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}

@mixin link-disabled {
  @if $skin-name == 'bootstrap4' {
    color: $btn-bgcolor;
  }
  @else if $skin-name == 'bootstrap5' {
    color: $secondary-border-color-disabled;
    text-decoration: underline;
  }
  @else {
    color: $btn-disabled-color;
  }
  background-color: $btn-link-disabled-bgcolor;
  box-shadow: $btn-flat-box-shadow;
  text-decoration: none;
  @if $skin-name == 'FluentUI' {
    outline: none;
  }
}
