@import "../common/var";
@mixin button-plain($color, $background-color, $border-color,$color-hover, $background-color-hover, $border-color-hover) {
  color: $color;
  background: $background-color;
  border-color: $border-color;

  &:hover {
    background: $background-color-hover;
    border-color: $border-color-hover;
    color: $color-hover;
  }

  &:active {
    background: $background-color-hover;
    border-color: $border-color-hover;
    color: $color-hover;
    outline: none;
  }

  &.is-disabled {
    &,
    &:hover
    &:active {
      background-color: $--button-disabled-background-color;
      border-color: $--button-disabled-border-color;
      color: $--button-disabled-font-color;
    }
  }
}

@mixin button-variant(
  $color, $background-color, $border-color, 
  $color-hover, $background-color-hover, $border-color-hover,
  $color-plain, $background-color-plain, $border-color-plain,
  $color-plain-hover, $background-color-plain-hover, $border-color-plain-hover) {

  color: $color;
  background-color: $background-color;
  border-color: $border-color;

  &:hover {
    background: $background-color-hover;
    border-color: $border-color-hover;
    color: $color-hover;
  }
  
  &:active {
    background: $background-color-hover;
    border-color: $border-color-hover;
    color: $color-hover;
    outline: none;
  }

  &.is-active {
    background: $background-color-hover;
    border-color: $border-color-hover;
    color: $color-hover;
  }

  &.is-disabled {
    &,
    &:hover,
    &:focus,
    &:active {
      background-color: $--button-disabled-background-color;
      border-color: $--button-disabled-border-color;
      color: $--button-disabled-font-color;
    }
  }

  &.is-plain {
    @include button-plain($color-plain, $background-color-plain, $border-color-plain,
  $color-plain-hover, $background-color-plain-hover, $border-color-plain-hover);
  }
}

@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
  padding: $padding-vertical $padding-horizontal;
  font-size: $font-size;
  border-radius: $border-radius;
  &.is-round {
    padding: $padding-vertical $padding-horizontal;
  }
}
