/* Print stylesheet for the brand book viewer */
@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }

  /* Hide UI chrome */
  header,
  aside,
  nav,
  .no-print,
  [data-print-hide="true"] {
    display: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0A0909 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Force the viewer content to take the full page width */
  .editor-desktop-content,
  main,
  [data-print-root="true"] {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  /* Each chapter starts on a fresh page */
  [data-print-chapter] {
    page-break-before: always;
    break-before: page;
    padding-top: 8mm;
  }
  [data-print-chapter]:first-of-type {
    page-break-before: auto;
    break-before: auto;
  }

  /* Avoid splitting inside sections / blocks */
  [data-print-section],
  [data-sid],
  .print-keep {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Color swatches: ensure value visible */
  .swatch::after {
    content: attr(data-hex);
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 9pt;
    margin-top: 4px;
    color: #555;
  }

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

  /* Buttons / inputs: hide */
  button,
  input,
  textarea,
  [role="button"]:not([data-print-keep]) {
    display: none !important;
  }
}
