/* van de index */



/* ── Light theme (default) ── */
:root {
  color-scheme: light;
  --bg:           #ffffff;
  --panel:        #f2f2f7;
  --line:         rgba(0,0,0,0.08);
  --text:         #000000;
  --text-muted:   #8a8a8e;
  --accent:       #20c56c;
  --accent-dark:  #1aaa5c;
  --num-active:   rgba(0,0,0,0.07);
  --token-bg:     #f2f2f7;
  --max-bg:       #e5e5ea;
  --max-text:     #000000;
  --to-bg:        #f2f2f7;
  --review-bg:    #e5e5ea;
  --review-text:  #8a8a8e;
}

/* ── Dark theme ── */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg:           #131313;
    --panel:        #1b1b1d;
    --line:         rgba(255,255,255,0.07);
    --text:         #ffffff;
    --text-muted:   #8c8c91;
    --accent:       #20c56c;
    --accent-dark:  #43b571;
    --num-active:   rgba(255,255,255,0.08);
    --token-bg:     #232326;
    --max-bg:       #2d2d31;
    --max-text:     #ffffff;
    --to-bg:        #1b1b1d;
    --review-bg:    #2d2d31;
    --review-text:  #7c7c80;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button { border: 0; cursor: pointer; font: inherit; background: transparent; color: inherit; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: var(--bg);
}

.phone-frame {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  flex-shrink: 0;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-spacer { width: 36px; }

.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--panel);
  display: grid; place-items: center;
  transition: background 160ms;
}
.back-btn:active { background: var(--num-active); }
.back-btn svg { width: 20px; height: 20px; }

/* ── To row ── */
.to-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 16px 0;
  padding: 12px 16px;
  background: var(--to-bg);
  border-radius: 14px;
}

.to-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

.to-address {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
}

/* ── Amount display ── */
.amount-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 140px;
  gap: 10px;
}

.amount-primary {
  font-size: 68px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  transition: font-size 150ms ease;
}
.amount-primary.small  { font-size: 44px; }
.amount-primary.xsmall { font-size: 30px; }

/* currency-usd is used by main.js */
.currency-usd {
  font-size: 15px;
  color: var(--text-muted);
}

/* ── Token row ── */
.token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 16px;
}

.token-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--token-bg);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
}

.token-logo {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: contain;
}

.token-balance {
  font-size: 14px;
  font-weight: 600;
}

/* Max button — main.js finds button with text "Max" */
.max-pill {
  background: var(--max-bg);
  color: var(--max-text);
  font-size: 15px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 999px;
  transition: opacity 160ms;
}
.max-pill:active { opacity: 0.7; }

/* ── Numpad ── */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 8px;
}

.num-key {
  height: 72px;
  font-size: 28px;
  font-weight: 400;
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: background 100ms;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.num-key:active { background: var(--num-active); }

.num-delete svg {
  width: 22px; height: 22px;
}

/* ── Footer ── */
.footer {
  padding: 12px 16px 100px;
  flex-shrink: 0;
}

/* next-btn is used by main.js */
.next-btn {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  background: var(--review-bg);
  color: var(--review-text);
  transition: background 160ms, color 160ms;
  letter-spacing: -0.01em;
}
.next-btn:not(:disabled) {
  background: var(--accent);
  color: #08130c;
}
.next-btn:not(:disabled):active { background: var(--accent-dark); }
.next-btn:disabled { cursor: not-allowed; }

/* ── Notification bar (created by main.js) ── */
#notify-bar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 260px;
  max-width: 90vw;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  transition: opacity 300ms ease;
  color: #fff;
  pointer-events: none;
  opacity: 0;
}

/* ── Spinner (used by main.js button states) ── */
.spinner {
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 380px) {
  .amount-primary { font-size: 52px; }
  .num-key { height: 64px; font-size: 24px; }
}