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

  &:hover {
    color: mix($--color-white, $color, $--button-plain-percent);
    background: $color;
    border-color: $color;
  }

  &:active {
    background: mix($--color-black, $color, $--button-active-shade-percent);
    border-color: mix($--color-black, $color, $--button-active-shade-percent);
    color:  $--color-white;
    outline: none;
  }

  &.is-disabled {
    &,
    &:hover,
    &:active {
      color: mix($--color-white, $color, $--button-disabled-percent);
      background-color: mix($--color-white, $color, $--button-plain-percent);
      border-color: mix($--color-white, $color, $--button-disabled-percent);
    }
  }
}
@mixin button-border($color) {
    color: $color;
    background: $--color-white;
    border-color: $color;
  
    &:hover {
      color: $color;
      background: mix($--color-white, $color, $--button-plain-percent);
      border-color: $color;
    }
  
    &:active {
      background: $color;
      border-color: $color;
      color: $--color-white;
      outline: none;
    }
  
    &.is-disabled {
      &,
      &:hover,
      &:active {
        color: mix($--color-white, $color, $--button-disabled-percent);
        background-color: $--color-white;
        border-color: mix($--color-white, $color, $--button-disabled-percent);
      }
    }
  }

@mixin button-variant($color, $background-color, $border-color) {
  color: $color;
  background-color: $background-color;
  border-color: $border-color;

  &:hover {
    background: mix($--color-white, $background-color, $--button-hover-tint-percent);
    border-color: mix($--color-white, $border-color, $--button-hover-tint-percent);
    color: $color;
  }
  
  &:active {
    background: mix($--color-black, $background-color, $--button-active-shade-percent);
    border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
    color: $color;
    outline: none;
  }

  &.is-active {
    background: mix($--color-black, $background-color, $--button-active-shade-percent);
    border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
    color: $color;
  }

  &.is-disabled {
    &,
    &:hover,
    &:active {
      color: $--color-white;
      background-color: mix($--color-white, $background-color, 80%);
      border-color: mix($--color-white, $border-color, 80%);
    }
  }

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

@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;
  }
}
