/* Tisk = PDF (ZADANI-BUILD.md §1). Tiskne se JEN náhled nabídky, UI mizí.
   Cíl: 1-2 strany A4, čitelná tabulka, logo a patička na místě. */

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  body {
    background: #fff !important;
    padding: 0 !important;
    font-size: 11pt;
  }

  /* všechno kromě náhledu pryč */
  .screen > .apphead,
  .editor > div:first-child,
  .previewhead,
  .actions,
  .pruh,
  #toast,
  .modal-bg,
  .footbar,
  #tisk-napoveda,
  .noprint { display: none !important; }

  .wrap { max-width: none; }
  .screen {
    border: none !important; box-shadow: none !important; border-radius: 0 !important;
    padding: 0 !important; margin: 0 !important; background: #fff !important;
  }
  .editor { display: block !important; }
  .preview { position: static !important; }

  .a4 {
    border: none !important; box-shadow: none !important; border-radius: 0 !important;
    padding: 0 !important; font-size: 9.4pt; line-height: 1.45;
  }
  /* barvy pozadí a linky musí do tisku projít */
  .a4, .a4 * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .a4 .head { border-bottom-width: 2.5pt; }
  .a4 .head img { height: 12mm; }
  .a4 .head .l1 { font-size: 14pt; }

  /* řádkování dle §5 bod 1b - třídy nastavuje JS podle počtu řádků */
  .a4.loose td { padding: 2.4mm 1.4mm; }
  .a4.tight td { padding: 1.3mm 1.4mm; }

  /* nic se nesmí roztrhnout uprostřed */
  .a4 table { page-break-inside: auto; }
  .a4 tr { page-break-inside: avoid; page-break-after: auto; }
  .a4 thead { display: table-header-group; }
  .a4 .sum { page-break-inside: avoid; }
  .a4 .args { page-break-inside: avoid; background: #f7fbfd !important; }
  .a4 .args.hero { background: #f2fafd !important; }
  .a4 .args.hero img { width: 42mm; }
  .a4 .foot { page-break-inside: avoid; }

  a { text-decoration: none; color: inherit; }
}
