@use 'sass:math';

@mixin button() {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  text-decoration: none;
  background: none;
  color: inherit;
  appearance: none;
  font-family: inherit;
  font-style: inherit;
  font-size: inherit;
  font-variant-ligatures: inherit;
  font-variant-caps: inherit;
  font-variant-numeric: inherit;
  font-variant-east-asian: inherit;
  font-weight: inherit;
  font-stretch: inherit;
  text-rendering: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
  line-height: inherit;
  text-transform: none;
  text-indent: inherit;
  text-shadow: none;
  text-align: inherit;
  pointer-events: auto;
  cursor: pointer;

  outline: 2px solid transparent;
  outline-offset: 2px;

  &:focus,
  &:focus-visible {
    outline-color: var(--llm-color-outline);
  }

  &:hover {
    outline-color: color-mix(in srgb, var(--llm-color-outline) 10%, transparent 90%);
  }

  &:active {
    outline-color: var(--llm-color-accent-foreground);
  }
}

@mixin btn() {
  @include button();
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 2px solid transparent;
  outline-offset: 2px;
  color: var(--llm-input-accent);

  svg {
    width: 24px;
    height: 24px;
  }
}
