/* Print Styles for Expertisen and Documents */

@media print {
  /* Hide navigation and UI elements */
  header,
  nav,
  footer,
  .no-print,
  button:not(.print-preserve),
  [role="navigation"],
  [aria-label="Navigation"] {
    display: none !important;
  }

  /* Page setup */
  @page {
    margin: 2cm;
    size: A4 portrait;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  /* Preserve backgrounds for important elements */
  .print-preserve-bg {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  /* Cards and containers */
  .card,
  .border {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }

  /* Headers */
  h1 {
    font-size: 24pt;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }

  h2 {
    font-size: 18pt;
    margin-top: 12pt;
    margin-bottom: 6pt;
    page-break-after: avoid;
  }

  h3 {
    font-size: 14pt;
    margin-top: 8pt;
    margin-bottom: 4pt;
    page-break-after: avoid;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: avoid;
  }

  th,
  td {
    border: 1px solid #000;
    padding: 8pt;
  }

  /* Images */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  /* Links */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-style: italic;
  }

  a[href^="/"]:after,
  a[href^="#"]:after {
    content: "";
  }

  /* Page breaks */
  .page-break-before {
    page-break-before: always;
  }

  .page-break-after {
    page-break-after: always;
  }

  .page-break-avoid {
    page-break-inside: avoid;
  }

  /* Expertise specific styles */
  .expertise-header {
    text-align: center;
    margin-bottom: 24pt;
    page-break-after: avoid;
  }

  .expertise-number {
    font-size: 14pt;
    font-weight: bold;
    margin-bottom: 8pt;
  }

  .expertise-date {
    font-size: 11pt;
    color: #666;
  }

  .expertise-section {
    margin-bottom: 16pt;
    page-break-inside: avoid;
  }

  .expertise-label {
    font-weight: bold;
    margin-bottom: 4pt;
  }

  .expertise-value {
    margin-bottom: 8pt;
  }

  /* Signature area */
  .signature-area {
    margin-top: 48pt;
    page-break-inside: avoid;
  }

  .signature-line {
    border-top: 1px solid #000;
    width: 200pt;
    margin-top: 48pt;
  }

  /* Footer for page numbers */
  .print-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 9pt;
    color: #666;
  }

  /* QR Codes and barcodes */
  .qr-code,
  .barcode {
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Print button styling */
@media screen {
  .print-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
  }
}
