// All
[mat-button], [mat-raised-button], [mat-stroked-button], [mat-flat-button] {
  border-radius: 20px !important;

  &.btn-lg {
    @extend .mat-h3;
    padding: .5rem 1.5rem;
    border-radius: 24px !important;
  }

  &.btn-xl {
    @extend .mat-h2;
    padding: .75rem 2.5rem;
    border-radius: 30px !important;
  }
}

// Unfilled
@mixin make-mat-button($name, $palette) {
  &.btn-#{$name} {
    @include textColor($palette, 'default');
    @include borderColor($palette, 'default');
    .mat-button-focus-overlay { @include bgColor($palette, 'default'); }
    &[disabled] {
      border-color: currentColor;
      .mat-button-focus-overlay { background-color: transparent; }
    }
  }
}

[mat-button], [mat-stroked-button] {
  @include make-mat-button('primary', $palette-primary);
  @include make-mat-button('success', $palette-success);
  @include make-mat-button('warning', $palette-warning);
  @include make-mat-button('danger', $palette-danger);
}

[mat-stroked-button] {
  border-width: 2px;
}

// Filled
@mixin make-mat-raised-button($name, $palette) {
  &.btn-#{$name} {
    @include bgColor($palette, 'default');
    color: $fg-0;
    .mat-ripple-element {
      opacity: 0.15;
      @include bgColor($palette, 'lighter');
    }
  }
}

[mat-raised-button], [mat-flat-button] {
  @include make-mat-raised-button('primary', $palette-primary);
  @include make-mat-raised-button('success', $palette-success);
  @include make-mat-raised-button('warning', $palette-warning);
  @include make-mat-raised-button('danger', $palette-danger);
}
