/*
 * Global print stylesheet for resume export/print routes
 * - Enforces page size, margins, and color accuracy
 * - Hides interactive-only UI
 * - Provides pagination helpers
 */

@media print {
  html, body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #ffffff !important;
    color: #000000;
  }

  /* Page setup uses CSS variables injected by ThemeProvider */
  @page {
    size: var(--print-page-size, A4);
    margin: var(--print-margin-top, 20mm)
            var(--print-margin-right, 15mm)
            var(--print-margin-bottom, 20mm)
            var(--print-margin-left, 15mm);
  }

  /* Typography fallbacks for print */
  body {
    font-family: var(--font-family-sans, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    font-size: var(--font-size-base, 1rem);
    line-height: var(--line-height-base, 1.5rem);
  }

  /* Images should not overflow */
  img, svg, video, canvas {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Links: preserve color, remove URL after printing */
  a, a:visited {
    color: inherit !important;
    text-decoration: none !important;
  }
  a[href]::after {
    content: '' !important;
  }

  /* Tables should paginate nicely */
  table {
    width: 100%;
    border-collapse: collapse;
    page-break-inside: auto;
  }
  tr, td, th {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Hide elements not meant for print */
  .no-print,
  [data-no-print="true"] {
    display: none !important;
  }

  /* Only show in print */
  .print-only,
  [data-print-only="true"] {
    display: block !important;
  }

  /* Pagination helpers */
  .avoid-page-break,
  [data-avoid-break="true"] {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .force-page-break,
  [data-break-before="page"] {
    page-break-before: always;
    break-before: page;
  }

  /* Reduce visual noise in print */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}


