/* ==========================================================================
   PRINT STYLES — cvprojekt.pl
   Hides ALL page UI; shows ONLY the CV at exact A4 dimensions.
   ========================================================================== */

@media print {

  @page {
    size: A4 portrait;
    margin: 0;
  }

  /* ── Step 1: Hide EVERYTHING ── */
  body > * {
    display: none !important;
  }

  /* ── Step 2: Show only the path to the CV ── */
  body > .generator-container {
    display: block !important;
  }
  .generator-container > .form-panel {
    display: none !important;
  }
  .generator-container > .preview-panel {
    display: block !important;
  }

  /* ── Hide preview controls (color picker etc) ── */
  .preview-controls {
    display: none !important;
  }

  /* ── Reset body ── */
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  /* ── Generator container: remove grid, no chrome ── */
  .generator-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: auto !important;
    gap: 0 !important;
    border: none !important;
  }

  /* ── Preview panel: static, clean ── */
  .preview-panel {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* ── CV container: undo JS scaling, exact A4 ── */
  #cvPreviewContainer {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  #cvPreview {
    transform: none !important;
    width: 210mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .cv-page.cv-classic {
    width: 210mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
  }

  /* ── Force background colors to print ── */
  .cv-sidebar {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  .cv-sidebar .cv-photo img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ── Prevent page breaks inside entries ── */
  .cv-entry,
  .cv-section,
  .cv-sidebar-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
