/* SendThePix customer upload page.
   Mobile-first: most customers are on a phone. Touch targets >= 48px.
   BRANDING: the custom properties below are the whole theme — swap these
   values (and the logo in index.html) to restyle the page. */

:root {
  --brand: #1c3f5e;
  --brand-dark: #14304a;
  --accent: #e8873a;
  --ink: #1a1a1a;
  --ink-soft: #5b6672;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #dde3e9;
  --error: #b3261e;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* ---------- header ---------- */

.site-header {
  background: var(--brand);
  color: #fff;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-top));
  text-align: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.tagline {
  margin: .35rem 0 0;
  font-size: .95rem;
  opacity: .85;
}

/* ---------- steps ---------- */

.step { padding-top: 1.25rem; }

.how-it-works {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.how-it-works li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .95rem;
  color: var(--ink-soft);
}

.num {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Uppy's Dashboard sits in a card so it reads as part of the page */
#uppy .uppy-Dashboard-inner {
  border-radius: var(--radius);
  border-color: var(--line);
}

.reassure,
.hint {
  font-size: .875rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.reassure { margin: 1rem 0 0; }
.hint { margin: .6rem 0 0; text-align: center; }

/* ---------- buttons ---------- */

button {
  font-family: inherit;
  font-size: 1.05rem;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 52px;
  width: 100%;
  margin-top: 1rem;
  border: 1px solid transparent;
}

.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.primary:disabled {
  background: #cfd6dd;
  color: #8b97a3;
  cursor: default;
}

.secondary {
  background: var(--card);
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 600;
}

.linkish {
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: .95rem;
  min-height: 44px;
}

/* ---------- "add more?" dialog ---------- */

#more-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  width: min(92vw, 26rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  color: var(--ink);
}

#more-dialog::backdrop {
  background: rgba(16, 26, 36, .55);
}

.dialog-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.dialog-body {
  margin: .5rem 0 .25rem;
  text-align: center;
  color: var(--ink-soft);
}

.dialog-countdown {
  margin: .9rem 0 0;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

/* Order matters on a phone: the likely answer ("no, I'm done") sits closest
   to the thumb, but "yes" stays first in the DOM so it takes initial focus
   rather than the destructive-to-flow option. */
#more-dialog button { margin-top: .75rem; width: 100%; }

/* ---------- the code ---------- */

.code-lead {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin: .5rem 0 1rem;
}

.code-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
}

.code-label {
  margin: 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
}

/* Monospace so O/0-style confusion can't creep back in visually, even though
   the alphabet already excludes ambiguous characters. */
.code {
  margin: .5rem 0 .25rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(2.75rem, 18vw, 4rem);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--brand-dark);
}

.code-expiry {
  margin: 0;
  font-size: .875rem;
  color: var(--ink-soft);
}

.code-instructions {
  margin: 1.25rem 0 0;
  text-align: center;
  line-height: 1.5;
}

/* ---------- error ---------- */

.error-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--error);
  text-align: center;
  margin: 1rem 0 .5rem;
}

.error-detail {
  text-align: center;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 0 1rem calc(2rem + env(safe-area-inset-bottom));
  font-size: .8rem;
  color: var(--ink-soft);
}

@media (min-width: 700px) {
  button { width: auto; min-width: 220px; display: block; margin-inline: auto; }
}
