.button {
  color: $color-text;
  background-color: $white-100;

  &.ac-button {
    padding: 8px 16px;
    font-weight: 500;
    line-height: 1;
    &.is-white {
      &:focus {
        background-color: $primary-light-gray;
      }
    }
    &.is-primary {
      background-color: $ac-primary;
      &:hover {
        background-color: hsl(var(--primary-hue), var(--primary-saturation), calc(var(--primary-light) - 3%));
      }
      &.is-light {
        color: $ac-primary;
        background-color: $primary-95;
        &:hover {
          background-color: $primary-90;
        }
        &:focus:not(:hover) {
          color: inherit;
        }
        &:disabled:not(.is-outlined) {
          border-color: transparent;
        }
      }

      &.is-outlined:not(.is-light:disabled) {
        border-color: $ac-primary;
        color: $ac-primary;
        background-color: transparent;
        &:hover {
          border-color: $primary-30;
          background-color: $ac-primary;
          color: $white-100;
        }
        &.is-loading {
          &::after {
            border-color: transparent transparent $ac-primary $ac-primary !important;
          }
        }
        &.is-soft:not(:hover) {
          border-color: hsl(var(--primary-hue), 30%, 80%);
        }
      }
    }
    &.is-warning {
      &.is-light {
        color: $yellow-30;
        &:focus:not(:hover) {
          color: inherit;
        }
        &:disabled:not(.is-outlined) {
          border-color: transparent;
        }
      }
      &.is-soft:not(:hover) {
        border-color: hsl($yellow-hue, 30%, 80%);
      }
    }
    &.is-info {
      &.is-light {
        color: $blue-30;
        &:focus:not(:hover) {
          color: inherit;
        }
        &:disabled:not(.is-outlined) {
          border-color: transparent;
        }
      }
      &.is-soft:not(:hover) {
        border-color: hsl($blue-hue, 30%, 80%);
      }
    }
    &.is-danger {
      &.is-light {
        color: $red-30;
        &:focus:not(:hover) {
          color: inherit;
        }
        &:disabled:not(.is-outlined) {
          border-color: transparent;
        }
      }
      &.is-soft:not(:hover) {
        border-color: hsl($red-hue, 30%, 80%);
      }
    }

    &.is-success {
      &.is-light {
        color: $green-30;
        &:focus:not(:hover) {
          color: inherit;
        }
        &:disabled:not(.is-outlined) {
          border-color: transparent;
        }
      }
      &.is-soft:not(:hover) {
        border-color: hsl($green-hue, 30%, 80%);
      }
    }
    &.is-light {
      &.is-loading {
        &::after {
          border-color: transparent transparent $primary-5 $primary-5 !important;
        }
      }
      &.is-outlined {
        &:hover {
          border-color: inherit;
        }
      }
    }

    &.is-small {
      padding: 4px 12px;
      &:not(.is-rounded) {
        border-radius: 4px;
      }

      &.is-square {
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
      }
    }
    &.is-medium {
      font-size: 1rem;
      height: 36px;
      &.is-square {
        width: 36px;
        align-items: center;
        justify-content: center;
      }
    }
    &.is-tinny {
      height: 24px;
      padding: 0 8px;
    }
  }
}
button.is-primary {
  background-color: $ac-primary;
}
.up-down-buttons {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  max-width: 36px;
  margin-bottom: 0 !important;
  button.ac-button {
    width: 36px;
    height: 18px;
    cursor: pointer;
    border: none;
    color: $ac-primary;
    background-color: $color-border;
    transition: 0.3s ease-in-out;
    margin: 0 !important;
    border-radius: 0;
    &:hover {
      background-color: $primary-80;
    }
    &.is-primary {
      background-color: $ac-primary;
      color: $white-100;
      &:hover {
        background-color: $primary-30;
      }
    }
    .icon {
      margin: 0;
      padding: 0;
      width: auto;
      height: auto;
    }
  }
}
.buttons.has-addons {
  &.has-gap {
    border: 1px solid #ddd;
    padding: 4px;
    display: inline-flex;
    border-radius: 4px;
    .button {
      margin: 0;
      border: none;
      border-radius: 4px;
      &:focus {
        box-shadow: none;
      }
    }
  }
}
