/* Shared by Online Quotes and Overview print documents. */
#printQuoteDocument,#OverviewPrintDocument { display:none; }
@media print {
 /* Screen-only bottom padding and page tint must not appear in printed quotes. */
 html, body.quote-builder-page, body.printing-overview-document { background:#fff!important; padding:0!important; min-height:0!important; }
 @page { size:A4 portrait; margin:12mm; }
 .print-quote-document { --black:#000; --white:#fff; --font-body:Arial,sans-serif; font:8.5pt/1.2 Arial,sans-serif; color:#000; background:#fff; text-transform:uppercase; }
 .print-quote-document,.print-quote-document * { box-sizing:border-box; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
 /* Keep page-wide screen typography out of every print/PDF entry point. */
 .print-quote-document p { color:#000; line-height:1.2; }
 .print-quote-document h2 { font-family:Arial,sans-serif; line-height:1.2; letter-spacing:0; }
 /* Fixed A4 contact sheet: row-major order, 2 across and at most 2 down. */
 .print-diagram-page { break-before:page; page-break-before:always; break-inside:avoid; padding:0 2mm; margin:0; width:100%; max-width:186mm; }
 .print-diagram-heading { display:flex; align-items:baseline; justify-content:space-between; gap:4mm; height:10mm; }
 .print-diagram-heading span { font-size:8pt; }
 .print-diagram-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-flow:row; grid-auto-rows:124mm; gap:4mm; width:100%; }
 .print-diagram-card { border:.2mm solid #999; padding:2mm; min-width:0; display:flex; flex-direction:column; gap:1mm; break-inside:avoid; background:#fff; }
 .print-diagram-caption { font:6.5pt/1.15 Arial,sans-serif; overflow-wrap:anywhere; flex:none; }
 .print-diagram-caption strong { display:block; margin-bottom:.5mm; font-size:7pt; }
 .print-diagram-caption span { display:block; }
 .print-diagram-image { flex:1; min-height:0; position:relative; }
 .print-diagram-image img { position:absolute; width:100%; height:100%; object-fit:contain; display:block; }
  .print-quote-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 7mm;
    row-gap: .75mm;
    align-items: end;
    padding-bottom: 2.5mm;
    border-bottom: 1px solid var(--black);
  }

  .print-quote-header > div {
    display: contents;
  }

  .print-brand-logo {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 30mm;
    height: auto;
    margin: 0;
  }

  .print-company-address {
    grid-column: 1;
    grid-row: 2;
  }

  .print-company-contact {
    grid-column: 1;
    grid-row: 3;
  }

  .print-customer strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .print-customer .print-document-title {
    font-size: 30pt;
    line-height: 1;
    white-space: nowrap;
  }

  .print-customer > span:first-of-type {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
  }

  .print-company-address,
  .print-company-contact {
    display: block;
    font-size: 7.5pt;
    line-height: 1.15;
    white-space: nowrap;
  }
  .print-customer strong {
    font-size: 20pt;
    line-height: 1.05;
  }

  .print-customer > span:first-of-type {
    font-size: 11pt;
    font-weight: 800;
  }

  .print-quote-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1mm;
    border-bottom: 1px solid var(--black);
  }

  .print-quote-meta p,
  .print-quote-details p {
    display: grid;
    grid-template-columns: 27mm 1fr;
    gap: 2mm;
    margin: 0;
    padding: 1.1mm 1mm;
  }

  .print-quote-meta p:nth-child(odd),
  .print-quote-details p:nth-child(odd) {
    border-right: 1px solid #d8d0c3;
  }

  .print-quote-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.5mm 0 4mm;
    border-bottom: 1px solid var(--black);
  }

  .print-quote-meta p span,
  .print-quote-details p span {
    color: #444;
    font-size: 7.5pt;
    font-weight: 800;
    text-transform: uppercase;
  }

  .print-quote-meta p strong,
  .print-quote-details p strong {
    font-size: 8.2pt;
    line-height: 1.15;
  }

  .print-quote-document h2 {
    margin: 0 0 2mm;
    font-size: 14pt;
    line-height: 1.1;
  }

  .print-quote-line-group {
    margin: 0 0 4mm;
  }

  .print-quote-line-group + .print-quote-line-group {
    margin-top: 5mm;
  }

  .print-quote-line-group h2 {
    break-after: avoid;
  }

  .print-quote-line-group--accessories {
    margin-bottom: 2mm;
  }

  .print-quote-line-group--accessories h2 {
    margin-bottom: 1mm;
    font-size: 11pt;
  }

  .print-quote-line-group--accessories .print-quote-table th,
  .print-quote-line-group--accessories .print-quote-table td {
    padding-top: .55mm;
    padding-bottom: .55mm;
    line-height: 1.08;
  }

  .print-quote-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .print-quote-table th,
  .print-quote-table td {
    padding: .55mm .8mm;
    border-bottom: 1px solid #ddd;
    line-height: 1.08;
    vertical-align: top;
  }

  .print-quote-table th {
    border-top: 1px solid var(--black);
    border-bottom: 1px solid var(--black);
    background: transparent;
    color: var(--black);
    font-size: 7.5pt;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
  }

  .print-quote-table th:nth-child(4) {
    text-align: center;
  }
  .print-quote-table th:nth-child(1), .print-quote-table td:nth-child(1) {
    width: 8mm;
    text-align: center;
  }

  .print-quote-table th:nth-child(2), .print-quote-table td:nth-child(2) {
    width: 34mm;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .print-quote-table th:nth-child(3), .print-quote-table td:nth-child(3) {
    width: 6mm;
    text-align: center;
  }

  .print-quote-table th:nth-child(5), .print-quote-table td:nth-child(5) {
    width: 5mm;
    text-align: center;
  }

  .print-quote-table th:nth-child(6), .print-quote-table td:nth-child(6) {
    width: 26mm;
    text-align: center;
    white-space: nowrap;
    font-size: 7.5pt;
  }

  .print-quote-table th:nth-child(7), .print-quote-table td:nth-child(7) {
    width: 18mm;
    text-align: center;
    font-weight: 900;
  }

  .print-quote-table th:nth-child(8), .print-quote-table td:nth-child(8) {
    width: 8mm;
    text-align: center;
  }

  .print-quote-table th:nth-child(9), .print-quote-table td:nth-child(9) {
    width: 18mm;
    text-align: center;
    font-weight: 900;
  }

  .print-quote-table th:nth-child(5),
  .print-quote-table th:nth-child(6),
  .print-quote-table th:nth-child(7),
  .print-quote-table th:nth-child(8),
  .print-quote-table th:nth-child(9),
  .print-quote-table td:nth-child(5),
  .print-quote-table td:nth-child(6),
  .print-quote-table td:nth-child(7),
  .print-quote-table td:nth-child(8),
  .print-quote-table td:nth-child(9),
  .print-quote-table td:nth-child(5) > *,
  .print-quote-table td:nth-child(6) > *,
  .print-quote-table td:nth-child(7) > *,
  .print-quote-table td:nth-child(8) > *,
  .print-quote-table td:nth-child(9) > * {
    text-align: center;
  }

  .print-quote-table td:nth-child(6) > *,
  .print-quote-table td:nth-child(7) > *,
  .print-quote-table td:nth-child(9) > * {
    white-space: nowrap;
  }
  .print-quote-table tr {
    break-inside: avoid;
  }

  .print-quote-table td > strong,
  .print-quote-table td > span,
  .print-quote-table td > small {
    display: block;
  }

  .print-quote-table td > small {
    margin-top: .55mm;
    padding-left: 2mm;
    border-left: 2px solid #d8d0c3;
    color: #5f5a52;
    font-size: 7.5pt;
    line-height: 1.08;
  }

  .print-quote-commercial {
    display: grid;
    grid-template-columns: minmax(0, 88mm) 82mm;
    justify-content: space-between;
    gap: 14mm;
    margin-top: 7mm;
    width: 100%;
    max-width: none;
    padding-right: 0;
    break-inside: avoid;
  }

  .print-account-link {
    align-self: stretch;
    display: grid;
    grid-template-columns: 24mm minmax(0, 1fr);
    align-items: center;
    gap: 3mm;
    padding: 4mm;
    background: #1d2b3c;
    color: #fff;
    font-size: 9pt;
    text-align: center;
  }

  .print-account-link a { color:inherit; text-decoration:none; }
  .print-account-link .print-account-button { display:inline-block; margin-top:2mm; padding:2mm 5mm; border:1px solid #fff; border-radius:1mm; font-size:8pt; font-weight:bold; text-decoration:none; }
  .print-account-link .print-account-address { display:block; margin-top:1mm; font-size:6.5pt; text-transform:none!important; }
  .print-account-qr { display:block; width:24mm; height:24mm; }

  .print-quote-summary {
    display: grid;
    padding: 3mm;
    border: 1px solid var(--black);
  }

  .print-quote-summary p {
    display: flex;
    justify-content: space-between;
    gap: 8mm;
    margin: 0;
    /* 9.92pt row pitch, 30% below the previous 14.17pt. */
    line-height: 1;
    padding: .25mm 0;
  }

  .print-grand-total {
    margin-top: 1.4mm !important;
    padding-top: 1.4mm !important;
    border-top: 2px solid var(--black);
    font-size: 13pt;
  }

  .print-quote-footer {
    margin-top: 8mm;
    padding-top: 4mm;
    border-top: 1px solid #d8d0c3;
    font-size: 8pt;
  }

  .print-quote-footer p {
    margin: 0 0 2mm;
  }
 .print-document-title--confirmation { font-size:26pt!important; }
 .print-quote-table thead { display:table-header-group; }
 .print-overview-payment { margin:3mm 0 0 auto; width:82mm; text-align:center; break-inside:avoid; }
 .print-overview-connected { margin-top:7mm; }
 body.printing-overview-document > *:not(#OverviewPrintDocument) { display:none!important; }
 body.printing-overview-document { margin:0!important;padding:0!important;width:auto!important;background:#fff; }
 body.printing-overview-document > #OverviewPrintDocument { display:block!important; width:100%;margin:0;padding:0; }
}
/* The same unboxed printer/download controls as Online Quotes. */
.overview-document-actions, .order-expanded-heading > .overview-document-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.overview-document-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ink,#26221d); cursor:pointer; }
.overview-document-icon > .bi { display:block; font-size:1.265rem; line-height:1; font-weight:400; }
.overview-document-icon:hover { transform:translateY(-1px); }
.overview-document-icon:focus-visible { outline:2px solid var(--teal,#287f7b); outline-offset:3px; }
.overview-document-icon:disabled { opacity:.5; cursor:wait; }
.overview-document-status { margin:0; font-size:.8rem; }
.portal-item-child { display:block; font-size:.85em; font-weight:400; }

@media print {
  .print-price-comparisons { break-inside:avoid; margin:12mm 0 6mm; font-family:Arial,sans-serif; text-transform:uppercase; color:#25211d; }
  .print-quote-document .print-price-comparisons h2 { font-size:12pt; margin:0 0 3mm; }
  .print-comparison-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2mm; }
  .print-comparison-grid--carcass,.print-comparison-drawers { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .print-comparison-drawers { display:grid; gap:2mm; margin-bottom:2mm; font-size:8pt; font-weight:700; }
  .print-comparison-drawers>div,.print-comparison-grid>article { min-width:0; background:#f4efe7; border:0.5pt solid #d8ccbc; border-radius:2mm; text-align:center; padding:3mm 2mm; break-inside:avoid; }
  .print-comparison-grid>article { display:grid; grid-template-rows:subgrid; grid-row:span 7; row-gap:1.5mm; }
  .print-comparison-grid--carcass>article { grid-row:span 6; }
  .print-price-comparisons .is-current { background:#e3efeb; border:1.8pt solid #2d7972; }
  .print-price-comparisons h3 { font-size:8pt; margin:0; }
  .print-price-comparisons p { margin:0; }
  .print-comparison-material,.print-comparison-vat-label { font-size:6.5pt; }
  .print-comparison-colour,.print-comparison-vat { font-size:7pt; }
  .print-comparison-price { font-size:14pt; white-space:nowrap; }
  .print-comparison-selection,.print-comparison-drawers small { display:block; color:#2d7972; font-size:6.5pt; font-weight:700; }
  .print-comparison-drawers small { margin-top:2mm; }
  .print-price-comparisons .print-comparison-note { font-size:7pt; margin-top:3mm; }
  .print-price-comparisons * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .print-price-comparisons--complete .print-comparison-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:1.4mm; }
  .print-price-comparisons--complete .print-comparison-grid>article { padding:2.1mm 1.4mm; row-gap:1.05mm; border-radius:1.4mm; }
  .print-price-comparisons--complete h3 { font-size:5.6pt; }
  .print-price-comparisons--complete .print-comparison-material,
  .print-price-comparisons--complete .print-comparison-vat-label,
  .print-price-comparisons--complete .print-comparison-selection { font-size:4.55pt; }
  .print-price-comparisons--complete .print-comparison-colour,
  .print-price-comparisons--complete .print-comparison-vat { font-size:4.9pt; }
  .print-price-comparisons--complete .print-comparison-price { font-size:9.8pt; }
}

/* Identical screen headers for Overview and Online Quote documents. */
@media screen {
.overview-view-only .portal-order-dialog > header,
#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head {
 display:flex;align-items:flex-start;justify-content:space-between;gap:20px;
 padding:24px 28px;background:#f8f5ed;border-bottom:1px solid #e2d8c9;min-height:126px;box-sizing:border-box;
}
.overview-view-only .portal-order-dialog > header small,
#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head > div:first-child > span {
 display:block;color:#9a7047;font:800 11px/1.2 "Hanken Grotesk",sans-serif;letter-spacing:.08em;text-transform:uppercase;
}
.overview-view-only .portal-order-dialog > header h2,
#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head h2 {
 margin:7px 0 0;color:#28231e;font:750 38px/1.1 "Outfit",sans-serif;letter-spacing:-1px;text-transform:uppercase;
}
.overview-view-only .portal-order-dialog > header h2::after,
#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head h2::after{content:'Review your document, print or download a copy.';display:block;margin-top:10px;color:#786f64;font:400 15px/1.5 'Hanken Grotesk',Arial,sans-serif;letter-spacing:0;text-transform:none}
.overview-view-only .portal-order-actions {display:flex;align-items:center;gap:26px}
@media(max-width:700px){.overview-view-only .portal-order-dialog > header,#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head{flex-wrap:wrap;padding:20px}.overview-view-only .portal-order-dialog > header h2,#onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head h2{font-size:28px}}
#onlineQuoteDialog:has(.quote-preview-toolbar) .quote-preview-toolbar {gap:26px;margin:0 6px 0 auto}
.overview-view-only .overview-document-icon,
#onlineQuoteDialog:has(.quote-preview-toolbar) .quote-preview-action {
 display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
 width:auto;min-width:44px;height:auto;min-height:44px;padding:4px 8px;border:0;background:transparent;color:#211f1d;border-radius:0;
}
.overview-view-only .overview-document-icon > .bi,
#onlineQuoteDialog:has(.quote-preview-toolbar) .quote-preview-action > .bi {font-size:26px;line-height:1}
.overview-view-only .overview-document-icon span,
#onlineQuoteDialog:has(.quote-preview-toolbar) .quote-preview-action span {font:800 10px/1.2 "Hanken Grotesk",sans-serif;color:#9a7047}
.overview-view-only .portal-order-close,
#onlineQuoteDialog:has(.quote-preview-toolbar) #closeOnlineQuoteDialog {
 display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;border:0;background:transparent;color:#211f1d;font-size:24px;
}
}

@media print{.print-follow-ons{margin-top:6mm;break-inside:avoid}.print-follow-ons h2{font-size:10pt;margin:0 0 2mm}.print-follow-ons table{width:100%;border-collapse:collapse;font:8pt Arial,sans-serif}.print-follow-ons th,.print-follow-ons td{text-align:left;padding:2mm;border-bottom:.2mm solid #ddd}.print-follow-ons th{font-weight:bold;background:#f4f1ec}}

@media print {
 .print-follow-ons{break-inside:auto}
 .print-follow-ons h2{font-size:8pt;margin-bottom:1.5mm}
 .print-follow-on{margin:2mm 0;break-inside:avoid}
 .print-follow-on-heading{display:flex;justify-content:space-between;gap:4mm;padding:1.5mm 2mm;background:#f4f1ec;font:6.5pt/1.3 Arial,sans-serif}
 .print-follow-ons table{table-layout:fixed;font:6.5pt/1.3 Arial,sans-serif}
 .print-follow-ons th,.print-follow-ons td{padding:1mm 2mm;vertical-align:top}
 .print-follow-ons th{background:none}
 .print-follow-ons th:first-child,.print-follow-ons td:first-child{width:32mm;overflow-wrap:anywhere}
 .print-follow-ons th:last-child,.print-follow-ons td:last-child{width:10mm;text-align:center}
}

/* Screen reports fill their panel; only the printed document uses paper dimensions. */
@media screen {
 .overview-view-only .portal-order-dialog,
 #onlineQuoteDialog:has(.quote-preview-toolbar){width:min(1126px,calc(100vw - 32px))!important;height:94dvh!important;max-height:94dvh!important;display:flex;flex-direction:column;overflow:hidden;border-radius:24px}
 .overview-view-only .portal-order-dialog>header,
 #onlineQuoteDialog:has(.quote-preview-toolbar) .online-quote-dialog-head{flex-shrink:0}
 .overview-view-only .overview-document-preview{flex:1 1 0;min-height:0;height:100%!important;background:#fffaf2!important}
}
@media screen {
 .overview-issue-selection .portal-order-dialog{width:min(1126px,calc(100vw - 32px));height:94dvh;max-height:94dvh;border-radius:24px;background:#fffaf2}
 .overview-issue-selection .portal-order-dialog>header{padding:24px 28px;background:#f8f5ed;flex-shrink:0}
 .overview-issue-selection .portal-order-dialog>header h2{font:750 32px/1.1 Outfit,Arial,sans-serif;letter-spacing:-.7px;margin:7px 0 0}
 .overview-issue-selection .portal-order-body{min-height:0;overflow:auto;padding:20px 24px}
 .overview-issue-selection .issue-selection-tip{padding:16px;border-radius:12px;background:#f5f1e9;margin:0 0 18px}
 .overview-issue-selection .portal-order-print-meta,.overview-issue-selection .portal-order-print-details,.overview-issue-selection .portal-order-print-header,.overview-issue-selection .portal-order-print-connected{display:none!important}
 .overview-issue-selection .portal-report-issue{border-radius:999px;background:#28231e;color:white;padding:12px 20px}
 .overview-issue-selection .issue-item-check{accent-color:#327b77;width:18px;height:18px;margin-right:8px}
 dialog.order-issue-dialog{border-radius:24px;background:#fffaf2;border-color:#e2d8c9}
 .order-issue-dialog>header{padding:24px;background:#f8f5ed}
 .order-issue-dialog>header h2{font:750 30px/1.1 Outfit,Arial,sans-serif}
 .order-issue-dialog .issue-replacement-fields,.order-issue-dialog .issue-summary-card{background:#f5f1e9;border-radius:12px}
}
@media screen{
 .overview-issue-selection [data-modal-document-action],.overview-issue-selection .portal-order-print{display:none!important}
 .overview-issue-selection .portal-order-actions{display:flex;align-items:center;gap:16px}
 .overview-issue-selection .portal-order-head,.overview-issue-selection .portal-order-line{grid-template-columns:54px 120px 40px minmax(180px,1fr) 40px 100px 70px 45px 70px;gap:8px}
 .overview-issue-selection .portal-order-head{background:#f5f1e9;border:0;border-radius:6px}
}
