/* WASH4U pay at the machine — customer page on pay.wash4u.org. Phone first, one centred column on bigger screens.
   Same palette and font as the back office: slate ground, white cards, royal blue; the logo red stays on the logo. */
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/fonts/prompt-400-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/fonts/prompt-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/fonts/prompt-500-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/fonts/prompt-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/fonts/prompt-600-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Prompt'; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/fonts/prompt-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F1F5F9; --surface: #FFFFFF; --surface-2: #F8FAFC; --line: #E2E8F0; --line-soft: #EEF2F6;
  --text: #0F172A; --muted: #64748B; --faint: #94A3B8;
  --accent: #2563EB; --accent-ink: #1D4ED8; --accent-soft: #EEF3FF; --on-accent: #FFFFFF;
  --ok: #16A34A; --ok-soft: #EAF8EF; --warn: #C2410C; --warn-soft: #FFF4EB; --bad: #DC2626; --bad-soft: #FEF1F1;
  --thaiqr: #113566;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 28px rgba(15, 23, 42, .06);
  --r: 20px;
  --font: 'Prompt', 'Sukhumvit Set', 'Thonburi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0A0F1C; --surface: #111827; --surface-2: #0E1524; --line: #1F2A3C; --line-soft: #172133;
  --text: #E6EAF2; --muted: #93A0B4; --faint: #64748B;
  --accent: #5B8DEF; --accent-ink: #8AB0FF; --accent-soft: #16233F;
  --ok: #34C76F; --ok-soft: #0F2A1B; --warn: #F59E5B; --warn-soft: #2E1D10; --bad: #F87171; --bad-soft: #301417;
  --shadow: none; color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background-image: radial-gradient(1200px 420px at 50% -180px, var(--accent-soft), transparent 70%);
  background-repeat: no-repeat;
}
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: 460px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(140px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .wrap { padding-top: 40px; padding-bottom: 60px; } }

