/* v25 — clean PDF print layout for ALL CV templates
   Goals:
   1) suppress browser-generated header/footer text by using zero @page margins;
   2) keep balanced left/right page space;
   3) restore top/bottom breathing room on each printed fragment via cloned box padding;
   4) affect Print/PDF only — never Word or live preview. */
@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .workspace,
  .preview-area,
  .preview-scroll,
  #zoom-frame {
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #resume.resume,
  .resume {
    box-sizing: border-box !important;
    position: static !important;
    transform: none !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    min-height: 0 !important;
    margin: 0 !important;

    /* These become the visible PDF page margins. box-decoration-break: clone
       asks Chromium to repeat the padding on every fragmented printed page. */
    padding: 11mm 13mm 12mm !important;
    -webkit-box-decoration-break: clone !important;
    box-decoration-break: clone !important;

    box-shadow: none !important;
    overflow: visible !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Prevent inherited template widths from narrowing the printable CV. */
  .resume > *,
  .resume section,
  .resume .cv-column-wrap,
  .resume .cv-columns {
    max-width: 100% !important;
  }

  /* Keep compact end sections together where practical. */
  .resume .references-grid,
  .resume .references,
  .resume .interests,
  .resume [data-section="references"],
  .resume [data-section="interests"] {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .toolbar,
  .editor,
  .preview-bar,
  .print-tip,
  #status,
  .stepbar,
  .wizard-footer,
  .zoom-tools,
  #review-dialog {
    display: none !important;
  }
}
