$button-border-radius: 3px !default;
$button-fab-border-radius: 50% !default;

$button-primary-color-palette: $primary-color-palette !default;
$button-primary-color: map-get($button-primary-color-palette, '400') !default;
$button-primary-raised-color: $primary-color-palette-contrast-color !default;
$button-primary-raised-background-color: map-get($button-primary-color-palette, '500') !default;
$button-primary-raised-hover-background-color: map-get($button-primary-color-palette, '600') !default;

$button-warn-color-palette: $warn-color-palette !default;
$button-warn-color: map-get($button-warn-color-palette, '400') !default;
$button-warn-raised-color: $primary-color-palette-contrast-color !default;
$button-warn-raised-background-color: map-get($button-warn-color-palette, '500') !default;
$button-warn-raised-hover-background-color: map-get($button-warn-color-palette, '700') !default;

$button-flat-color-palette: $background-color-palette !default;
$button-disabled-color: $foreground-tertiary-color !default;
$button-disabled-background-color: transparent !default;
$button-hover-background-color: rgba(map-get($button-flat-color-palette, '500'), 0.20) !default;

$button-raised-color-palette: $button-flat-color-palette !default;
$button-raised-background-color: rgba(map-get($button-raised-color-palette, '500'), 0.185) !default;
$button-raised-hover-background-color: rgba(map-get($button-raised-color-palette, '500'), 0.30) !default;

.md-button.md-#{$theme-name}-theme {
  border-radius: $button-border-radius;

  &:not([disabled]) {
    &:hover, 
    &:focus {
      background-color: $button-hover-background-color;
    }
  }

  &.md-fab {
    border-radius: $button-fab-border-radius;
  }

  &.md-primary {
    color: $button-primary-color;
    fill: $button-primary-color;
  }

  &.md-warn {
    color: $button-warn-color;
    fill: $button-warn-color;
  }

  &.md-raised, 
  &.md-fab {
    background-color: $button-raised-background-color;

    &:not([disabled]) {
      &:hover, 
      &:focus {
        background-color: $button-raised-hover-background-color;
      }
    }

    &.md-primary {
      color: $button-primary-raised-color;
      background-color: $button-primary-raised-background-color;
      &:not([disabled]) {
        &:hover,
        &:focus {
          background-color: $button-primary-raised-hover-background-color;
        }
      }
    }

    &.md-warn {
      color: $button-warn-raised-color;
      background-color: $button-warn-raised-background-color;
      &:not([disabled]) {
        &:hover, 
        &:focus {
          background-color: $button-warn-raised-hover-background-color;
        }
      }
    }
  }

  &[disabled],
  &.md-raised[disabled],
  &.md-fab[disabled] {
    color: $button-disabled-color;
    fill: $button-disabled-color;
    background-color: $button-disabled-background-color;
    cursor: not-allowed;
  }
}