.brand { display: flex; align-items: center; gap: 12px; margin: 4px 4px 16px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; object-fit: contain; box-shadow: var(--shadow); }
.brand b { display: block; font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.brand span { display: block; font-size: 12.5px; color: var(--muted); margin-top: -2px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card, .card + .sec, .sec + .card { margin-top: 14px; }
.skel { height: 360px; background: linear-gradient(90deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: sk 1.2s infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* machine */
.mach { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.mach-ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.mach-ic svg { width: 36px; height: 36px; }
.mach small { display: block; font-size: 12.5px; color: var(--muted); }
.mach h1 { font-size: 30px; letter-spacing: -.01em; line-height: 1.1; }
.mach .size { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.ok i { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* program options */
.sec { margin: 22px 6px 10px; display: flex; align-items: baseline; justify-content: space-between; }
.sec h2 { font-size: 15px; }
.sec span { font-size: 12.5px; color: var(--muted); }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 44px 1fr auto 22px; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.opt:active { transform: scale(.99); }
.opt .em { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 21px; }
.opt b { display: block; font-weight: 500; }
.opt small { display: block; font-size: 12px; color: var(--muted); }
.opt .pr { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.opt .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: all .15s; }
.opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt[aria-checked="true"] .em { background: var(--surface); }
.opt[aria-checked="true"] .rd { border-color: var(--accent); background: var(--accent); }
.opt[aria-checked="true"] .rd::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* member */
.member { margin-top: 14px; border: 1px dashed var(--line); border-radius: 16px; padding: 12px 16px; background: var(--surface); }
.member summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.member summary::-webkit-details-marker { display: none; }
.member summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--muted); line-height: 1; }
.member[open] summary::after { content: '–'; }
.member summary .st { font-size: 18px; }
.member .in { margin-top: 10px; display: grid; gap: 6px; }
.member input { height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); padding: 0 14px; font-size: 17px; letter-spacing: .04em; width: 100%; }
.member input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.member .small, .member .opt-note { font-size: 12px; color: var(--muted); }

/* pay bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 5; }
.bar-in { max-width: 460px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.bar .tot small { display: block; font-size: 12px; color: var(--muted); }
.bar .tot b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
@media (min-width: 720px) { .bar { position: static; background: none; backdrop-filter: none; border: 0; padding: 18px 0 0; } .bar-in { max-width: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px; border-radius: 15px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; color: var(--text); transition: filter .15s, transform .1s; width: 100%; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:disabled { background: var(--faint); border-color: var(--faint); box-shadow: none; cursor: not-allowed; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); font-weight: 500; height: 46px; }
.btn.warn { background: #F59E0B; border-color: #F59E0B; color: #1F1300; }
.btn svg { width: 20px; height: 20px; }
.btn.busy { pointer-events: none; filter: saturate(.6) opacity(.8); }
.btns { display: grid; gap: 10px; margin-top: 16px; }
.err { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: 14px; }

/* QR */
.timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.timer b { font-size: 15px; }
.timer .t { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; padding: 3px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.timer .t.low { background: var(--warn-soft); color: var(--warn); }
.prog { height: 4px; border-radius: 4px; background: var(--line-soft); overflow: hidden; margin: -6px 0 16px; }
.prog i { display: block; width: 100%; height: 100%; background: var(--accent); transition: width 1s linear; }
.tqr { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; color: #0F172A; }
.tqr-h { background: var(--thaiqr); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; font-weight: 600; letter-spacing: .06em; font-size: 14px; }
.tqr-h svg { width: 26px; height: 26px; }
.tqr-b { padding: 14px 18px 18px; text-align: center; }
.tqr-b .pp { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--thaiqr); border: 1.5px solid var(--thaiqr); border-radius: 5px; padding: 0 6px; }
.tqr-b img, .tqr-b .qr { display: block; width: min(260px, 72vw); height: auto; aspect-ratio: 1; margin: 10px auto 8px; image-rendering: pixelated; }
.tqr-b .qr svg { width: 100%; height: 100%; }
.tqr-b .amt { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: #F1F5F9; margin-top: 6px; }
.tqr-b .amt span { font-size: 13px; color: #64748B; }
.tqr-b .amt b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tqr-b .for { font-size: 13px; color: #64748B; margin-top: 8px; }
.wait { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.tip { margin-top: 12px; font-size: 12.5px; color: var(--muted); text-align: center; }
.demo { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: 13px; display: grid; gap: 10px; }

/* result */
.done { text-align: center; padding-top: 28px; }
.badge { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; box-shadow: 0 0 0 10px var(--ok-soft); animation: pop .45s cubic-bezier(.2, 1.4, .5, 1); }
.badge svg { width: 44px; height: 44px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .25s forwards; }
.badge.warn { background: #F59E0B; box-shadow: 0 0 0 10px var(--warn-soft); }
.badge.muted { background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 10px var(--line-soft); }
.badge.muted svg, .badge.warn svg { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h1 { font-size: 23px; }
.done .sub { color: var(--muted); margin-top: 4px; }
.rows { margin-top: 18px; border-top: 1px dashed var(--line); text-align: left; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rows span { color: var(--muted); }
.rows b { font-weight: 500; text-align: right; }
.next { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: flex; gap: 12px; align-items: center; text-align: left; font-size: 14.5px; font-weight: 500; }
.next svg { width: 26px; height: 26px; flex: none; }
.next.ok { background: var(--ok-soft); color: var(--ok); }

.state { text-align: center; padding: 30px 22px; }
.state .badge { animation: none; }
.state h1 { font-size: 20px; }
.state p { color: var(--muted); margin-top: 6px; }
.state .until { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; font-variant-numeric: tabular-nums; }

.foot { text-align: center; font-size: 12px; color: var(--faint); margin-top: 22px; }
.foot a { color: var(--muted); }

/* payment method choice */
.opt .em svg { width: 24px; height: 24px; }
.em.pm-qr { color: var(--thaiqr); }
.em.pm-tm { color: #F26B1D; }
.opt.pmo[aria-checked="true"] .em.pm-tm { background: #FFF1E7; }
.btn.primary.tm { background: #F26B1D; border-color: #F26B1D; box-shadow: 0 6px 18px rgba(242, 107, 29, .3); }
.tmc { text-align: center; border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 18px; background: var(--surface-2); }
.tmc-ic { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 22px; display: grid; place-items: center; background: #F26B1D; color: #fff; }
.tmc-ic svg { width: 40px; height: 40px; }
.tmc > b { font-size: 17px; }
.tmc .amt { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--surface); margin-top: 14px; }
.tmc .amt span { font-size: 13px; color: var(--muted); }
.tmc .amt b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tmc .for { font-size: 13px; color: var(--muted); margin-top: 8px; }
.tqr-b img { -webkit-touch-callout: default; user-select: auto; }

/* extra dry time */
.card.extinfo { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-soft); border-color: transparent; box-shadow: none; padding: 14px 16px; }
.extinfo > svg { width: 22px; height: 22px; flex: none; color: var(--warn); margin-top: 2px; }
.extinfo b { display: block; font-weight: 600; color: var(--warn); }
.extinfo span { font-size: 13px; color: var(--muted); }
