/* Real customer-facing order page — CSS ported near-verbatim from the "Londris
   Touch" Artifact mockup (phone-frame chrome removed; this page IS the real
   device screen, so .phone-screen fills the real viewport with safe-area
   insets instead of simulating a bezel/notch/statusbar). */

:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-alt: #f1f4f8;
  --ink: #16212e;
  --ink-muted: #5c6b7f;
  --ink-faint: #8b96a6;
  --border: #e0e6ee;
  --accent: #1273ce;
  --accent-ink: #ffffff;
  --accent-soft: #e6f1fb;
  --accent-soft-border: #bcdcf6;
  --success: #1c9463;
  --success-soft: #e3f6ec;
  --danger: #cf3f38;
  --danger-soft: #fbeae9;
  --brand-green: #45b649;
  --brand-yellow: #feea2c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1319;
    --surface: #161f29;
    --surface-alt: #1c2733;
    --ink: #ecf1f6;
    --ink-muted: #93a2b4;
    --ink-faint: #64738a;
    --border: #263241;
    --accent: #4b9fe6;
    --accent-ink: #06121e;
    --accent-soft: #16283a;
    --accent-soft-border: #2b4d6e;
    --success: #3ecb92;
    --success-soft: #123626;
    --danger: #ef6a63;
    --danger-soft: #3a1917;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

.phone-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.screen { display: none; flex-direction: column; flex: 1; animation: rise .28s ease; }
.screen.visible { display: flex; }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

.screen-body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 20px 10px; }

.loc-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink-muted);
  background: var(--surface-alt); border-radius: 999px;
  padding: 5px 10px 5px 8px; margin-bottom: 10px;
}

.machine-hero { display: flex; align-items: center; gap: 10px; margin-top: 8px; margin-bottom: 48px; }
.machine-hero-icon { width: 41px; height: 41px; color: var(--brand-green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.machine-hero-icon img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.machine-hero-number {
  font-weight: 800; font-size: 54px;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums; line-height: 1;
}

.temp-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 24px; }
.option-row {
  display: flex; align-items: center; gap: 13px;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 13px; padding: 10px 16px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option-row:hover { border-color: var(--accent-soft-border); }
.option-row.checked { border-color: var(--accent); background: var(--accent-soft); }
.checkbox {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
  flex-shrink: 0; display: grid; place-items: center; color: var(--accent-ink);
  transition: border-color .15s ease, background .15s ease;
}
.option-row.checked .checkbox { border-color: var(--accent); background: var(--accent); }
.checkbox svg { width: 12px; height: 12px; opacity: 0; transition: opacity .1s ease; }
.option-row.checked .checkbox svg { opacity: 1; }
.option-icon { width: 25px; height: 25px; flex-shrink: 0; display: grid; place-items: center; color: var(--ink-muted); }
.option-icon svg { width: 100%; height: 100%; }
.option-row.checked .option-icon { color: var(--accent); }
.option-label { font-size: 15px; font-weight: 600; flex: 1; }
.option-star-text {
  color: #6b4f00; background: var(--brand-yellow); font-size: 11px; font-weight: 800;
  letter-spacing: .04em; line-height: 1; border-radius: 999px; padding: 4px 9px; margin-left: auto;
}

.option-cards { display: flex; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.option-card {
  position: relative; flex: 0 0 calc(50% - 5px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 16px; padding: 14px 8px 12px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option-card:hover { border-color: var(--accent-soft-border); }
.option-card.checked { border-color: var(--accent); background: var(--accent-soft); }
.option-card.locked { cursor: default; }
.option-card-icon { width: 64px; height: 64px; flex-shrink: 0; color: var(--ink-muted); }
.option-card-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.option-card.checked .option-card-icon { color: var(--accent); }
.option-card-check {
  position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border); color: var(--surface);
  display: grid; place-items: center;
  transition: border-color .12s ease, background .12s ease;
}
.option-card-check svg { width: 11px; height: 11px; opacity: 0; transition: opacity .1s ease; }
.option-card.checked .option-card-check { border-color: var(--accent); background: var(--accent); }
.option-card.checked .option-card-check svg { opacity: 1; }

.sticky-cta { padding: 12px 20px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
#select-pay-btn-wrap { transform: translateY(-16px); }

.program-meta { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 32px; transform: translateY(10px); }
.program-meta-item { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--ink); }
.program-meta-item svg { width: 18px; height: 18px; color: var(--ink-muted); flex-shrink: 0; }
.program-meta-price { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

.btn {
  width: 100%; border: none; border-radius: 14px; padding: 15px;
  font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: rgb(18,183,106); color: #fff; }
.btn-primary svg { width: 28px; height: 28px; flex-shrink: 0; }

.center-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 30px; gap: 6px; }
.state-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; margin-bottom: 16px; }
.state-icon.ok { background: var(--success-soft); color: var(--success); }
.state-icon.err { background: var(--danger-soft); color: var(--danger); }
.error-text { color: var(--ink-muted); font-size: 15px; line-height: 1.5; max-width: 32ch; }

.washer-anim { display: block; position: relative; width: 250px; height: 280px; margin-bottom: 4px; }
.wm-photo-wrap { position: relative; margin: 0 auto; height: 260px; width: calc(260px * 227 / 300); }
.wm-photo-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.success-machine-number {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 800; font-size: 76px; line-height: 1;
  letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin: 0 0 18px;
}
.success-visual { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 4px; }
.success-chip { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); border: 1.5px solid var(--border); color: var(--ink-muted); }
.success-chip svg { width: 26px; height: 26px; }
.success-chip.temp { color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 16px; font-weight: 700; border: none; }
