/* print.css - clean print view of a flow.
   Loaded with media="print"; also guarded here so it never affects screen.
   Goal: expand every record, drop app chrome, high-contrast black-on-white. */

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #999999;
    --ink: #000000;
    --ink-soft: #333333;
    --ink-faint: #555555;
    --shadow: none;
    --accent: #000000;
    --accent-strong: #000000;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.4;
  }

  /* Hide all interactive chrome. */
  #appbar,
  .appbar,
  .skip-link,
  .toast-root,
  .modal-root,
  .page-head__actions,
  .searchbar,
  .tabs,
  .btn,
  .iconbtn,
  .record__chevron,
  .navlink,
  [data-no-print] {
    display: none !important;
  }

  .view {
    max-width: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  /* Print the whole flow expanded, single column. */
  .card,
  .table-wrap {
    border: 1px solid #999;
    box-shadow: none;
    break-inside: avoid;
  }

  /* Force every record card open regardless of screen state. */
  .record__detail,
  .record.is-open .record__detail {
    display: block !important;
    border-block-start: 1px solid #999;
  }
  .record {
    border: 1px solid #999 !important;
    background: #fff !important;
    break-inside: avoid;
    margin-block-end: 6pt;
  }
  .record--optional {
    border-style: dashed !important;
  }
  .record__detail {
    padding-inline-end: 14px;
  }

  /* Timeline spine simplified for paper. */
  .stage {
    break-inside: avoid;
    padding-inline-start: 0;
  }
  .stage::before,
  .stage__node::before {
    display: none !important;
  }
  .stage__node {
    border-block-end: 2px solid #000;
    padding-block: 4pt;
    margin-block-start: 8pt;
  }
  .stage__cards { padding-block-end: 8pt; }

  /* Badges as text markers (never rely on color in print). */
  .badge {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 1px 6px;
  }
  .badge::before { display: none; }
  .badge--required::after { content: " [חובה]"; }
  .badge--optional::after { content: " [בעת הצורך]"; }

  /* Keep links readable but do not print raw URLs after every link. */
  a { color: #000; text-decoration: underline; }

  /* Progress readable on paper. */
  .progress__track { border: 1px solid #000; }
  .progress__fill { background: #000 !important; }

  @page {
    margin: 16mm;
  }
}
