/* src/print.css */

/* Set page orientation to landscape for more horizontal space */
@page {
  size: A4 landscape;
  margin: 20mm;

  /* Paged.js margin boxes for running footer */
  @bottom-left {
    content: element(footer);
  }
  @bottom-right {
    content: "Seite " counter(page) " von " counter(pages);
  }
}


/* Das Angebots-PDF wird bewusst im Hochformat aufgebaut. Das ist auch mit dem
   Windows-Systemdrucker "Microsoft Print to PDF" stabil und verhindert die
   doppelte Querformat-Rotation aus älteren Angebotsdokumenten. */
@page offer-report {
  size: A4 portrait;
  margin: 12mm 11mm 16mm;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #ffffff; /* Ensure background is white */
  color: #000000; /* Ensure text is black */
}

@media print {
  /* Hide non-printable elements */
  .no-print,
  .no-print * {
    display: none !important;
  }

  /* Show print-only elements */
  .print-only {
    display: block !important;
  }

  /* Show elements that should only appear on the print version */
  .print-only {
    display: block !important;
  }

  /* Ensure the main content area takes up the full page */
  body, .printable-area {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
  }

  /* Page break controls */
  .page-break-before {
    page-break-before: always;
  }

  .print-title-page {
    display: block !important;
    page-break-after: always;
  }

  .print-offer-title-page {
    box-sizing: border-box;
    width: 100% !important;
    padding-top: 6mm;
    overflow: visible !important;
  }

  .print-offer-title {
    max-width: 100% !important;
    margin: 0 0 12mm 0 !important;
    font-size: 22pt !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .print-offer-title__label,
  .print-offer-title__project {
    display: block !important;
    max-width: 100% !important;
  }

  .print-offer-title__project {
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
  }

  .print-offer-party-section {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin: 0 0 7mm 0 !important;
    max-width: 100% !important;
  }

  .print-offer-party-section h2 {
    margin: 0 0 4mm 0 !important;
    font-size: 17pt !important;
    font-weight: 700 !important;
  }

  .print-offer-party-section p {
    margin: 0 0 1.8mm 0 !important;
    font-size: 10pt !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .print-offer-party-divider {
    margin: 7mm 0 !important;
    border: 0 !important;
    border-top: 1px solid #d1d5db !important;
  }

  .price-summary-print {
    page-break-after: always;
  }

  .print-detailed-summary {
    display: block !important;
    page-break-before: always;
  }

  /* Angebotsbestätigungs-Protokoll im PDF immer auf neuer Seite starten */
  .print-offer-confirmation-protocol {
    page-break-before: always;
  }

  /* Angebots-Kostenkarte: saubere Seitenumbrüche zwischen Summary und Abzugsblock */
  .offer-cost-overview-print {
    break-inside: auto;
    page-break-inside: auto;
    box-shadow: none !important;
  }

  .offer-cost-overview-print__section,
  .offer-cost-overview-print__summary-grid,
  .offer-cost-overview-print__summary-item,
  .offer-cost-overview-print__breakdown,
  .offer-cost-overview-print__breakdown-header,
  .offer-cost-overview-print__breakdown-column,
  .offer-cost-overview-print__breakdown-row,
  .offer-cost-overview-print__options {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .offer-cost-overview-print__breakdown {
    break-before: auto;
    page-break-before: auto;
  }

  /* Running footer for Paged.js: capture content from .print-footer */
  .print-footer {
    position: running(footer);
    font-size: 9pt;
    color: #333;
  }

  /* Hide toast notifications in print */
  #react-hot-toast,
  [id*="react-hot-toast"],
  .react-hot-toast,
  [data-sonner-toaster],
  .sonner-toaster,
  .Toaster {
    display: none !important;
  }

  /* Hide global header and footer in print */
  nav, footer {
    display: none !important;
  }
}

/* General table styling for print */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 1px solid #dddddd;
  padding: 8px;
  text-align: left;
  font-size: 10pt; /* Adjust font size for print */
  word-wrap: break-word; /* Ensure long words do not overflow */
}

th {
  background-color: #f2f2f2; /* Light grey background for headers */
  font-weight: bold;
}

/* Remove any background colors from table cells, especially prices */
td, tr {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Specific print widths for the Unternehmer LV table */
.offer-lv-print-table th:nth-child(1), .offer-lv-print-table td:nth-child(1) { width: 8%; }  /* Pos. */
.offer-lv-print-table th:nth-child(2), .offer-lv-print-table td:nth-child(2) { width: 41%; } /* Beschreibung */
.offer-lv-print-table th:nth-child(3), .offer-lv-print-table td:nth-child(3) { width: 6%; }  /* Einheit */
.offer-lv-print-table th:nth-child(4), .offer-lv-print-table td:nth-child(4) { width: 7%; }  /* Menge */
.offer-lv-print-table th:nth-child(5), .offer-lv-print-table td:nth-child(5) { width: 13%; } /* EP */
.offer-lv-print-table th:nth-child(6), .offer-lv-print-table td:nth-child(6) { width: 13%; } /* TP */
.offer-lv-print-table th:nth-child(7), .offer-lv-print-table td:nth-child(7) { width: 12%; } /* LB-Kapitel */

/* Globaler PDF-Fußbereich mit Seitenzahlen und Metadaten */
@media print {
  /* Platz für den Fußbereich reservieren, damit Inhalt nicht überlappt */
  body {
    margin-bottom: 15mm !important;
  }

  .offer-lv-print-table-wrapper {
    overflow: visible !important;
  }

  .offer-lv-print-table {
    width: 100% !important;
    table-layout: fixed !important;
    margin-top: 0 !important;
  }

  .offer-lv-print-table th,
  .offer-lv-print-table td {
    padding: 4px 5px !important;
    font-size: 8pt !important;
    vertical-align: top !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .offer-lv-print-table th:nth-child(1),
  .offer-lv-print-table th:nth-child(3),
  .offer-lv-print-table th:nth-child(4),
  .offer-lv-print-table th:nth-child(5),
  .offer-lv-print-table th:nth-child(6),
  .offer-lv-print-table th:nth-child(7),
  .offer-lv-print-table td:nth-child(1),
  .offer-lv-print-table td:nth-child(3),
  .offer-lv-print-table td:nth-child(4),
  .offer-lv-print-table td:nth-child(5),
  .offer-lv-print-table td:nth-child(6),
  .offer-lv-print-table td:nth-child(7) {
    white-space: nowrap !important;
  }

  .offer-lv-print-table th:nth-child(4),
  .offer-lv-print-table th:nth-child(5),
  .offer-lv-print-table th:nth-child(6),
  .offer-lv-print-table td:nth-child(4),
  .offer-lv-print-table td:nth-child(5),
  .offer-lv-print-table td:nth-child(6) {
    text-align: right !important;
  }

  .print-ga-einheitspreise-block {
    display: block !important;
  }

  .print-ga-einheitspreise-block table {
    width: 100% !important;
    table-layout: fixed !important;
    margin-top: 12px !important;
  }

  .print-ga-einheitspreise-block th,
  .print-ga-einheitspreise-block td {
    font-size: 8.5pt !important;
    padding: 4px 6px !important;
    vertical-align: top !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .print-ga-einheitspreise-block td:last-child,
  .print-ga-einheitspreise-block th:last-child {
    white-space: nowrap !important;
    text-align: right !important;
  }

  /* Fixierter Footer auf jeder Seite beim Drucken/PDF */
  .global-print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15mm;
    font-size: 9pt;
    color: #333;
    border-top: 1px solid #ccc;
    background: #fff;
    z-index: 9999;
  }

  /* Seitennummerierung "Seite X von Y" */
  .global-print-footer .page-numbers::after {
    content: "Seite " counter(page) " von " counter(pages);
  }
}

/* --------------------------------------------------------------------------
   Professionelles Angebotsdokument
   -------------------------------------------------------------------------- */
@media print {
  html.offer-print-active,
  body.offer-print-active {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #172033 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9pt !important;
    line-height: 1.4 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.offer-print-active #root,
  body.offer-print-active #root > div,
  body.offer-print-active main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.offer-print-active .offer-print-document {
    page: offer-report;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.offer-print-active .offer-print-document .no-print,
  body.offer-print-active .offer-print-document .no-print * {
    display: none !important;
  }

  body.offer-print-active .offer-print-document > :not(.print-title-page):not(.offer-print-page-body),
  body.offer-print-active .offer-print-page-body > :not(.printable-area) {
    display: none !important;
  }

  body.offer-print-active .print-only {
    display: block !important;
  }

  body.offer-print-active .print-kicker {
    margin: 0 0 2mm !important;
    color: #1d4ed8 !important;
    font-size: 7.5pt !important;
    font-weight: 700 !important;
    letter-spacing: 0.11em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
  }

  /* Titelseite */
  body.offer-print-active .print-offer-title-page {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 262mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    break-after: page !important;
    page-break-after: always !important;
  }

  body.offer-print-active .print-offer-brandbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 5mm !important;
    border-bottom: 0.5mm solid #1d4ed8 !important;
  }

  body.offer-print-active .print-offer-brand {
    color: #0f172a !important;
    font-size: 17pt !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
  }

  body.offer-print-active .print-offer-document-type {
    color: #64748b !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
  }

  body.offer-print-active .print-offer-hero {
    padding: 18mm 0 12mm !important;
  }

  body.offer-print-active .print-offer-title {
    max-width: 165mm !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 25pt !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.offer-print-active .print-offer-subtitle {
    margin: 4mm 0 0 !important;
    color: #64748b !important;
    font-size: 10pt !important;
  }

  body.offer-print-active .print-offer-keyfacts {
    display: grid !important;
    grid-template-columns: 0.8fr 0.8fr 1.4fr !important;
    gap: 3mm !important;
    margin: 0 0 12mm !important;
  }

  body.offer-print-active .print-offer-keyfacts > div {
    display: flex !important;
    min-height: 20mm !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 4mm !important;
    border: 0.25mm solid #dbe3ef !important;
    border-radius: 2mm !important;
    background: #f8fafc !important;
    break-inside: avoid !important;
  }

  body.offer-print-active .print-offer-keyfacts span,
  body.offer-print-active .print-summary-total span,
  body.offer-print-active .print-summary-highlights span {
    display: block !important;
    margin-bottom: 1.2mm !important;
    color: #64748b !important;
    font-size: 7pt !important;
    font-weight: 700 !important;
    letter-spacing: 0.045em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
  }

  body.offer-print-active .print-offer-keyfacts strong {
    color: #0f172a !important;
    font-size: 10pt !important;
    line-height: 1.25 !important;
  }

  body.offer-print-active .print-offer-keyfacts .is-total {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
  }

  body.offer-print-active .print-offer-keyfacts .is-total strong {
    color: #1d4ed8 !important;
    font-size: 13pt !important;
  }

  body.offer-print-active .print-offer-parties {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5mm !important;
  }

  body.offer-print-active .print-offer-party-section {
    box-sizing: border-box !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 5mm !important;
    border: 0.25mm solid #dbe3ef !important;
    border-radius: 2mm !important;
    background: #fff !important;
    break-inside: avoid !important;
  }

  body.offer-print-active .print-party-label {
    margin: 0 0 2mm !important;
    color: #64748b !important;
    font-size: 7pt !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
  }

  body.offer-print-active .print-offer-party-section h2 {
    margin: 0 0 4mm !important;
    color: #0f172a !important;
    font-size: 12pt !important;
    line-height: 1.2 !important;
  }

  body.offer-print-active .print-offer-party-section dl,
  body.offer-print-active .print-offer-party-section dl div {
    margin: 0 !important;
  }

  body.offer-print-active .print-offer-party-section dl div {
    display: grid !important;
    grid-template-columns: 20mm minmax(0, 1fr) !important;
    gap: 2mm !important;
    padding: 1.2mm 0 !important;
    border-top: 0.2mm solid #eef2f7 !important;
    font-size: 8pt !important;
  }

  body.offer-print-active .print-offer-party-section dt {
    color: #64748b !important;
    font-weight: 600 !important;
  }

  body.offer-print-active .print-offer-party-section dd {
    min-width: 0 !important;
    margin: 0 !important;
    color: #172033 !important;
    overflow-wrap: anywhere !important;
  }

  body.offer-print-active .print-offer-title-footer {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: auto !important;
    padding-top: 4mm !important;
    border-top: 0.25mm solid #dbe3ef !important;
    color: #64748b !important;
    font-size: 7.5pt !important;
  }

  /* Preisübersicht */
  body.offer-print-active .price-summary-print {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-before: page !important;
    page-break-before: always !important;
    break-after: page !important;
    page-break-after: always !important;
  }

  body.offer-print-active .print-summary-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 58mm !important;
    gap: 7mm !important;
    align-items: end !important;
    margin-bottom: 7mm !important;
    padding-bottom: 5mm !important;
    border-bottom: 0.5mm solid #1d4ed8 !important;
    break-inside: avoid !important;
  }

  body.offer-print-active .print-summary-header h2,
  body.offer-print-active .print-lv-heading h2 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 20pt !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.1 !important;
  }

  body.offer-print-active .print-summary-header p:last-child,
  body.offer-print-active .print-lv-heading > div > p:last-child {
    margin: 2mm 0 0 !important;
    color: #64748b !important;
    font-size: 8pt !important;
  }

  body.offer-print-active .print-summary-total {
    padding: 4mm !important;
    border: 0.25mm solid #93c5fd !important;
    border-radius: 2mm !important;
    background: #eff6ff !important;
    text-align: right !important;
  }

  body.offer-print-active .print-summary-total strong {
    display: block !important;
    color: #1d4ed8 !important;
    font-size: 14pt !important;
    line-height: 1.2 !important;
  }

  body.offer-print-active .print-summary-highlights {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2.5mm !important;
    margin-bottom: 7mm !important;
    break-inside: avoid !important;
  }

  body.offer-print-active .print-summary-highlights > div {
    min-width: 0 !important;
    padding: 3mm !important;
    border: 0.25mm solid #dbe3ef !important;
    border-radius: 1.5mm !important;
    background: #f8fafc !important;
  }

  body.offer-print-active .print-summary-highlights strong {
    color: #0f172a !important;
    font-size: 9pt !important;
    white-space: nowrap !important;
  }

  body.offer-print-active .print-summary-highlights .is-option {
    border-color: #f4d58d !important;
    background: #fffbeb !important;
  }

  body.offer-print-active .print-summary-section {
    margin: 0 0 7mm !important;
  }

  body.offer-print-active .print-summary-section h3,
  body.offer-print-active .print-summary-calculation h3 {
    margin: 0 0 2.5mm !important;
    color: #172033 !important;
    font-size: 10pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  body.offer-print-active .print-summary-table {
    width: 100% !important;
    table-layout: fixed !important;
    margin: 0 !important;
    border: 0.25mm solid #cbd5e1 !important;
    border-collapse: collapse !important;
  }

  body.offer-print-active .print-summary-table th,
  body.offer-print-active .print-summary-table td {
    padding: 2mm 2.5mm !important;
    border: 0.2mm solid #dbe3ef !important;
    color: #172033 !important;
    font-size: 8pt !important;
    line-height: 1.3 !important;
    vertical-align: top !important;
  }

  body.offer-print-active .print-summary-table th {
    background: #eef2f7 !important;
    color: #475569 !important;
    font-size: 7pt !important;
    letter-spacing: 0.035em !important;
    text-transform: uppercase !important;
  }

  body.offer-print-active .print-summary-table th:first-child,
  body.offer-print-active .print-summary-table td:first-child {
    width: 25mm !important;
    font-weight: 700 !important;
  }

  body.offer-print-active .print-summary-table th:last-child,
  body.offer-print-active .print-summary-table td:last-child {
    width: 38mm !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.offer-print-active .print-summary-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.offer-print-active .print-summary-options {
    break-before: auto !important;
  }

  body.offer-print-active .print-summary-calculation {
    width: 96mm !important;
    margin: 8mm 0 0 auto !important;
    padding: 4mm !important;
    border: 0.25mm solid #cbd5e1 !important;
    border-radius: 2mm !important;
    background: #f8fafc !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.offer-print-active .print-summary-calculation dl,
  body.offer-print-active .print-summary-calculation dl div {
    margin: 0 !important;
  }

  body.offer-print-active .print-summary-calculation dl div {
    display: flex !important;
    justify-content: space-between !important;
    gap: 5mm !important;
    padding: 1.2mm 0 !important;
    color: #334155 !important;
    font-size: 8pt !important;
  }

  body.offer-print-active .print-summary-calculation dt,
  body.offer-print-active .print-summary-calculation dd {
    margin: 0 !important;
  }

  body.offer-print-active .print-summary-calculation dd {
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
  }

  body.offer-print-active .print-summary-calculation .is-subtotal {
    font-weight: 700 !important;
  }

  body.offer-print-active .print-summary-calculation .is-grand-total {
    margin-top: 1.5mm !important;
    padding-top: 2.5mm !important;
    border-top: 0.5mm solid #1d4ed8 !important;
    color: #1d4ed8 !important;
    font-size: 11pt !important;
    font-weight: 800 !important;
  }

  /* Leistungsverzeichnis */
  body.offer-print-active .printable-area {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.offer-print-active .offer-lv-print-content > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0 !important;
  }

  body.offer-print-active .print-lv-heading {
    display: flex !important;
    align-items: end !important;
    justify-content: space-between !important;
    gap: 8mm !important;
    margin: 0 0 7mm !important;
    padding: 0 0 5mm !important;
    border-bottom: 0.5mm solid #1d4ed8 !important;
    break-before: page !important;
    page-break-before: always !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  body.offer-print-active .print-lv-heading__note {
    max-width: 62mm !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 7pt !important;
    line-height: 1.35 !important;
    text-align: right !important;
  }

  body.offer-print-active .offer-lv-print-chapter {
    margin: 0 0 7mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: #fff !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.offer-print-active .offer-lv-print-chapter-header {
    display: block !important;
    margin: 0 0 4mm !important;
    padding: 3.2mm 4mm !important;
    border: 0 !important;
    border-left: 1.2mm solid #1d4ed8 !important;
    background: #eff6ff !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  body.offer-print-active .offer-lv-print-chapter-header h2 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 12pt !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  body.offer-print-active .offer-lv-print-chapter-header p {
    margin: 1mm 0 0 !important;
    color: #475569 !important;
    font-size: 7.5pt !important;
  }

  body.offer-print-active .offer-lv-print-description-block,
  body.offer-print-active .offer-lv-print-section {
    margin: 0 !important;
    padding: 0 0 4mm !important;
    border: 0 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.offer-print-active .offer-lv-print-description {
    margin: 0 0 3mm !important;
    padding: 3mm 3.5mm !important;
    border: 0.2mm solid #dbe3ef !important;
    border-left: 0.8mm solid #94a3b8 !important;
    border-radius: 1mm !important;
    background: #f8fafc !important;
    color: #334155 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.offer-print-active .offer-lv-print-description h4 {
    margin: 0 0 1.5mm !important;
    color: #334155 !important;
    font-size: 7.5pt !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  body.offer-print-active .offer-lv-print-description div {
    color: #334155 !important;
    font-size: 7.5pt !important;
    line-height: 1.38 !important;
  }

  body.offer-print-active .offer-lv-print-section-title {
    margin: 0 0 2mm !important;
    padding: 2mm 2.5mm !important;
    border-bottom: 0.35mm solid #94a3b8 !important;
    background: #f8fafc !important;
    color: #172033 !important;
    font-size: 9pt !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  body.offer-print-active .offer-lv-print-table-wrapper {
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.offer-print-active .offer-lv-print-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    border: 0.25mm solid #94a3b8 !important;
  }

  body.offer-print-active .offer-lv-print-table col.offer-lv-col-pos { width: 11% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-description { width: 43% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-unit { width: 6% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-quantity { width: 7% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-unit-price { width: 12% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-total-price { width: 12% !important; }
  body.offer-print-active .offer-lv-print-table col.offer-lv-col-lb { width: 9% !important; }

  body.offer-print-active .offer-lv-print-table thead {
    display: table-header-group !important;
  }

  body.offer-print-active .offer-lv-print-table th,
  body.offer-print-active .offer-lv-print-table td {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 1.4mm 1.2mm !important;
    border: 0.2mm solid #cbd5e1 !important;
    background: #fff !important;
    color: #172033 !important;
    font-size: 6.8pt !important;
    line-height: 1.32 !important;
    vertical-align: top !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.offer-print-active .offer-lv-print-table th {
    padding-top: 1.8mm !important;
    padding-bottom: 1.8mm !important;
    background: #e9eef5 !important;
    color: #334155 !important;
    font-size: 6.2pt !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.15 !important;
  }

  body.offer-print-active .offer-lv-print-table td *,
  body.offer-print-active .offer-lv-print-table td p,
  body.offer-print-active .offer-lv-print-table td div,
  body.offer-print-active .offer-lv-print-table td span {
    font-size: inherit !important;
    line-height: 1.32 !important;
  }

  body.offer-print-active .offer-lv-print-table th:nth-child(1),
  body.offer-print-active .offer-lv-print-table td:nth-child(1),
  body.offer-print-active .offer-lv-print-table th:nth-child(3),
  body.offer-print-active .offer-lv-print-table td:nth-child(3),
  body.offer-print-active .offer-lv-print-table th:nth-child(4),
  body.offer-print-active .offer-lv-print-table td:nth-child(4),
  body.offer-print-active .offer-lv-print-table th:nth-child(5),
  body.offer-print-active .offer-lv-print-table td:nth-child(5),
  body.offer-print-active .offer-lv-print-table th:nth-child(6),
  body.offer-print-active .offer-lv-print-table td:nth-child(6) {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }

  body.offer-print-active .offer-lv-print-table th:nth-child(4),
  body.offer-print-active .offer-lv-print-table td:nth-child(4),
  body.offer-print-active .offer-lv-print-table th:nth-child(5),
  body.offer-print-active .offer-lv-print-table td:nth-child(5),
  body.offer-print-active .offer-lv-print-table th:nth-child(6),
  body.offer-print-active .offer-lv-print-table td:nth-child(6) {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
  }

  body.offer-print-active .offer-lv-print-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.offer-print-active .offer-lv-print-table tr[data-offer-main-position="true"] {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.offer-print-active .offer-lv-print-table tr[data-offer-main-position="true"] td {
    border-top: 0.35mm solid #94a3b8 !important;
    border-bottom: 0.35mm solid #94a3b8 !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 800 !important;
  }

  /* Nachgelagerte Dokumentteile */
  body.offer-print-active .print-ga-einheitspreise-block {
    margin: 0 !important;
    padding: 0 !important;
    break-before: page !important;
    page-break-before: always !important;
  }

  body.offer-print-active .print-ga-einheitspreise-block h2 {
    margin: 0 0 5mm !important;
    padding-bottom: 4mm !important;
    border-bottom: 0.5mm solid #1d4ed8 !important;
    color: #0f172a !important;
    font-size: 18pt !important;
  }

  body.offer-print-active .print-ga-einheitspreise-block table {
    margin-top: 4mm !important;
  }

  body.offer-print-active .print-ga-einheitspreise-block th,
  body.offer-print-active .print-ga-einheitspreise-block td {
    padding: 1.5mm 1.8mm !important;
    font-size: 7pt !important;
    line-height: 1.3 !important;
  }

  body.offer-print-active .print-offer-confirmation-protocol {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 8pt !important;
    break-before: page !important;
    page-break-before: always !important;
  }

  body.offer-print-active .print-offer-confirmation-protocol * {
    box-shadow: none !important;
  }

  /* Der eigene alte Fix-Footer konkurriert sonst mit den Drucker-Kopfzeilen und
     kann Tabellen überdecken. Dokumenttitel und Seitenzahl liefert der Browser. */
  body.offer-print-active .global-print-footer,
  body.offer-print-active .print-footer {
    display: none !important;
  }
}

/* Diese Regeln muessen am Dateiende stehen: Sie ersetzen im Windows-PDF-Treiber
   die ueberlagerungsanfaelligen Layout- und Hintergrundebenen des Angebots. */
@media print {
  html body.offer-print-active .print-offer-title-page,
  html body.offer-print-active .price-summary-print,
  html body.offer-print-active .offer-lv-print-content,
  html body.offer-print-active .print-offer-confirmation-protocol {
    display: block !important;
    position: static !important;
    min-height: 0 !important;
    overflow: visible !important;
    isolation: auto !important;
    contain: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body.offer-print-active .print-offer-brandbar,
  html body.offer-print-active .print-offer-keyfacts,
  html body.offer-print-active .print-offer-parties,
  html body.offer-print-active .print-summary-highlights,
  html body.offer-print-active .print-offer-title-footer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    overflow: visible !important;
    font-size: 0 !important;
  }

  html body.offer-print-active .print-offer-brandbar > *,
  html body.offer-print-active .print-offer-keyfacts > div,
  html body.offer-print-active .print-offer-parties > article,
  html body.offer-print-active .print-summary-highlights > div,
  html body.offer-print-active .print-offer-title-footer > * {
    display: inline-block !important;
    position: static !important;
    vertical-align: top !important;
    min-height: 0 !important;
    overflow: visible !important;
    transform: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body.offer-print-active .print-offer-brandbar > *,
  html body.offer-print-active .print-offer-title-footer > * {
    width: 50% !important;
  }

  html body.offer-print-active .print-offer-keyfacts > div {
    width: 32% !important;
    margin: 0 2% 0 0 !important;
    padding: 3mm !important;
    background: transparent !important;
  }

  html body.offer-print-active .print-offer-keyfacts > div:last-child {
    margin-right: 0 !important;
  }

  html body.offer-print-active .print-offer-keyfacts > div > * {
    display: block !important;
    position: static !important;
  }

  html body.offer-print-active .print-offer-keyfacts .is-total,
  html body.offer-print-active .print-offer-keyfacts .is-total * {
    background: transparent !important;
    color: #0f172a !important;
  }

  html body.offer-print-active .print-offer-parties > article {
    width: 49% !important;
    margin: 0 2% 0 0 !important;
    padding: 4mm !important;
    background: transparent !important;
  }

  html body.offer-print-active .print-offer-parties > article:last-child {
    margin-right: 0 !important;
  }

  html body.offer-print-active .print-offer-party-section dl div {
    display: block !important;
    position: static !important;
    overflow: visible !important;
  }

  html body.offer-print-active .print-offer-party-section dt,
  html body.offer-print-active .print-offer-party-section dd {
    display: inline-block !important;
    position: static !important;
    vertical-align: top !important;
  }

  html body.offer-print-active .print-offer-party-section dt {
    width: 34% !important;
  }

  html body.offer-print-active .print-offer-party-section dd {
    width: 66% !important;
  }

  html body.offer-print-active .print-offer-title-footer {
    position: static !important;
    margin-top: 14mm !important;
  }

  html body.offer-print-active .print-summary-header,
  html body.offer-print-active .print-lv-heading {
    display: block !important;
    position: static !important;
    overflow: visible !important;
  }

  html body.offer-print-active .print-summary-header > *,
  html body.offer-print-active .print-lv-heading > * {
    display: block !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-align: left !important;
  }

  html body.offer-print-active .print-summary-total {
    display: block !important;
    position: static !important;
    width: 62mm !important;
    margin: 5mm 0 0 auto !important;
    padding: 3.5mm !important;
    background: transparent !important;
    color: #0f172a !important;
    border: 0.45mm solid #1d4ed8 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: right !important;
  }

  html body.offer-print-active .print-summary-total * {
    background: transparent !important;
    color: #0f172a !important;
  }

  html body.offer-print-active .print-summary-highlights > div {
    width: 23.5% !important;
    margin: 0 2% 0 0 !important;
    padding: 3mm !important;
    background: transparent !important;
  }

  html body.offer-print-active .print-summary-highlights > div:last-child {
    margin-right: 0 !important;
  }

  html body.offer-print-active .print-summary-highlights .is-option,
  html body.offer-print-active .print-summary-highlights .is-option * {
    background: transparent !important;
  }

  html body.offer-print-active .print-summary-calculation {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body.offer-print-active .print-summary-calculation dl div {
    display: block !important;
    position: static !important;
    width: 100% !important;
    overflow: visible !important;
    background: transparent !important;
  }

  html body.offer-print-active .print-summary-calculation dt,
  html body.offer-print-active .print-summary-calculation dd {
    display: inline-block !important;
    position: static !important;
    vertical-align: top !important;
    background: transparent !important;
  }

  html body.offer-print-active .print-summary-calculation dt {
    width: 64% !important;
  }

  html body.offer-print-active .print-summary-calculation dd {
    width: 36% !important;
    text-align: right !important;
  }

  html body.offer-print-active .print-summary-calculation .is-grand-total,
  html body.offer-print-active .print-summary-calculation .is-grand-total * {
    background: transparent !important;
    color: #0f172a !important;
  }

  html body.offer-print-active .offer-lv-print-chapter,
  html body.offer-print-active .offer-lv-print-chapter-header,
  html body.offer-print-active .offer-lv-print-description,
  html body.offer-print-active .offer-lv-print-description *,
  html body.offer-print-active .offer-lv-print-section-title {
    position: static !important;
    overflow: visible !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  html body.offer-print-active .print-summary-table tbody tr,
  html body.offer-print-active .offer-lv-print-table tbody tr,
  html body.offer-print-active .print-ga-einheitspreise-block tbody tr {
    background: transparent !important;
  }

  html body.offer-print-active .print-summary-table td,
  html body.offer-print-active .print-summary-table td *,
  html body.offer-print-active .offer-lv-print-table td,
  html body.offer-print-active .offer-lv-print-table td *,
  html body.offer-print-active .print-ga-einheitspreise-block td,
  html body.offer-print-active .print-ga-einheitspreise-block td * {
    position: static !important;
    overflow: visible !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  html body.offer-print-active .offer-lv-print-table tr[data-offer-main-position="true"] td,
  html body.offer-print-active .offer-lv-print-table tr[data-offer-main-position="true"] td * {
    background: transparent !important;
    color: #0f172a !important;
  }
}
