/* Shared styles for the public-facing pages (landing, /buy, status, claim).
 * Light theme, dark blue accent, mobile-first.
 */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --fg: #0f172a;
  --muted: #64748b;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --accent-soft: #dbeafe;
  --accent-50: #eff6ff;

  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.04), 0 1px 3px 0 rgb(15 23 42 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.05);
  --shadow-lg: 0 20px 25px -5px rgb(15 23 42 / 0.08), 0 8px 10px -6px rgb(15 23 42 / 0.05);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--fg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--surface-2); padding: 0.1rem 0.3rem; border-radius: 0.25rem;
}

/* ---- Widget shared styles ---- */
.widget-test {
  font-size: 0.78rem; color: var(--accent);
  background: var(--accent-50); border: 1px solid var(--accent-soft);
  padding: 0.55rem 0.75rem; border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Category tabs */
.cat-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem; margin-bottom: 1.25rem;
  padding: 0.3rem; background: var(--surface-2);
  border-radius: 0.55rem;
}
.cat-tab {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.7rem 0.4rem;
  border: 0; background: transparent; color: var(--muted);
  border-radius: 0.4rem; cursor: pointer; font-size: 0.85rem;
  font-weight: 500; font-family: inherit;
  transition: all 0.12s;
}
.cat-tab:hover { color: var(--fg); }
.cat-tab[data-active="1"] {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.cat-emoji { font-size: 1.15rem; line-height: 1; }
.cat-label { font-size: 0.78rem; }

/* Currency toggle */
.ccy-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.ccy-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600;
}
.ccy-toggle {
  display: inline-flex; background: var(--surface-2);
  border-radius: 0.45rem; padding: 0.2rem;
}
.ccy-btn {
  padding: 0.4rem 0.85rem; border: 0; background: transparent;
  color: var(--muted); font-weight: 500; cursor: pointer;
  border-radius: 0.32rem; font-size: 0.85rem; font-family: inherit;
  transition: all 0.12s;
}
.ccy-btn[data-active="1"] {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow-sm); font-weight: 600;
}

/* Field labels and inputs */
.field-label {
  display: block; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0.85rem 0 0.4rem;
  font-weight: 600;
}
input.text, select.text {
  width: 100%; padding: 0.7rem 0.9rem;
  border-radius: 0.5rem; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg);
  font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input.text:focus, select.text:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-wrap { position: relative; }
.detect-pill {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 999px;
  pointer-events: none;
}
.product-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; }

/* Pills (network, amount) */
.pill {
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--fg);
  border-radius: 0.5rem; cursor: pointer;
  font-size: 0.92rem; font-weight: 600;
  text-transform: capitalize; transition: all 0.15s ease;
  font-family: inherit;
  min-height: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: -0.01em;
}
.pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.pill[data-active="1"] {
  border-color: var(--accent); background: var(--accent-50);
  color: var(--accent); font-weight: 700;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.net-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-bottom: 0.5rem; }
@media (max-width: 380px) { .net-grid { grid-template-columns: repeat(2, 1fr); } }

/* Amount tiles — bigger, more tappable, two clean rows of 4 */
.amount-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem; margin-bottom: 0.6rem;
}
.amount-grid .pill {
  font-size: 1.05rem; font-weight: 700;
  min-height: 3rem; padding: 0.85rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.amount-grid .pill[data-amount="custom"] {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0;
}
@media (max-width: 380px) {
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
  .amount-grid .pill { font-size: 1rem; min-height: 2.75rem; padding: 0.7rem 0.4rem; }
}

/* Schedule toggle */
.when-toggle {
  display: inline-flex; background: var(--surface-2);
  border-radius: 0.45rem; padding: 0.2rem; margin-bottom: 0.5rem;
}
.when-btn {
  padding: 0.4rem 0.95rem; border: 0; background: transparent;
  color: var(--muted); font-weight: 500; cursor: pointer;
  border-radius: 0.32rem; font-size: 0.85rem; font-family: inherit;
  transition: all 0.12s;
}
.when-btn[data-active="1"] {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.when-input { margin-top: 0.25rem; }

/* Summary + submit */
.summary {
  margin-top: 1.25rem; padding: 0.9rem 1rem;
  background: var(--surface-2); border-radius: 0.6rem;
  font-size: 0.88rem;
}
.summary-row { display: flex; justify-content: space-between; padding: 0.2rem 0; gap: 1rem; }
.summary-row .lbl { color: var(--muted); }
.summary-row span:not(.lbl) { font-weight: 500; text-align: right; }
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.45rem; padding-top: 0.55rem;
  font-weight: 600; font-size: 1rem;
}

.submit {
  width: 100%; padding: 0.95rem;
  background: var(--accent); color: #fff;
  border: 0; border-radius: 0.6rem;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; margin-top: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.15s; font-family: inherit;
}
.submit:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.widget-foot { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 0.85rem; }
.widget-foot a { color: var(--accent); font-weight: 500; }
