/* GENERATED from Web/shared/print/settings-ui.css by Web/shared/print/sync.js - do not edit. */
/* =============================================================================
   Web/shared/print/settings-ui.css - the Printing settings screen
   (settings-ui.mjs, docs/PRINT_SETTINGS_V2.md), on the till and the portal.
   Semantic tokens only (tokens.css names; the till's theme.css defines them
   too), so dark mode follows each surface's own theme. The paper in the
   preview and the thumbnails stays white: it is paper.
   Copied by Web/shared/print/sync.js - never edit a copy.
   ============================================================================= */
.ps { --ps-soft: var(--surface-soft, var(--bg-sunken, #FBF7F4)); --ps-line: var(--hairline, var(--border, #E7DBD3));
  --ps-err: var(--danger-text, var(--error-text, #BC3D34)); color: var(--text); }
.ps [hidden] { display: none !important; }
.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 42%); gap: 24px; align-items: start; }
.ps-form { min-width: 0; }
/* The A4 page needs the room: its preview takes half the width. */
.ps-a4 .ps-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 50%); }
.ps-h { font-family: var(--font-display, inherit); font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.ps-lead { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.ps-sub { margin: 16px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); }
.ps-group, .ps-mode-card, .ps-preview { background: var(--surface); border: 1px solid var(--ps-line); border-radius: var(--r-lg, 16px);
  padding: 16px 24px 24px; margin: 0 0 16px; box-shadow: var(--shadow-sm, none); }
.ps-notice { background: var(--warning-bg, #FBF3E2); color: var(--text); border-radius: var(--r-md, 12px); padding: 12px 16px; margin: 0 0 16px; }

/* ---- rows: label, control, hint, error ---- */
.ps-row { padding: 12px 0; border-top: 1px solid var(--ps-line); }
.ps-group > .ps-h + .ps-row, .ps-group > .ps-lead + .ps-row, .ps-sub + .ps-row, .ps-sub + .ps-hint + .ps-row { border-top: none; }
.ps-label { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.ps-field > .ps-label { margin-bottom: 8px; }
.ps-hint { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.ps-note { padding: 8px 0; }
.ps-count { margin: 4px 0 0; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ps-err { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--ps-err); }
.ps-err:empty, .ps-bar-err:empty { display: none; }
.ps-input { display: block; width: 100%; box-sizing: border-box; background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-md, 12px); padding: 11px 12px; line-height: 1.4; }
textarea.ps-input { resize: vertical; min-height: 96px; }
.ps-input:focus-visible { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 1px; border-color: var(--coral); }
.ps-input[aria-invalid="true"] { border-color: var(--ps-err); }
.ps-input:disabled { opacity: .55; }

/* ---- a switch: the whole row is the target ---- */
.ps-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.ps-toggle-main { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 260px; min-height: 44px; cursor: pointer; }
.ps-toggle-text { display: flex; flex-direction: column; min-width: 0; }
.ps-example { flex: 0 1 auto; max-width: 100%; margin-left: 52px; padding: 4px 8px; border-radius: var(--r-sm, 8px); background: var(--ps-soft);
  color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ps-switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; position: relative; cursor: pointer;
  background: var(--warm-300, #D6C5BA); transition: background var(--t-fast, 120ms); }
.ps-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(43, 32, 26, .25); transition: transform var(--t-fast, 120ms); }
.ps-switch:checked { background: var(--coral); }
.ps-switch:checked::after { transform: translateX(16px); }
.ps-switch:focus-visible { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; }
.ps-switch:disabled { cursor: default; opacity: .55; }
.ps-toggle.is-locked .ps-switch:disabled { opacity: .8; }
.ps-toggle.is-locked .ps-hint { color: var(--text); }

/* ---- pills: a few choices ---- */
.ps-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pill { position: relative; }
.ps-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ps-pill span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 56px; padding: 0 16px; box-sizing: border-box;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px;
  transition: background var(--t-fast, 120ms), color var(--t-fast, 120ms), border-color var(--t-fast, 120ms); }
.ps-pill input:checked + span { background: var(--coral-soft); color: var(--coral-text); border-color: var(--coral); }
.ps-pill input:focus-visible + span { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; border-color: var(--coral); }
.ps-pill input:disabled + span { opacity: .55; }

/* ---- template cards ---- */
.ps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.ps-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; min-height: 44px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--r-md, 12px); background: var(--surface);
  transition: background var(--t-fast, 120ms), border-color var(--t-fast, 120ms); }
.ps-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ps-card:hover { border-color: var(--coral); }
.ps-card.is-on { border-color: var(--coral); background: var(--coral-soft); }
.ps-card:has(input:focus-visible) { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; border-color: var(--coral); }
.ps-thumb { flex: none; display: block; line-height: 0; border-radius: 4px; box-shadow: 0 1px 3px rgba(43, 32, 26, .12); }
.ps-thumb svg { display: block; }
/* A card that shows the real template (the Trade invoice): the A4 page, shrunk to the thumbnail. */
.ps-thumb.is-live { position: relative; width: 60px; height: 84px; overflow: hidden; background: #FFFFFF; }
.ps-thumb-frame { position: absolute; left: 0; top: 0; width: 794px; height: 1112px; border: 0; transform: scale(.0756); transform-origin: 0 0; pointer-events: none; background: #FFFFFF; }
.ps-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-card-name { font-weight: 700; font-size: 14px; color: var(--text); }
.ps-card-hint { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.ps-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ps-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--ps-soft); color: var(--text-muted); white-space: nowrap; }
.ps-badge.is-current { background: var(--success-bg, #E6F4EC); color: var(--success-text, #237851); }
.ps-badge.is-warn { background: var(--warning-bg, #FBF3E2); color: var(--text); }
.ps-more { margin-top: 16px; }
.ps-more > summary, .ps-adv > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--coral-text); list-style: none; }
.ps-more > summary::-webkit-details-marker, .ps-adv > summary::-webkit-details-marker { display: none; }
.ps-more > summary::before, .ps-adv > summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--t-fast, 120ms); flex: none; }
.ps-more[open] > summary::before, .ps-adv[open] > summary::before { transform: rotate(45deg); }
.ps-more > .ps-cards { margin-top: 8px; }
.ps-adv > summary.ps-h { color: var(--text); margin: 0; }
.ps-swatches { margin-top: 0; }
.ps-swatch { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; position: relative; }
.ps-swatch.is-on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--coral); }
.ps-dot { width: 26px; height: 26px; border-radius: 50%; display: block; }
.ps-swatch-custom { width: auto; padding: 0 12px 0 8px; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text); }
.ps-swatch-custom input { width: 26px; height: 26px; border: none; padding: 0; background: none; cursor: pointer; }

/* ---- read-only facts and links ---- */
.ps-ro-list { padding: 8px 0; border-top: 1px solid var(--ps-line); }
.ps-ro { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 14px; }
.ps-ro-k { color: var(--text-muted); }
.ps-ro-v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ps-link { background: none; border: none; padding: 0; min-height: 44px; font: inherit; font-weight: 700; color: var(--coral-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ps-link:focus-visible { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; border-radius: 4px; }
.ps-sub-block { border-top: 1px solid var(--ps-line); margin-top: 4px; }
/* This till's calibration: width and offset side by side, stacked on a phone. */
.ps-cal-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.ps-input-num { max-width: 160px; font-variant-numeric: tabular-nums; }
.ps-cal-slip { padding: 4px 0 12px; }
/* The A4 head switches wrapped for the Letterhead template keep the first row's rule off. */
.ps-lead + [data-a4head] > .ps-row:first-child { border-top: none; }

/* ---- the Letterhead template's picture (docs/LETTERHEAD.md) ---- */
.ps-lh-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
/* An A4 sheet in miniature: fixed 210:297, the picture fitted inside, never stretched. */
.ps-lh-frame { position: relative; flex: none; width: 120px; aspect-ratio: 210 / 297; border: 1px solid var(--ps-line); border-radius: var(--r-sm, 8px);
  background: #FFFFFF; overflow: hidden; box-shadow: var(--shadow-sm, none); transition: border-color var(--t-fast, 120ms); }
.ps-lh-frame.is-drop { border-color: var(--coral); }
.ps-lh-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top center; }
.ps-lh-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px;
  text-align: center; font-size: 12px; color: var(--text-muted); background: linear-gradient(180deg, var(--coral-soft, #FBEEE8), var(--ps-soft)); }
.ps-lh-empty svg { color: var(--coral-text); }
.ps-lh-side { flex: 1 1 220px; min-width: 0; }
.ps-lh-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* A long label wraps inside its pill rather than pushing a phone screen sideways. */
.ps-lh-actions .ps-btn { white-space: normal; text-align: center; max-width: 100%; }
.ps-lh-stage { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--text); }
.ps-lh-stage:empty { display: none; }
.ps-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---- where bills print ---- */
.ps-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ps-mode { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; min-height: 44px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--r-md, 12px); background: var(--surface); }
.ps-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ps-mode:has(input:checked) { border-color: var(--coral); background: var(--coral-soft); }
.ps-mode:has(input:focus-visible) { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; }
.ps-mode-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-text); display: flex; align-items: center; justify-content: center; }
.ps-mode-status { margin: 12px 0 0; font-weight: 600; font-size: 14px; }

/* ---- the preview ---- */
.ps-preview { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.ps-prev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.ps-prev-head .ps-h { margin: 0; }
.ps-prev-state { flex-basis: 100%; font-size: 12.5px; color: var(--text-muted); }
.ps-zoom .ps-pill span { min-height: 36px; min-width: 48px; padding: 0 12px; font-size: 13px; }
.ps-zoom .ps-pill { min-height: 44px; display: inline-flex; align-items: center; }
.ps-missing { background: var(--warning-bg, #FBF3E2); color: var(--text); border-radius: var(--r-md, 12px); padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.ps-paper { background: var(--ps-soft); border-radius: var(--r-md, 12px); padding: 12px; display: flex; justify-content: center; overflow: auto; min-height: 240px; }
.ps-paper.is-full { justify-content: flex-start; }
.ps-sheet { background: #FFFFFF; box-shadow: var(--shadow-md, 0 4px 12px rgba(43, 32, 26, .12)); overflow: hidden; flex: none; }
.ps-frame { display: block; border: 0; background: #FFFFFF; transform-origin: 0 0; }
.ps-skel { width: 100%; max-width: 280px; padding: 16px; background: #FFFFFF; border-radius: 4px; }
.ps-skel div { height: 12px; margin: 10px 0; border-radius: 6px; background: linear-gradient(90deg, #F3EBE6 25%, #FBF7F4 50%, #F3EBE6 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.ps-skel div:nth-child(2n) { width: 70%; }
.ps-error { text-align: center; padding: 24px 16px; }
.ps-error-t { font-weight: 700; margin: 0 0 4px; }
.ps-prev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.ps-prev-actions .ps-hint { margin: 0; flex: 1 1 200px; }

/* ---- buttons (pill, 44 px, bold label) ---- */
.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px; border-radius: 999px; font: inherit;
  font-weight: 700; font-size: 16px; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; }
.ps-btn:disabled { opacity: .55; cursor: default; }
.ps-btn:focus-visible { outline: 3px solid var(--coral-soft, #FBEEE8); outline-offset: 2px; }
.ps-btn-primary { background: var(--coral); color: var(--cream, #FFFBF8); }
.ps-btn-primary:hover:not(:disabled) { background: var(--coral-600); }
.ps-btn-secondary { background: var(--surface); color: var(--coral-text); border-color: var(--coral); }
.ps-btn-ghost { background: transparent; color: var(--coral-text); padding: 0 16px; }
.ps-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ps-spin .8s linear infinite; }
@keyframes ps-spin { to { transform: rotate(360deg); } }

/* ---- the save bar: always in reach ---- */
.ps-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 8px 0 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--ps-line); border-radius: var(--r-lg, 16px);
  box-shadow: var(--shadow-md, 0 -4px 12px rgba(43, 32, 26, .08)); }
.ps-bar.is-dirty { border-color: var(--coral); }
.ps-bar-msg { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-bar-state { font-weight: 600; font-size: 14px; }
.ps-bar-err { font-weight: 600; font-size: 13px; color: var(--ps-err); }
.ps-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ps-jump { display: none; }

@media (max-width: 899px) {
  /* The A4 tab too: its wider preview column must not outrank the phone stack. */
  .ps-grid, .ps-a4 .ps-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-preview { position: static; max-height: none; overflow: visible; }
  .ps-jump { display: inline-flex; }
}
@media (max-width: 520px) {
  .ps-group, .ps-mode-card, .ps-preview { padding: 16px; }
  .ps-cards { grid-template-columns: minmax(0, 1fr); }
  .ps-example { margin-left: 0; }
  .ps-bar { padding: 8px 12px; }
  .ps-bar-actions { width: 100%; }
  .ps-bar-actions .ps-btn-primary { flex: 1 1 auto; padding: 0 16px; }
}

/* ---- a bill's own note on its detail view (noteBlock) ---- */
.psn { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--border); background: var(--surface-soft, var(--bg-sunken, #FBF7F4)); border-radius: var(--r-sm, 8px); }
.psn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.psn-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); }
.psn-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.psn .ps-input { margin-top: 4px; }
.psn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.psn-edit { min-height: 44px; padding: 0 12px; font-size: 14px; }
