[data-component="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 1px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  user-select: none;
  cursor: default;
  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);
    }
    &:focus:not(:disabled) {
      border-color: var(--border-focus);
      background-color: var(--surface-brand-focus);
    }
    &:active:not(:disabled) {
      border-color: var(--border-active);
      background-color: var(--surface-brand-active);
    }
    &:disabled {
      border-color: var(--border-disabled);
      background-color: var(--surface-disabled);
      color: var(--text-weak);
      cursor: not-allowed;
    }
  }

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

    &:hover:not(:disabled) {
      background-color: var(--surface-raised-base-hover);
    }
    &:focus:not(:disabled) {
      background-color: var(--surface-raised-base-hover);
    }
    &:active:not(:disabled) {
      background-color: var(--surface-raised-base-active);
    }
    &:disabled {
      color: var(--text-weak);
      opacity: 0.7;
      cursor: not-allowed;
    }
  }

  &[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);
    }
    &: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:not(:disabled) {
      background-color: var(--button-secondary-base);
      scale: 0.99;
      transition: all 150ms ease-out;
    }
    &:disabled {
      border-color: var(--border-disabled);
      background-color: var(--surface-disabled);
      color: var(--text-weak);
      cursor: not-allowed;
    }

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

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

    font-size: var(--font-size-small);
    line-height: var(--line-height-large);
    gap: 6px;
  }

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

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

    gap: 8px;

    /* text-12-medium */
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    font-style: normal;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-large); /* 166.667% */
    letter-spacing: var(--letter-spacing-normal);
  }

  &:focus {
    outline: none;
  }
}
