/* Hillyer Portal — shared print stylesheet.
   Queue item, Cristina 2026-08-13: printed reports/emails come out messy.
   Applies to any server-rendered page that links it via <link rel="stylesheet" media="print" href="/print.css">.
   Kept framework-free (plain CSS, no variables) so it degrades safely on any page that includes it. */

@media print {
  @page {
    margin: 1.5cm;
  }

  /* ── Chrome the reader never wants on paper: nav bars, side rails, action
     buttons, chat input, anything explicitly marked no-print. ── */
  nav,
  #topbar,
  #odoo-rail,
  #system-nav,
  #ai-panel,
  #login-overlay,
  .ai-form,
  .ai-chat,
  .topbar-actions,
  .layout-modes,
  .dropzone,
  .actions,
  header nav,
  button,
  input,
  select,
  textarea,
  .no-print {
    display: none !important;
  }

  /* ── Black on white, sensible reading size. Serif body text reads better
     on paper; fall back to system sans where a page has none configured. ── */
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-family: Georgia, 'Times New Roman', Cambria, serif;
    font-size: 11.5pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

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

  h1, h2, h3, h4 {
    color: #000 !important;
    page-break-after: avoid;
  }

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

  /* Never let the browser (or an inherited print stylesheet) expand href
     text after a link — keeps report/table text from doubling in length. */
  a[href]::after {
    content: none !important;
  }

  /* ── Tables: bordered cells, repeating header row across page breaks,
     no row split across a page boundary. ── */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    background: #fff !important;
  }

  table th,
  table td {
    border: 1px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
    padding: 4px 6px !important;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  tr,
  .card,
  .report-row,
  .row-card {
    page-break-inside: avoid;
  }

  /* Layout wrappers built for screen (flex/grid multi-column, fixed widths,
     scroll containers) need to give up their positioning on paper. */
  #workspace,
  #main-pane,
  #system-content {
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
  }

  main {
    max-width: none !important;
    margin: 0 !important;
  }
}
