:root {
  --bg: #000000;
  --bg-elev: #0D0D0D;
  --ink: #FFFFFF;
  --ink-dim: #A3A3A3;
  --ink-faint: #666666;
  --accent: #D41820;
  --accent-dim: #7A0F14;
  --ready: #FFFFFF;
  --line: #262626;
  --line-dashed: #333333;

  /* Traffic-light stage colours for the progress bar + active step. */
  --stage-received: #D41820;
  --stage-preparing: #F5B700;
  --stage-ready: #2ECC71;
  --stage-completed: #2ECC71;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  padding: 32px 20px 40px;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 460px;
}

/* ---------- Brand header ---------- */
.brand {
  text-align: center;
  margin-bottom: 36px;
}

.brand-logo {
  width: 190px;
  max-width: 60%;
  height: auto;
  margin: 0 auto 10px;
  display: block;
}

.brand-tagline {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 12px;
}

.brand-socials {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

.socials-sep {
  margin: 0 8px;
  color: var(--ink-faint);
}

/* ---------- Ticket ---------- */
.ticket {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 26px;
  position: relative;
}

.ticket-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.ticket-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 26px;
  letter-spacing: 0.01em;
}

/* ---------- Status block ---------- */
.status-block {
  padding: 22px 0;
  border-top: 1px dashed var(--line-dashed);
  border-bottom: 1px dashed var(--line-dashed);
  margin-bottom: 22px;
}

.status-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.status-label.ready {
  color: var(--ready);
}

/* Progress bar — single bar again; the fill colour shifts through the
   red / yellow / green / green sequence to match the current step. */
.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--stage-received);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}

.progress-fill.stage-received { background: var(--stage-received); }
.progress-fill.stage-preparing { background: var(--stage-preparing); }
.progress-fill.stage-ready { background: var(--stage-ready); }
.progress-fill.stage-completed { background: var(--stage-completed); }

/* Steps list */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.steps li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}

.steps li.done {
  color: var(--ink-dim);
}
.steps li.done::before {
  background: var(--ink-faint);
}

.steps li.current {
  color: var(--ink);
  font-weight: 600;
}
.steps li.current::before {
  background: var(--ink);
}

/* Active step colour follows the same red / yellow / green / green
   sequence as the progress bar above it. */
.steps li.current.stage-received {
  color: var(--stage-received);
}
.steps li.current.stage-received::before {
  background: var(--stage-received);
}

.steps li.current.stage-preparing {
  color: var(--stage-preparing);
}
.steps li.current.stage-preparing::before {
  background: var(--stage-preparing);
}

.steps li.current.stage-ready,
.steps li.current.stage-completed {
  color: var(--stage-ready);
}
.steps li.current.stage-ready::before,
.steps li.current.stage-completed::before {
  background: var(--stage-ready);
}

/* ---------- Items ---------- */
.items-block {
  margin-bottom: 6px;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.items li {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}

.items .qty {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--accent);
  min-width: 26px;
  flex-shrink: 0;
}

.items .modifiers {
  color: var(--ink-dim);
  font-size: 12px;
  margin-left: 6px;
}

/* ---------- Meta ---------- */
.updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 22px 0 0;
  text-align: right;
}

