/* Test-only output adapter. The approved renderer and page margins are untouched. */
@media print{
 body.test-print-ready:not(.print-blocked)>#workbench-root{display:block!important}
 body.test-print-ready:not(.print-blocked)::after{display:none!important}
 body.test-print-ready:not(.print-blocked) .workspace>.workflow-panels{display:block!important}
 body.test-print-ready:not(.print-blocked) .workflow-panels>.preview-panel{display:block!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
 body.test-print-ready:not(.print-blocked) .workflow-panels>:not(.preview-panel),body.test-print-ready .preview-panel>.section-head,body.test-print-ready .workflow-mobile-preview,body.test-print-ready .preview-panel>.subtle,body.test-print-ready .demo-footer,body.test-print-ready .no-print{display:none!important}
 body.test-print-ready .paper-stage{display:block!important;width:auto!important;height:auto!important;margin:0!important}
 body.test-print-ready #quote-paper{transform:none!important;zoom:1!important;position:relative}
 body.test-print-ready .paper-wrap::before{display:none!important}
 body.test-print-ready #quote-paper::after{content:'TEST';position:fixed;top:42%;left:50%;transform:translate(-50%,-50%) rotate(-28deg);font-family:Arial,sans-serif;font-size:110pt;line-height:1;font-weight:800;letter-spacing:10pt;color:rgba(50,82,70,.15);pointer-events:none;z-index:10;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Explicit first-row widths for WebKit print, independent of colgroup sizing. */
@media print{
 .quote-items{width:100%!important;table-layout:fixed!important}
 .quote-items:not(.is-negotiated):not(.is-bundled) th:nth-child(1){width:7%}
 .quote-items:not(.is-negotiated):not(.is-bundled) th:nth-child(2){width:45%}
 .quote-items:not(.is-negotiated):not(.is-bundled) th:nth-child(3){width:12%}
 .quote-items:not(.is-negotiated):not(.is-bundled) th:nth-child(4){width:16%}
 .quote-items:not(.is-negotiated):not(.is-bundled) th:nth-child(5){width:20%}
 .quote-items.is-negotiated th:nth-child(1){width:7%}
 .quote-items.is-negotiated th:nth-child(2){width:37%}
 .quote-items.is-negotiated th:nth-child(3),.quote-items.is-negotiated th:nth-child(4){width:13%}
 .quote-items.is-negotiated th:nth-child(5){width:10%}
 .quote-items.is-negotiated th:nth-child(6){width:20%}
 .quote-items.is-bundled th:nth-child(1){width:7%}
 .quote-items.is-bundled th:nth-child(2){width:47%}
 .quote-items.is-bundled th:nth-child(3){width:12%}
 .quote-items.is-bundled th:nth-child(4){width:34%}
 .quote-items .money,.quote-items th:not(:nth-child(2)){overflow-wrap:normal;word-break:normal;white-space:nowrap}
}
/* Short quotes: pin the sign-off to the page bottom with percent heights (100% = the page content height in both Chrome and WebKit).
   Screen-measured px anchors (quote-paper.js fitShortPage) are NOT carried into print: WebKit prints 1 css px as ~0.801pt and its page is only
   ~959.6 css px tall, so those anchors overflow there. 27pt = the bottom reserve of the approved short-quote layout (sign-off bottom at 772.8pt). */
@media print{
 html,body{height:100%!important}
 body.test-print-ready:not(.print-blocked)>#workbench-root,
 body.test-print-ready .workspace,
 body.test-print-ready .workflow-panels,
 body.test-print-ready .preview-panel,
 body.test-print-ready .paper-stage,
 body.test-print-ready .paper-wrap,
 body.test-print-ready #quote-paper{height:100%!important}
 body.test-print-ready #quote-paper .quote-main{display:flex!important;flex-direction:column;min-height:calc(100% - 27pt)}
 #quote-paper .quote-notes{margin-top:4mm!important}
 #quote-paper .quote-signoff{margin-top:auto!important;padding-top:8mm}   /* auto pins a short quote's sign-off to the bottom; the padding keeps the 8mm gap above it when the quote is long (no free space) */
}

/* Candidate: move margin-box text away from the page content paint area. */
@page{
 @bottom-left{margin-top:4pt}
 @bottom-right{margin-top:4pt}
}

/* The browser prints the actual sheet count. Screen preview has no print page geometry. */
@media screen {
 #quote-paper>.quote-brand-page {margin-top:12mm;padding:11mm;border-top:1px solid #adbcc2}
 #quote-paper>.quote-brand-page .qba-footer span:last-child {display:none}
 #booklet-services {display:flex;flex-wrap:wrap;gap:.5rem 1.25rem}
 #booklet-options label {display:inline-flex;align-items:center;gap:.35rem}
 #booklet-options input {width:auto}
}
@media print {
 #quote-paper:not(.qpp-on)>.quote-brand-page .qba-footer {display:none}
}
