.button,button,
#{$all-buttons} {
  @include control;

  @extend .unselectable;

  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
  white-space: nowrap;
  border-radius: 20px;

  strong {
    color: inherit;
  }

  .icon,
  .tag {
    &:first-child {
      margin-left: -2px;
      margin-right: 4px;
    }

    &:last-child {
      margin-left: 4px;
      margin-right: -2px;
    }
  }

  &:hover,
  &:focus,
  &.is-active {
    color: $control-hover;
  }

  &:active {
    box-shadow: inset 0 1px 2px rgba($black, 0.2);
  }

  background-color: transparent;

  // Colors
  @each $name, $pair in $colors {
    $color: nth($pair, 1);
    $color-invert: nth($pair, 2);

    &.is-#{$name} {
      border-color: $color;
      color: $color;

      &:hover,
      &:focus {
        background-color: $color;
        border-color: $color;
        color: $color-invert;
      }

      &:active {
        border-color: transparent;
      }

      &.is-inverted {
        background-color: $color-invert;
        color: $color;

        &:hover {
          background-color: darken($color-invert, 5%);
        }
      }

      &.is-loading {
        &:after {
          border-color: transparent transparent $primary $primary !important;
        }
      }
    }
  }

  &[disabled],
  &.is-disabled {
    opacity: 0.5;
  }

  &.is-fullwidth {
    display: flex;
    width: 100%;
  }

  &.is-loading {
    color: transparent !important;
    pointer-events: none;

    &:after {
      @extend .loader;

      @include center(16px);

      position: absolute !important;
    }
  }
}
