/* print.css — applies only when rendering for paper / PDF */
@page {
  size: A4 landscape;
  margin: 10mm;
}

@page :first {
  margin-top: 20mm;
}

@media print {
  body { background: white !important; color: #0B1F33; }

  /* Hide UI chrome */
  .portal-header, .breadcrumbs, .top-nav, .admin-sidebar,
  .save-indicator, .toast, .btn, .nav, .footer,
  [data-radix-popper-content-wrapper],
  .no-print { display: none !important; }

  /* Force each slide to its own page */
  .slide {
    page-break-after: always;
    page-break-inside: avoid;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .slide:last-child { page-break-after: auto; }

  .slide { container-type: normal; }

  /* Expand all text areas to show full content */
  textarea, .auto-collapse {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Hide form interactivity hints */
  .placeholder, .char-counter, .helper-text { display: none !important; }

  /* Form value rendering for SUBMISSION PDFs */
  .submission-print input[type=text],
  .submission-print input[type=date],
  .submission-print textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    color: #0B1F33 !important;
    font-weight: 500;
  }

  /* Show full URLs after links */
  a[href]:after { content: " (" attr(href) ")"; font-size: 0.85em; color: #6B7480; }
  a[href^="#"]:after, a[href^="javascript"]:after { content: ""; }

  /* Repeat heading on each page break for long exercises */
  h1, h2, h3 { page-break-after: avoid; }

  /* Avoid orphans/widows */
  p, li { orphans: 3; widows: 3; }

  /* Cover page for submission PDFs */
  .pdf-cover {
    page-break-after: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 90vh;
  }
  .pdf-cover h1 { font-size: 28pt; color: #0B1F33; margin: 0; }
  .pdf-cover .meta { font-size: 12pt; color: #6B7480; margin-top: 12pt; }
}
