/* 2026-10-10 GS Electronic Invoice Viewer: invoice.zenpos.co. From the approved mockup
   (docs/design/2026-10-09 Electronic Invoice Viewer mockup.html): Onest, Deep Pine Teal as the one accent,
   hairline borders, 8px buttons, Panel Mist behind a white paper card. Light by default; the chrome follows
   the phone's dark mode and the paper stays white. Self-hosted font, no third-party request. */

@font-face {
  font-family: "Onest";
  src: url("onest.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --page: #F1F6F9; --surface: #FFFFFF; --field: #F5F5F5; --hair: #DDDDDD;
  --ink: rgba(0, 0, 0, .87); --muted: rgba(0, 0, 0, .60);
  --accent: #1B4242; --accent-hover: #143232; --accent-ink: #FFFFFF; --focus: #B0DAFF;
  --tint: rgba(27, 66, 66, .07); --outlined-ink: #1B4242;
  --amber-bg: #FFF6DB; --amber-line: #FBBF24; --amber-ink: #6B4700;
  --green: #4E9F3D; --info-bg: #E9F1F5; --error: #B3261E;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0E131A; --surface: #1F1F1F; --field: #1A2433; --hair: #2A3648;
    --ink: #E8EDF2; --muted: #B4C0CF;
    --accent: #3A82F7; --accent-hover: #2F6FD6; --accent-ink: #FFFFFF; --focus: #60A5FA;
    --tint: rgba(58, 130, 247, .14); --outlined-ink: #E8EDF2;
    --amber-bg: rgba(251, 191, 36, .12); --amber-line: #FBBF24; --amber-ink: #FCD34D;
    --green: #22C55E; --info-bg: #1A2433; --error: #F2B8B5;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 14px/1.5 Onest, Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.page { max-width: 480px; margin: 0 auto; padding: 20px 12px 28px; display: flex; flex-direction: column; gap: 14px; }

/* header: the store is the hero */
.store, .site { display: flex; gap: 12px; align-items: center; padding: 4px 4px 2px; }
.logo { width: 48px; height: 48px; border-radius: 12px; background: #26302A; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; letter-spacing: .5px; flex: none; }
.sitemark { width: 48px; height: 48px; border-radius: 12px; background: var(--surface); border: 1px solid var(--hair); display: grid; place-items: center; color: var(--accent); flex: none; }
.sname { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; overflow-wrap: anywhere; }
.sbranch { font-size: 13px; color: var(--muted); }

.summary, .card { background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; padding: 16px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); display: block; }
.eyebrow.gap { margin: 16px 0 8px; }
.display { font-size: 27px; font-weight: 800; letter-spacing: -.4px; margin: 2px 0 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--hair); padding-top: 12px; }
.mono { font-family: "Lucida Console", "Courier New", Courier, monospace; font-weight: 700; letter-spacing: 1px; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.mono.small { font-size: 12px; font-weight: 400; letter-spacing: .5px; color: var(--muted); }
.fact { font-weight: 600; margin-top: 2px; }

/* buttons */
.actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.actions .inline { display: contents; }
.btn {
  min-height: 46px; border-radius: 8px; font: 600 15px Onest, system-ui, sans-serif; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 14px;
  transition: background-color .18s ease-out;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.outlined { background: transparent; color: var(--outlined-ink); border: 1px solid var(--hair); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--focus); }
.btn.wide { width: 100%; margin-top: 16px; }
.btn[disabled] { opacity: .6; cursor: default; }

.ic { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-s { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-m { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-l { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the invoice: paper, white in both themes, lined up like the printed copy */
.paper { background: #fff; border: 1px solid #DDDDDD; border-radius: 6px; padding: 18px 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 2px 4px rgba(0, 0, 0, .08); overflow-x: auto; }
.paper pre { margin: 0; font: 12px/1.5 "Lucida Console", "Courier New", Courier, monospace; color: #111; white-space: pre; }

.banner { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--amber-line); background: var(--amber-bg); color: var(--amber-ink); border-radius: 6px; padding: 12px; font-size: 13px; line-height: 1.45; }
.banner b { letter-spacing: 1px; }
.banner .ic { margin-top: 1px; }
.eisrow { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 0 4px; }
.eisrow .ic { color: var(--green); margin-top: 1px; }
.note, .privacy { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); background: var(--info-bg); border-radius: 6px; padding: 10px 12px; }
.privacy { background: transparent; padding: 0 6px; }
.note .ic-s, .privacy .ic-s { margin-top: 2px; }

/* landing: platform choice and the order number */
.plats { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.plats legend { padding: 0; margin-bottom: 8px; }
.platopt { display: block; position: relative; }
.plat { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); font: 600 15px Onest, system-ui, sans-serif; cursor: pointer; }
/* 2026-11-05 GS Round marker: the choice is ONE marketplace (a radio), and a square box read as a checkbox
   that should untick. Picking another marketplace switches; no reset needed. Previous code - border-radius: 6px; */
.plat .box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hair); display: grid; place-items: center; flex: none; color: transparent; }
.plat .pname { flex: 1; }
.sr:checked + .plat { background: var(--tint); border: 2px solid var(--accent); padding: 0 13px; }
.sr:checked + .plat .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sr:focus-visible + .plat { box-shadow: 0 0 0 3px var(--focus); }
.field { width: 100%; height: 52px; border-radius: 12px; border: 1px solid var(--hair); background: var(--field); color: var(--ink); padding: 0 14px; font: 700 19px "Lucida Console", "Courier New", Courier, monospace; letter-spacing: 1.6px; }
.field:focus { outline: none; border: 2px solid var(--accent); padding: 0 13px; }
.field[aria-invalid="true"] { border: 2px solid var(--error); padding: 0 13px; }
.helper { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
.error { margin: 8px 2px 0; font-size: 13px; font-weight: 600; color: var(--error); }

/* waiting, not found, unavailable */
.center { text-align: center; padding: 28px 18px 22px; }
.page > .card.center:first-child { margin-top: 24px; }
.waiting { padding: 36px 18px 28px; }
.ring { width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--hair); border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation-duration: 3s; } }
.searched { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair); }
.headline { font-size: 21px; font-weight: 800; letter-spacing: -.3px; margin: 0 0 4px; }
.body { margin: 8px 0 0; }
.muted { color: var(--muted); }
.halo { width: 64px; height: 64px; border-radius: 50%; background: var(--page); border: 1px solid var(--hair); display: grid; place-items: center; margin: 0 auto 16px; color: var(--muted); }
.checking { display: flex; gap: 8px; justify-content: center; align-items: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* footer */
.foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }
.copyline { margin: 0; font-size: 12px; color: var(--muted); text-align: center; max-width: 320px; }
.powered { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 14px; border: 1px solid var(--hair); border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; }
.powered b { color: var(--ink); font-weight: 700; }
.powered:hover { border-color: var(--muted); }

/* Print: the invoice card only */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; display: block; }
  .page > :not(.paper) { display: none !important; }
  .paper { border: 0; box-shadow: none; padding: 0; overflow: visible; }
  .paper pre { font-size: 11px; }
}
