* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

[data-component="button-v2"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-style: normal;
  font-weight: 530;
  font-size: 13px;
  line-height: 1;
  color: var(--v2-text-text-base);
  text-shadow: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04px;
  user-select: none;
  cursor: pointer;
  outline: none;
}

[data-component="button-v2"]:focus {
  outline: none;
}

[data-component="button-v2"]:is(:focus-visible, [data-state="focus"]):not(:disabled) {
  outline: 2px solid var(--v2-border-border-focus);
  outline-offset: 2.5px;
}

[data-component="button-v2"][data-size="normal"] {
  height: 28px;
  padding: 0 11px;
}

[data-component="button-v2"][data-size="small"] {
  height: 24px;
  padding: 0 9px;
  border-radius: 4px;
}

[data-component="button-v2"][data-size="large"] {
  height: 32px;
  padding: 0 15px;
}

[data-component="button-v2"][data-icon][data-size="small"] {
  padding-left: 9px;
}

[data-component="button-v2"][data-icon][data-size="normal"] {
  padding-left: 11px;
}

[data-component="button-v2"][data-icon][data-size="large"] {
  padding-left: 15px;
}

[data-component="button-v2"] [data-slot="icon-svg"] {
  color: currentColor;
}

/* Neutral */
[data-component="button-v2"][data-variant="neutral"] {
  background-color: var(--v2-background-bg-button-neutral);
  color: var(--v2-text-text-base);
  box-shadow: var(--v2-elevation-button-neutral);
}

[data-component="button-v2"][data-variant="neutral"]:is(:hover, [data-state="hover"]):not(:disabled) {
  background-image:
    linear-gradient(90deg, var(--v2-overlay-simple-overlay-hover) 0%, var(--v2-overlay-simple-overlay-hover) 100%),
    linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
}

[data-component="button-v2"][data-variant="neutral"]:is(:active, [data-state="pressed"]):not(:disabled) {
  background-image:
    linear-gradient(90deg, var(--v2-overlay-simple-overlay-pressed) 0%, var(--v2-overlay-simple-overlay-pressed) 100%),
    linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
}

[data-component="button-v2"][data-variant="neutral"]:is(:disabled, [data-state="disabled"]) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Contrast */
[data-component="button-v2"][data-variant="contrast"] {
  background-image:
    linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
    linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
  color: var(--v2-text-text-contrast);
  text-shadow: 0 0.5px 0.5px rgba(0, 0, 0, 0.3);
  box-shadow: var(--v2-elevation-button-contrast);
}

[data-component="button-v2"][data-variant="contrast"]:is(:hover, [data-state="hover"]):not(:disabled) {
  background-image:
    linear-gradient(
      90deg,
      var(--v2-overlay-simple-overlay-contrast-hover) 0%,
      var(--v2-overlay-simple-overlay-contrast-hover) 100%
    ),
    linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
    linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
}

[data-component="button-v2"][data-variant="contrast"]:is(:active, [data-state="pressed"]):not(:disabled) {
  background-image:
    linear-gradient(
      90deg,
      var(--v2-overlay-simple-overlay-contrast-pressed) 0%,
      var(--v2-overlay-simple-overlay-contrast-pressed) 100%
    ),
    linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%),
    linear-gradient(90deg, var(--v2-background-bg-contrast) 0%, var(--v2-background-bg-contrast) 100%);
}

[data-component="button-v2"][data-variant="contrast"]:is(:disabled, [data-state="disabled"]) {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ghost */
[data-component="button-v2"][data-variant="ghost"] {
  background-color: transparent;
  color: var(--v2-text-text-base);
}

[data-component="button-v2"][data-variant="ghost"]:is(:hover, [data-state="hover"]):not(:disabled):not(
    [data-expanded]
  ) {
  background-color: var(--v2-overlay-simple-overlay-hover);
}

[data-component="button-v2"][data-variant="ghost"]:is(:active, [data-state="pressed"]):not(:disabled) {
  background-color: var(--v2-overlay-simple-overlay-pressed);
}

[data-component="button-v2"][data-variant="ghost"]:where([data-expanded]):not(:disabled) {
  background-color: var(--v2-overlay-simple-overlay-pressed);
}

[data-component="button-v2"][data-variant="ghost"]:is(:disabled, [data-state="disabled"]) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Ghost muted */
[data-component="button-v2"][data-variant="ghost-muted"] {
  background-color: transparent;
  color: var(--v2-text-text-muted);
}

[data-component="button-v2"][data-variant="ghost-muted"] [data-slot="icon-svg"] {
  color: var(--v2-icon-icon-muted);
}

[data-component="button-v2"][data-variant="ghost-muted"]:is(:hover, [data-state="hover"]):not(:disabled):not(
    [data-expanded]
  ) {
  background-color: var(--v2-overlay-simple-overlay-hover);
}

[data-component="button-v2"][data-variant="ghost-muted"]:is(:active, [data-state="pressed"]):not(:disabled) {
  background-color: var(--v2-overlay-simple-overlay-pressed);
}

[data-component="button-v2"][data-variant="ghost-muted"]:where([data-expanded]):not(:disabled) {
  background-color: var(--v2-overlay-simple-overlay-pressed);
  color: var(--v2-text-text-base);
}

[data-component="button-v2"][data-variant="ghost-muted"]:where([data-expanded]):not(:disabled) [data-slot="icon-svg"] {
  color: var(--v2-icon-icon-base);
}

[data-component="button-v2"][data-variant="ghost-muted"]:is(:disabled, [data-state="disabled"]) {
  opacity: 0.5;
  cursor: not-allowed;
}
