[data-component="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 1px;
  border-radius: 6px;
  text-decoration: none;
  user-select: none;
  outline: none;

  &[data-variant="primary"] {
    border-color: var(--border-base);
    background-color: var(--surface-brand-base);
    color: var(--text-on-brand-strong);

    &:hover:not(:disabled) {
      border-color: var(--border-hover);
      background-color: var(--surface-brand-hover);
    }
    &:active:not(:disabled) {
      border-color: var(--border-active);
      background-color: var(--surface-brand-active);
    }
    &:focus:not(:disabled) {
      border-color: var(--border-focus);
      background-color: var(--surface-brand-focus);
    }
  }

  &[data-variant="secondary"] {
    border: transparent;
    background-color: var(--button-secondary-base);
    color: var(--text-strong);
    box-shadow: var(--shadow-xs-border);

    &:hover:not(:disabled) {
      background-color: var(--button-secondary-hover);
    }
    &:active:not(:disabled) {
      background-color: var(--button-secondary-base);
    }
    &:focus:not(:disabled) {
      background-color: var(--button-secondary-base);
    }
    &:focus-visible:not(:active) {
      background-color: var(--button-secondary-base);
      box-shadow: var(--shadow-xs-border-focus);
    }
    &:focus-visible:active {
      box-shadow: none;
    }
    &:active {
      scale: 0.99;
      transition: all 150ms ease-out;
    }

    [data-slot="icon"] {
      color: var(--icon-strong-base);
    }
  }

  &[data-variant="ghost"] {
    border-color: transparent;
    background-color: transparent;
    color: var(--text-strong);

    &:hover:not(:disabled) {
      background-color: var(--surface-hover);
    }
    &:active:not(:disabled) {
      border-color: var(--border-active);
      background-color: var(--surface-active);
    }
    &:focus:not(:disabled) {
      border-color: var(--border-focus);
      background-color: var(--surface-focus);
    }
  }

  &[data-size="normal"] {
    padding: 0 6px;
    &[data-icon] {
      padding: 0 6px 0 4px;
    }

    font-size: var(--font-size-small);
    line-height: var(--line-height-large);
    gap: calc(var(--spacing) * 0.5);
  }

  &[data-size="large"] {
    height: 32px;
    padding: 0 8px;

    &[data-icon] {
      padding: 0 8px 0 6px;
    }

    gap: 8px;

    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    font-style: normal;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-large); /* 171.429% */
    letter-spacing: var(--letter-spacing-normal);
  }

  &:disabled {
    border-color: var(--border-disabled);
    background-color: var(--surface-disabled);
    color: var(--text-weak);
    cursor: not-allowed;
  }

  &:focus {
    outline: none;
  }
}
