/* Mirrors packages/shared/src/tokens.ts — DESIGN.md is the source of truth;
 * keep these in sync by hand, the same rule the shared package's own
 * comment states for itself. The merchant page has no bundler, so it can't
 * import the TS tokens directly. */

:root {
  --sun: #ffc93c;
  --tomato: #f2452f;
  --grape: #5b2ecc;
  --mint: #12c48b;
  --ink: #1b1414;
  --surface: #fffbf0;
  --mute: #6e5230;
  --danger: #f2452f;

  /* Text color for anything on a solid --grape background (the primary
   * button) — its own token rather than reusing --surface, in case a
   * future --surface change shouldn't affect button-on-grape contrast. */
  --on-grape: #fffbf0;

  --outline: 2px;
  --offset: 4px;
  --radius-card: 12px;
  --radius-sheet: 14px;

  --font-display: 'Gabarito', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, sans-serif;
}

/* Deliberately one committed light look, no dark variant — see apps/web's
 * style.css for the same call. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 21px;
}

p {
  margin: 0 0 16px;
  line-height: 1.55;
  color: var(--ink);
}

.mute {
  color: var(--mute);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-sheet);
  box-shadow: var(--offset) var(--offset) 0 0 var(--ink);
  padding: 20px;
}

input[type='text'],
input[type='number'] {
  font-family: var(--font-body);
  font-size: 21px;
  padding: 14px 16px;
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

input[type='text'] {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 17px;
  color: var(--on-grape);
  background: var(--grape);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--offset) var(--offset) 0 0 var(--ink);
  padding: 16px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

button:active,
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.btn-big {
  font-size: 21px;
  padding: 28px 20px;
  width: 100%;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.btn-block {
  width: 100%;
}

nav.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

nav.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  border: var(--outline) solid var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
}

nav.tabs a.active {
  background: var(--ink);
  color: var(--surface);
}

.message {
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  margin-bottom: 16px;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--mint);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(27, 20, 20, 0.12);
}

.row:last-child {
  border-bottom: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

video#camera {
  width: 100%;
  border-radius: var(--radius-sheet);
  border: var(--outline) solid var(--ink);
  background: var(--ink);
}

[hidden] {
  display: none !important;
}
