/* Vanilla buttons: the Standalone and Grouped buttons, light and dark.
   Plain CSS on a native <button> or <a>, so forms, disabled and keyboard work as usual.

     <button class="vn-button vn-button--standalone">Continue</button>          44px pill, the main action
     <button class="vn-button vn-button--grouped vn-button--sm">Send</button>    36px, row actions
     <button class="vn-button vn-button--grouped vn-button--chip">New</button>    small pill
     <button class="vn-button vn-button--grouped vn-button--circle">+</button>    circle
     <button class="vn-button vn-button--grouped vn-button--rect">Done</button>   12px corners

   Standalone is solid ink in light and solid white in dark. Grouped has the field fill (--vn-color-field, a touch off the page) and a neutral hairline. Hovered, pressed, selected and focused look the same: the hairline and text turn the accent. The colours are role tokens (--vn-color-ink and --vn-color-bg for Standalone,
   --vn-color-surface, --vn-shadow-xs) that any element can use. Dark follows <html data-scheme="dark">
   (Vanilla) or <html data-theme="dark">. */

/* Role tokens, shared with tokens.css (same names, same values) so this file also works on its own. */
:root {
  --vn-color-surface: #fefdf9;
  --vn-color-surface-active: #f1f0ed;
  --vn-color-on-surface: #2a2c31;
  --vn-color-outline: #c9c9c6;
  --vn-color-line-active: #898a8a;
  --vn-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --vn-disabled: 0.45;
}
html[data-scheme="dark"],
html[data-theme="dark"] {
  --vn-color-surface: #1f1d1b;
  --vn-color-surface-active: #302e2c;
  --vn-color-on-surface: #f1efed;
  --vn-color-outline: #5a5856;
  --vn-color-line-active: #757372;
  --vn-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.vn-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 44px;
  padding: 0 26px;
  border: 1px solid var(--_line);
  border-radius: 999px;
  font: var(--_weight) 16px/1 Inter, "General Sans", system-ui, sans-serif;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  color: var(--_text);
  background: var(--_fill);
  box-shadow: var(--_shadow);
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, color .18s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1); /* the lift overshoots a little: a bounce */
}
/* Hover: the pointer cursor, and the button lifts 2px with a small bounce; colours stay.
   Pressed, selected (aria-pressed) and focused: the 1px border and the text turn the accent; the fill never changes.
   Standalone (no border) opts out of that below. */
.vn-button:hover:not(:disabled):not([aria-disabled="true"]),
.vn-button[data-state="hover"] { cursor: pointer; transform: translateY(-2px); }
.vn-button:active:not(:disabled):not([aria-disabled="true"]),
.vn-button:focus:not(:disabled),
.vn-button[aria-pressed="true"],
.vn-button[data-state="press"],
.vn-button[data-state="focus"] { border-color: var(--vn-color-accent, #1976d2); color: var(--vn-color-accent, #1976d2); }
.vn-button:focus { outline: none; }
.vn-button:disabled, .vn-button[aria-disabled="true"] { opacity: var(--vn-disabled); cursor: default; transform: none; }

/* Standalone: solid ink (black in light, white in dark), no border. */
.vn-button--standalone {
  --_fill: var(--vn-color-ink, #111111); --_text: var(--vn-color-bg, #ffffff); --_line: transparent;
  --_shadow: var(--vn-shadow-xs);
  --_weight: 500;
  border: 0;
}
html[data-scheme="dark"] .vn-button--standalone,
html[data-theme="dark"] .vn-button--standalone {
  --_fill: var(--vn-color-ink, #ffffff); --_text: var(--vn-color-bg, #111111);
}
/* Standalone keeps its colours on press, focus and selected (it still lifts on hover). */
.vn-button--standalone:active:not(:disabled):not([aria-disabled="true"]),
.vn-button--standalone:focus:not(:disabled),
.vn-button--standalone[aria-pressed="true"],
.vn-button--standalone[data-state="press"],
.vn-button--standalone[data-state="focus"] { color: var(--_text); }

/* Grouped: the field fill, the same as fields and the pager, and a neutral hairline. */
.vn-button--grouped {
  --_fill: var(--vn-color-field, #fffefc); --_text: var(--vn-color-on-surface); --_line: var(--vn-color-line, #e0dfdc); /* the docs search box's border */
  --_shadow: none; /* flat, like the search box */
  --_weight: 400;
}
/* Shapes. The default button is a pill. */
.vn-button--pill { border-radius: 999px; }
.vn-button--chip { min-width: 0; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; letter-spacing: -0.01em; }
.vn-button--circle { min-width: 0; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
/* A rounded rectangle (12px, like the popup's fields). */
.vn-button--rect { border-radius: 12px; }
/* Row actions (Send, Receive, Export key, Open). */
.vn-button--sm { min-width: 0; height: 36px; padding: 0 18px; font-size: 14px; letter-spacing: -0.01em; }
@media (prefers-reduced-motion: reduce) { .vn-button { transition: none; } .vn-button:hover, .vn-button[data-state="hover"], .vn-button:active { transform: none; } }
