/* VentData Web — Print Styles
   Optimize patient detail for paper output (clinical records). */

@media print {
  /* Hide interactive chrome */
  .sidebar,
  .breadcrumb,
  .time-range-buttons,
  .dashboard-controls,
  .btn,
  .btn-icon,
  .setting-changes-section summary .expand-hint,
  .htmx-indicator,
  form[hx-get],
  #events-modal,
  #events-modal-body {
    display: none !important;
  }

  /* Reset page chrome */
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Cards: no shadow, simple border, avoid breaking */
  .card,
  .patient-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: white !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  /* Ensure charts scale */
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Force details open in print */
  details {
    display: block !important;
  }

  details > summary {
    list-style: none;
    font-weight: 600;
  }

  details > summary::-webkit-details-marker { display: none; }

  /* Headings in black for print */
  h1, h2, h3, h4 {
    color: black !important;
  }

  /* Links: show URL next to them */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  /* Page margins */
  @page {
    margin: 1.5cm;
  }

  /* Avoid orphan headings */
  h2, h3 {
    page-break-after: avoid;
  }
}