/* ---------- Queue block ---------- */
.queue-block {
  border-top: 1px dashed var(--line-dashed);
  padding-top: 18px;
  margin-bottom: 4px;
}
.queue-main {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.queue-figure, .queue-estimate {
  flex: 1;
  background: #141414;
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.queue-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.queue-caption {
  font-size: 11px;
  color: var(--ink-dim);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.queue-est-label {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.queue-est-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.queue-header {
  font-size: 12px;
  color: var(--ink-dim);
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.5;
  font-style: italic;
}
.queue-figure.next-up .queue-number {
  font-size: 20px;
}
.queue-figure.preparing-now .queue-number {
  font-size: 15px;
}

/* ---------- Payment banner ---------- */
.payment-banner {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
}
.payment-banner.pending {
  background: rgba(212, 24, 32, 0.12);
  color: var(--accent);
  border: 1px solid rgba(212, 24, 32, 0.35);
}
.payment-banner.paid {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ready);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Fulfillment details ---------- */
.fulfillment-block {
  border-top: 1px dashed var(--line-dashed);
  padding-top: 16px;
  margin-top: 14px;
}
.fulfillment-details {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.7;
}
.fulfillment-details strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- WhatsApp notify button ---------- */
/* Temporarily unused — business WhatsApp number not set up yet.
   Markup is commented out in track.html; styles kept for when it's re-enabled. */
.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 14px 16px;
  background: #25D366;
  color: #0A2A16;
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.1s ease, background 0.15s ease;
}
.whatsapp-btn:hover { background: #20BD5A; }
.whatsapp-btn:active { transform: scale(0.98); }
.whatsapp-btn svg { flex-shrink: 0; }

/* When the order is already ready/completed, the button is less relevant —
   soften it so it doesn't compete with the "ready" message. */
.whatsapp-btn.muted {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
}
.whatsapp-btn.muted:hover { background: var(--bg-elev); }

/* ---------- Emotional check-in ---------- */
/* Deliberately quiet. Steps fade in one at a time (progressive disclosure);
   transitions are slow on purpose — nothing here should feel like a survey. */
.checkin {
  border-top: 1px dashed var(--line-dashed);
  margin-top: 22px;
  padding-top: 26px;
}

.checkin-step {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.checkin-step.in {
  opacity: 1;
  transform: translateY(0);
}

.checkin-prompt {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 0 0 18px;
  text-align: center;
  font-style: italic;
  min-height: 48px; /* two lines — stops the chips shifting as prompts rotate */
  transition: opacity 0.6s ease;
}
.checkin-prompt.swap {
  opacity: 0;
}

/* Equal-width chips so the rows wrap evenly (4+3 on a full-width card,
   3+3+1 on narrow phones) instead of packing unevenly onto the top row.
   justify-content: center keeps every row — including a short last one —
   balanced under the ones above. */
.checkin-moods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mood-chip {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 84px;
  padding: 8px 0;
  text-align: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease, background 0.5s ease;
}
.mood-chip:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}
.mood-chip.selected {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.checkin-step + .checkin-step {
  margin-top: 22px;
}

.checkin-text {
  width: 100%;
  background: #0A0A0A;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
  min-height: 96px;
  outline: none;
  transition: border-color 0.5s ease;
}
.checkin-text:focus {
  border-color: var(--ink-faint);
}
.checkin-text::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.checkin-helper {
  font-size: 11px;
  color: var(--ink-faint);
  margin: 8px 2px 0;
  line-height: 1.5;
}

.checkin-initials-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.checkin-optional {
  text-transform: none;
  letter-spacing: 0.05em;
}

.checkin-initials {
  width: 90px;
  background: #0A0A0A;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color 0.5s ease;
}
.checkin-initials:focus {
  border-color: var(--ink-faint);
}

.checkin-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  cursor: pointer;
}
.checkin-consent input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.checkin-consent span {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.6;
}

.checkin-submit {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-faint);
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.5s ease, border-color 0.5s ease, opacity 0.5s ease;
}
.checkin-submit:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ink);
}
.checkin-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.checkin-inner {
  transition: opacity 0.9s ease;
}
.checkin-inner.fading {
  opacity: 0;
}

.checkin-closing {
  opacity: 0;
  transition: opacity 1.2s ease;
}
.checkin-closing.in {
  opacity: 1;
}
.checkin-closing-line {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 15px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.7;
  text-align: center;
  margin: 0;
}
.checkin-closing-help {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
  text-align: center;
  margin: 16px 0 0;
  white-space: pre-line; /* keeps the helpline number on its own unbroken line */
}

/* ---------- TikTok follow CTA ---------- */
.tiktok-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.1s ease, background 0.15s ease;
}
.tiktok-btn:hover { background: #B5121A; }
.tiktok-btn:active { transform: scale(0.98); }
.tiktok-btn svg { flex-shrink: 0; }

.footnote {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  font-style: italic;
  margin-top: 24px;
  letter-spacing: 0.02em;
}

/* ---------- Not found state ---------- */
.status-label.not-found {
  color: var(--ink-dim);
  font-weight: 500;
  font-size: 16px;
}

@media (max-width: 400px) {
  .ticket { padding: 24px 20px 22px; }
  .ticket-id { font-size: 28px; }
}
