/* ============================================================
   Roster — print.css
   Loaded only when printing (media="print" in base.html).
   Optimised for A4 portrait, browser print-to-PDF.
   ============================================================ */

@media print {

  @page {
    size: A4 portrait;
    margin: 1.2cm 1.5cm;
  }

  /* ── Base reset for print ── */
  html {
    font-size: 11px;
    background: white;
    color: black;
  }

  body { margin: 0; }

  .page {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* ── Hide navigation and non-printable elements ── */
  .month-nav,
  .no-print {
    display: none !important;
  }

  /* ── Avoid page breaks inside calendar cells and table rows ── */
  .cal-cell {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }

  .detail-table tbody tr {
    break-inside: avoid;
  }

  /* ── Keep calendar grid and detail table on same page if possible ── */
  .calendar-grid {
    break-inside: avoid;
  }

  /* ── Section separator ── */
  .section-sep {
    border-top: 1px solid #ccc;
    margin: 1rem 0;
  }

  /* ── Colours must print (override browser "print without background" default) ── */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* ── Flight/activity blocks: slightly reduce padding ── */
  .flight-block,
  .sol-block,
  .escale-block,
  .arrival-block {
    padding: 3px 6px 3px 5px;
  }

  /* ── Metrics: reduce padding ── */
  .metric-card {
    padding: 6px 8px;
  }

  /* ── Detail table: tighter rows ── */
  td.td-date,
  td.td-type,
  td.td-activity {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  /* ── Row hover suppressed in print ── */
  .detail-table tbody tr:hover {
    background: transparent;
  }
  .detail-table tbody tr.continuation-vol { background: rgba(230, 241, 251, 0.4); }
  .detail-table tbody tr.continuation-sol { background: rgba(250, 236, 231, 0.4); }
}
