/* Print Stylesheet for UKSICA */

@media print {
  /* Hide non-essential elements */
  header,
  footer,
  nav,
  .no-print,
  button,
  [role="navigation"],
  [aria-label="Breadcrumb"],
  .cookie-consent,
  .social-share {
    display: none !important;
  }

  /* Reset colors for print */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Optimize layout */
  body {
    font-size: 12pt;
    line-height: 1.5;
    margin: 0;
    padding: 20mm;
  }

  /* Preserve links */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #666;
  }

  /* Prevent page breaks in inappropriate places */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  img, table, figure {
    page-break-inside: avoid;
  }

  ul, ol, dl {
    page-break-before: avoid;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }

  th {
    background-color: #f4f4f4 !important;
    font-weight: bold;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Page numbers */
  @page {
    margin: 2cm;
  }

  /* Add page breaks before major sections */
  .page-break {
    page-break-before: always;
  }

  /* Preserve important elements */
  .print-preserve {
    display: block !important;
  }
}
