/* Printsy customer app — built from the Printsy interface guide.
   Magenta = primary action, Deep navy = text & icons, Yellow = attention & accents, White = surfaces. */
:root {
  color-scheme: light;
  --magenta: #E600AC; --magenta-pressed: #AE0082;
  /* shop-customisable (set by theme.js) */
  --primary: #E600AC; --primary-pressed: #AE0082; --on-primary: #101C26; --on-pressed: #FFFFFF;
  --accent: #FFD500; --on-accent: #101C26;
  --navy: #101C26; --yellow: #FFD500; --white: #FFFFFF;
  --page: #F4F5F6; --line: #E5E9EC; --muted: #5C6870;
  --disabled-bg: #E5E9EC; --disabled-ink: #5C6870;
  --ok-bg: #E7F4EE; --ok-ink: #0E6B3B; --warn-bg: #FFF6CC; --bad-bg: #FDECEC; --bad-ink: #B42318;
  --radius: 12px; --card-radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--page); color: var(--navy); font: 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--navy); }

/* icons: 24px outline, 2px stroke */
.i { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
.i.sm { width: 20px; height: 20px; }

/* app bar */
.appbar { background: var(--navy); color: var(--white); }
.appbar .in { max-width: 560px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.tile { width: 44px; height: 44px; border-radius: 12px; background: var(--white); display: grid; place-items: center; flex: none; overflow: hidden; }
.tile img { width: 100%; height: 100%; display: block; }
.tile.shop { width: auto; min-width: 44px; max-width: 132px; padding: 4px 8px; }
.tile.shop img { width: auto; max-width: 116px; height: 36px; object-fit: contain; }
.brand { font-weight: 800; font-size: 22px; letter-spacing: -.01em; line-height: 1.1; }
.appbar .sub { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 2px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 32px; }
h1 { font-size: 24px; line-height: 1.2; margin: 6px 0 14px; font-weight: 800; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px; margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin: 0 0 12px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 14px; font-weight: 800; flex: none; }
.label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.label:first-child { margin-top: 0; }
.label .i { width: 20px; height: 20px; }
.hint { color: var(--muted); font-size: 14px; }

/* buttons: 48px high, 12px radius, 16px semibold */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: var(--radius); border: 1.5px solid transparent; font: 600 16px/1 var(--font); cursor: pointer;
  text-decoration: none; -webkit-tap-highlight-color: transparent; user-select: none; }
.btn.block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:active, .btn-primary.pressed { background: var(--primary-pressed); color: var(--on-pressed); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-secondary:active { background: var(--page); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-ink); border-color: transparent; cursor: default; }
.btn-icon { width: 48px; padding: 0; background: var(--white); border-color: var(--line); color: var(--navy); }
:where(button, a, input, summary, label.drop):focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--navy); }

/* choice buttons (colour mode etc.): selected = navy with a check */
.choices { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.choices.wrap4 { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
.choice { min-height: 48px; border-radius: var(--radius); border: 1.5px solid var(--navy); background: var(--white); color: var(--navy);
  font: 600 16px/1.1 var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 6px 8px; }
.choice .i { width: 20px; height: 20px; display: none; }
.choice.on { background: var(--navy); color: var(--white); }
.choice:disabled { opacity: .4; cursor: not-allowed; border-style: dashed; }
.choice.on .i { display: inline-block; }
.choice small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }

/* copies stepper: separate tiles, minus disabled at 1 */
.stepper { display: flex; gap: 8px; align-items: center; }
.stepper .num { width: 56px; height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.stepper .btn-icon:disabled { background: var(--page); color: #A9B1B8; border-color: var(--line); }

/* upload zone */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #C9D0D6; border-radius: var(--card-radius);
  padding: 24px 16px; text-align: center; cursor: pointer; background: var(--white); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .big { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.drop strong { font-size: 17px; }
.filerow { display: flex; align-items: center; gap: 12px; }
.filerow .ficon { width: 48px; height: 48px; border-radius: 12px; background: var(--page); display: grid; place-items: center; flex: none; }
.filerow .meta { flex: 1; min-width: 0; }
.filerow .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* job feedback: icon + title + text */
.notice { display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.notice .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 15px; }
.notice .dot .i { width: 16px; height: 16px; stroke-width: 3; }
.notice b { display: block; font-size: 16px; }
.notice span { font-size: 14px; }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); } .notice.ok .dot { background: var(--ok-ink); color: var(--white); }
.notice.warn { background: var(--warn-bg); color: var(--navy); } .notice.warn .dot { background: var(--yellow); color: var(--navy); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); } .notice.bad .dot { background: var(--bad-ink); color: var(--white); }
.notice.info { background: var(--page); color: var(--navy); } .notice.info .dot { background: var(--navy); color: var(--white); }

/* inputs */
input[type=text] { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--navy); font: 16px var(--font); }
input[type=text]:focus { outline: none; border-color: var(--navy); }
details summary { cursor: pointer; font-weight: 700; margin-top: 18px; display: flex; align-items: center; gap: 8px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary .i { transition: transform .15s; width: 20px; height: 20px; }
details[open] summary .i { transform: rotate(90deg); }

/* total + submit */
.total { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.total .amount { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.err { color: var(--bad-ink); font-size: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 12px; display: none; }
.bar > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }

/* tracking */
.ordernum { text-align: center; }
.ordernum .big { font-size: 60px; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 6px 0 2px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 4px; position: relative; }
.progress::before { content: ""; position: absolute; top: 15px; left: 12.5%; right: 12.5%; height: 3px; background: var(--line); }
.progress .bar2 { position: absolute; top: 15px; left: 12.5%; height: 3px; background: var(--primary); transition: width .3s; }
.pstep { position: relative; text-align: center; font-size: 13px; color: var(--muted); }
.pstep i { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 50%; background: var(--white);
  border: 3px solid var(--line); font-style: normal; font-weight: 800; font-size: 13px; color: var(--muted); }
.pstep.on { color: var(--navy); font-weight: 700; }
.pstep.on i { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 0; font-size: 15px; }
dl.kv dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
dl.kv dt .i { width: 18px; height: 18px; }
dl.kv dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); } .badge.warn { background: var(--warn-bg); color: var(--navy); }

