/* ไปกัน! — print stylesheet (linked with media="print").
   printTrip()/printImage() (js/features/stamps/printsheet.js) put the document into #printRoot,
   add html.st-printing and inject "@page { size: <w>mm <h>mm; margin: 0 }" for the chosen paper.
   Without html.st-printing (plain Ctrl+P) the current screen prints as a clean, light, flowing page.
   Paper is always white: this file may use fixed colors on purpose. */

/* ================================================================ printing a travel document */
html.st-printing,
html.st-printing body {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  background: #fff !important;
  color-scheme: light;
  margin: 0 !important;
  padding: 0 !important;
}
html.st-printing #app,
html.st-printing #overlayRoot,
html.st-printing #toastRoot,
html.st-printing noscript { display: none !important; }
html.st-printing #printRoot { display: block !important; margin: 0; padding: 0; }

.st-print,
.st-print * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}
.st-print { transform: none !important; position: static !important; }
.st-page {
  margin: 0 !important;
  box-shadow: none !important;
  /* a hair shorter than the paper so rounding never spills onto an extra blank page */
  max-height: calc(var(--ph, 297mm) - 0.6mm);
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  page-break-inside: avoid;
}
.st-page:last-child { break-after: auto; page-break-after: auto; }
.st-page[hidden] { display: block !important; }
.st-sc-card, .st-pp, .st-bp-slot, .st-bp, .st-cellp, .st-pp-cell { break-inside: avoid; page-break-inside: avoid; }

/* ================================================================ plain Ctrl+P of any app screen */
/* always print the light theme (dark-mode users get white paper too) */
html:root:not(.st-printing) {
  color-scheme: light;
  --bg: #FFFFFF; --bg-2: #F5F6FB;
  --surface: #FFFFFF; --surface-2: #F8F9FD; --surface-sunk: #F1F2F8;
  --line: #E4E5EF; --line-strong: #D3D5E4;
  --glass: #FFFFFF; --glass-strong: #FFFFFF; --glass-border: #E4E5EF; --glass-edge: none;
  --ink: #16142D; --ink-2: #5E5C78; --ink-3: #8C8BA6;
  --primary: #5B3FE6; --primary-strong: #4F35D6; --primary-soft: #EFEBFF;
  --blue-soft: #E8EFFF; --violet-soft: #EFEBFF; --indigo-soft: #E9EAFF; --sky-soft: #E8EFFF; --cyan-soft: #E1F6FB;
  --mint-soft: #E0F6EE; --leaf-soft: #E3F5E8; --sun-soft: #FFF4DB; --orange-soft: #FFEEE4; --berry-soft: #FFE8EF;
  --grape-soft: #F3EAFF; --cocoa-soft: #FFEFE5; --slate-soft: #EEEFF5; --danger-soft: #FFE9EC;
  --grad-brand-soft: linear-gradient(135deg, #F2EEFF 0%, #E9F1FF 100%);
  --grad-glow: none;
  --shadow-1: none; --shadow-2: none; --shadow-3: none; --shadow-glass: none; --shadow-btn: none;
  --nav-space: 0px;
}
html:not(.st-printing) body { height: auto; overflow: visible; background: #fff; color: #16142D; }
html:not(.st-printing) .app { display: block; height: auto; }
html:not(.st-printing) .app-main { overflow: visible; height: auto; padding-bottom: 0; }
html:not(.st-printing) .app-nav,
html:not(.st-printing) #toastRoot,
html:not(.st-printing) #overlayRoot,
html:not(.st-printing) .fab { display: none !important; }
html:not(.st-printing) .split { display: block; height: auto; }
html:not(.st-printing) .split-panel { overflow: visible; }
html:not(.st-printing) .sticky-top { position: static; }
/* liquid glass does not print: solid white with a hairline */
html:not(.st-printing) .glass,
html:not(.st-printing) .card.glass,
html:not(.st-printing) .btn.glass {
  background: #fff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: #E4E5EF !important;
}
html:not(.st-printing) .card { box-shadow: none; border: 1px solid #E4E5EF; }
html:not(.st-printing) .card,
html:not(.st-printing) .list-item,
html:not(.st-printing) .stat { break-inside: avoid; page-break-inside: avoid; }
html:not(.st-printing) .hero,
html:not(.st-printing) .btn.primary,
html:not(.st-printing) .progress > i {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
