/*
 * Tidalux Books — print-only rules (pure CSS, no Tailwind directives).
 * Deploy: cp resources/css/print.css public/css/print.css
 */

@page {
  size: A4;
  margin: 0.5cm;
}

@media print {
  /* Mirror Tailwind print:hidden + project conventions */
  .print\:hidden,
  [data-no-print],
  .print-hidden,
  aside,
  nav {
    display: none !important;
  }

  /* Screen chrome: keep invoice content only (header is .tx-banner-stack in template) */
  header {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  body,
  body * {
    color: #000 !important;
  }

  a,
  a:visited {
    color: #000 !important;
    text-decoration: underline;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  main {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }

  table {
    page-break-inside: auto;
    width: 100%;
    border-collapse: collapse;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  .invoice-line-items-table {
    page-break-inside: avoid !important;
  }

  /* Print collapsed <details> as if open (content visible). */
  details > *:not(summary) {
    display: block !important;
  }

  summary {
    display: block !important;
    list-style: none;
  }

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