/* tick boxes (receipt, terms) */
.tick { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.tick input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.tick b { display: block; font-size: 15px; } .tick small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tick a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tick:has(input:checked) { border-color: var(--navy); }
.tick.terms:has(input:not(:checked)) { border-style: dashed; }

/* terms page */
.terms h1 { margin-bottom: 4px; }
.terms .card h2 { font-size: 17px; margin: 18px 0 6px; } .terms .card h2:first-child { margin-top: 0; }
.terms .card p, .terms .card li { font-size: 15px; line-height: 1.55; } .terms .card ul { padding-left: 20px; margin: 6px 0; }
.terms .card li { margin-bottom: 4px; }

/* tracking page file list */
.tfiles { margin: 0; padding-left: 18px; text-align: left; font-weight: 600; }
.tfiles li { margin: 0 0 4px; overflow-wrap: anywhere; }
.tfiles small { color: var(--muted); font-weight: 500; margin-left: 6px; white-space: nowrap; }

/* multi-file list */
.ftotal { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.flist { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.fitem { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 6px; background: var(--white); }
.fitem.on { border-color: var(--navy); }
.fitem.bad { border-color: var(--bad-ink); background: var(--bad-bg); }
.fnum { width: 26px; height: 26px; border-radius: 8px; background: var(--page); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.fitem.on .fnum { background: var(--navy); color: var(--white); }
.fmain { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 2px; font: inherit; color: inherit; cursor: pointer; display: grid; }
.fmain .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmain .hint { font-size: 13px; }
.fbtn { width: 36px; height: 36px; flex: none; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--navy);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.fbtn .i { width: 18px; height: 18px; }
.fbtn[data-act="up"] .i { transform: rotate(90deg); } .fbtn[data-act="down"] .i { transform: rotate(-90deg); }
.fbtn[data-act="remove"] { color: var(--bad-ink); }
.fbtn:disabled { opacity: .35; cursor: default; }
label.btn { cursor: pointer; }

/* preview */
.pvbox { margin-top: 14px; border: 1.5px solid var(--line); border-radius: var(--card-radius); overflow: hidden; background: var(--page); }
.pvhead { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 10px 12px; background: var(--white); border-bottom: 1px solid var(--line); }
.pvname { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pvhead .hint { white-space: nowrap; }
.pvstage { position: relative; display: grid; place-items: center; padding: 12px; min-height: 220px; }
.pvstage canvas { background: var(--white); box-shadow: 0 2px 10px rgba(16,28,38,.15); border-radius: 2px; max-width: 100%; }
.pvmsg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 14px; }
.pvnav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 12px 12px; }
.pvcount { font-weight: 700; min-width: 110px; text-align: center; }
.pvfiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.pvfiles .btn { padding: 0 8px; font-size: 14px; gap: 6px; white-space: nowrap; }
.pvfiles .btn .i { width: 18px; height: 18px; }
.btn-icon:disabled { background: var(--page); color: #A9B1B8; border-color: var(--line); cursor: default; }

/* price card (top of upload page) */
.prices { background: var(--white); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 8px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 8px; margin-bottom: 6px; }
.pcol { display: grid; gap: 4px; min-width: 0; }
.pcol + .pcol { border-left: 1px solid var(--line); padding-left: 8px; }
.prow { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 3px; padding: 6px 8px; border-radius: 10px; font-size: 13px; min-width: 0; }
.prow span { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow span .i { width: 14px; height: 14px; color: var(--primary); }
.prow b { font-size: 15px; font-weight: 800; }
.prow small { color: var(--muted); font-size: 11px; }
.prow.on { background: var(--warn-bg); box-shadow: inset 0 0 0 1.5px var(--yellow); }
.pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pdot.bw { background: var(--navy); } .pdot.c { background: var(--magenta); }
.pfoot { grid-column: 1 / -1; color: var(--muted); font-size: 12px; padding: 2px 8px 0; }
/* Bulk prices "?" with a small pop-up (tap, click or hover) */
.bulkq { position: relative; }
.qbtn { background: none; border: 0; padding: 2px 0; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.qbtn .qi { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.qbtn:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; border-radius: 4px; }
.qtip { position: absolute; left: 8px; right: 8px; top: calc(100% + 6px); z-index: 20; background: var(--navy); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.45;
  padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 28, 38, .25); max-width: 340px; }
.qtip::before { content: ''; position: absolute; left: 14px; top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--navy); }
@media (max-width: 360px) { .prices { grid-template-columns: 1fr; } .pcol + .pcol { border-left: 0; padding-left: 0; } }
.notice .dot .i { color: currentColor; }

footer.pb { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
footer.pb img { height: 22px; vertical-align: middle; margin-left: 4px; }

/* opening hours bar (customer page) */
.hoursbar { background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); margin-bottom: 12px; font-size: 15px; }
.hoursbar summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 700; margin: 0; }
.hoursbar summary::-webkit-details-marker { display: none; }
.hoursbar summary i { width: 10px; height: 10px; border-radius: 50%; background: #3DDC97; flex: none; }
.hoursbar.closed summary i { background: var(--bad-ink); }
.hoursbar summary span { flex: 1; } .hoursbar summary small { color: var(--muted); font-weight: 600; }
.hoursbar .hlist { padding: 0 14px 12px; display: grid; gap: 4px; }
.hoursbar .hlist div { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); } .hoursbar .hlist b { color: var(--navy); font-weight: 600; }

/* order ready alert + email receipt (track page) */
.alertbtn { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center; }
.alertbtn.on { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-bg); }
.ready-flash { animation: readyflash 1s ease-in-out 3; }
@keyframes readyflash { 0%, 100% { box-shadow: 0 0 0 0 rgba(14,107,59,0); } 50% { box-shadow: 0 0 0 10px rgba(14,107,59,.25); } }
.emailrow { display: flex; gap: 8px; margin-top: 8px; } .emailrow input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius); font: 16px var(--font); }

