/* Kilo Button overrides – styled to match Figma design */

[data-component="button"] {
  font-family: var(--vscode-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: var(--kilo-font-size-13);
  line-height: var(--kilo-font-size-16);
  border-radius: 2px;
  cursor: pointer;
  border-color: transparent;
  box-shadow: none;

  &:focus-visible {
    outline: 1px solid var(--border-focus);
    outline-offset: 1px;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  &:active:not(:disabled) {
    opacity: 0.8;
  }

  /* Full-width variant for "Start New Task" style buttons */
  &[data-full-width="true"] {
    width: 100%;
  }

  &[data-variant="primary"] {
    background-color: var(--surface-brand-base);
    color: #ffffff;
    border-color: transparent;
    box-shadow: none;
    font-weight: 400;

    [data-slot="icon-svg"] {
      color: #ffffff;
    }

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

    &:disabled {
      background-color: var(--surface-brand-base);
      opacity: 0.5;
    }
  }

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

    &:hover:not(:disabled) {
      background-color: var(--button-secondary-hover);
    }

    &:disabled {
      background-color: var(--button-secondary-base);
      opacity: 0.5;
    }

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

  &[data-variant="ghost"] {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 400;

    &:hover:not(:disabled) {
      background-color: var(--surface-base-hover);
    }

    &:disabled {
      opacity: 0.5;
    }
  }

  &[data-size="normal"] {
    min-height: 32px;
    padding: 6px 16px;
    gap: 6px;
    font-size: var(--kilo-font-size-13);
    line-height: var(--kilo-font-size-16);

    &[data-icon] {
      padding: 6px 16px 6px 12px;
    }
  }

  &[data-size="large"] {
    min-height: 32px;
    padding: 6px 16px;
    gap: 6px;
    font-size: var(--kilo-font-size-13);
    line-height: var(--kilo-font-size-16);

    &[data-icon] {
      padding: 6px 16px 6px 12px;
    }
  }

  &[data-size="small"] {
    min-height: 24px;
    padding: 4px 12px;
    gap: 4px;
    font-size: var(--kilo-font-size-13);
    line-height: var(--kilo-font-size-16);

    &[data-icon] {
      padding: 4px 12px 4px 8px;
    }
  }
}
