/**
 * RCMC — print stylesheet for the accessible form editions (0.72, audit finding F-02).
 *
 * Loaded only on /resources/investors-corner/forms/<slug> (via head.php's $page_css). The
 * printout IS the form the investor signs and lodges, so print shows the form header, every
 * printed word, the answers, and the signature / photograph / office-use boxes — and nothing of
 * the website around it. Every rule sits inside @media print, so the screen breakpoint scale
 * (breakpoint-scale.test.js: 600 / 900 / 1024 only) is untouched.
 */
@media print {
  @page { margin: 14mm 12mm; }

  /* Site chrome, the intro and the controls around the form do not print. */
  .skip-link,
  .nav,
  .footer,
  .page-hero,
  .form-edition-intro,
  .doc-row,
  .form-edition__actions,
  .form-edition__errors,
  .form-edition__screen-only,
  .form-edition__box-how,
  .form-error {
    display: none !important;
  }

  body,
  main,
  .section,
  .container {
    background: var(--color-white) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  .form-edition {
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    gap: 3mm !important;
    font-size: 10pt;
    color: var(--rcmc-text-primary);
  }
  .form-edition__header { border-bottom: 1px solid var(--rcmc-text-primary); }

  /* Answers print as filled lines, not web input boxes. */
  .form-input,
  .form-select,
  .form-textarea {
    border: 0 !important;
    border-bottom: 1px solid var(--rcmc-text-primary) !important;
    border-radius: 0 !important;
    padding: 1mm 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 7mm;
    overflow: visible !important;
  }
  .form-select { background-image: none !important; }
  .form-textarea { resize: none !important; }
  input[type="date"]::-webkit-calendar-picker-indicator { display: none; }

  .form-edition__group {
    border-color: var(--rcmc-text-primary) !important;
    padding: 3mm !important;
    break-inside: avoid;
  }
  .entitle-form__radio {
    border: 0 !important;
    padding: 0 !important;
  }

  /* Boxes for pen, glue and office stamps: solid, generous, never split across pages. */
  .form-edition__box {
    border: 1px solid var(--rcmc-text-primary) !important;
    background: transparent !important;
    min-height: 22mm;
    break-inside: avoid;
  }
  .form-edition__box--photograph { min-height: 45mm; width: 35mm; }

  /* Tables print as tables at any page width, headers repeated on each page. */
  .table-wrap { overflow: visible !important; border: 0 !important; }
  .table { min-width: 0 !important; }
  .table thead { display: table-header-group !important; }
  .table tr { break-inside: avoid; }

  /* Printed links show their address. */
  .form-edition a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; }
}