/* Demo shop (/demo) */
.demobar { background: var(--navy); color: #fff; font-size: 14px; padding: 10px 16px; text-align: center; line-height: 1.4; }
.demobar b { color: var(--yellow); }
.demobar a { color: #fff; font-weight: 700; white-space: nowrap; }
.demomodal { position: fixed; inset: 0; z-index: 100; background: rgba(16, 28, 38, .6); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 16px; }
.demosheet { position: relative; background: #fff; border-radius: 18px; max-width: 620px; width: 100%; padding: 22px 18px 18px; margin: auto 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.demosheet h2 { margin: 2px 0 8px; font-size: 20px; line-height: 1.3; }
.demokick { margin: 0; color: var(--magenta); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.demox { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--navy); }
.demoslip { margin: 12px 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; justify-content: center; }
.demoslip canvas { display: block; max-width: 100%; height: auto; }
.demoact { display: flex; gap: 10px; flex-wrap: wrap; }
.demoact .btn { flex: 1 1 200px; text-align: center; }

/* QR point: where to collect */
.collect { background: #101C26; color: #fff; border-radius: 18px; padding: 14px 16px; margin: 12px 0; }
.collect .ch { display: flex; gap: 12px; align-items: flex-start; } .collect .ch .i { width: 22px; height: 22px; flex: none; margin-top: 2px; color: #FFD500; }
.collect b { display: block; font-size: 17px; } .collect span { color: rgba(255,255,255,.8); font-size: 14px; }
.collect .cl { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); font-size: 14px; }
.collect .cl a { color: #FFD500; font-weight: 700; white-space: nowrap; text-decoration: none; }
.collect .cn { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.75); }
.collect .ch-hours { margin-top: 8px; font-size: 13px; } .collect .ch-hours summary { cursor: pointer; color: rgba(255,255,255,.85); }
.collect .ch-hours div { display: flex; justify-content: space-between; padding: 2px 0; color: rgba(255,255,255,.8); }
