/* ============================================================================
   WeedUs Case Card Studio - print rules
   Linked with media="print" so these apply only when printing. The whole
   document is stripped down to the printed card at true size. The card is a
   self-contained SVG sized in inches (width / height attributes from the
   engine), so it prints crisp with no rescaling.

   Vanilla CSS. No external font or asset fetch. CSP safe.
   No em or en dashes anywhere (owner rule). ASCII hyphen only.
   ============================================================================ */

@media print {

  /* borderless sheet so the card can print at true size */
  @page { margin: 0; }

  html, body {
    background: #ffffff !important;
    margin: 0;
    padding: 0;
  }

  /* hide every piece of app chrome; only the card region survives */
  .cc-topbar,
  .cc-tabs,
  .cc-user,
  .cc-gate,
  .cc-toasts,
  #cc-toast,
  .cc-modal-backdrop,
  .cc-actionbar,
  .cc-stage-bar,
  .cc-easy-panel,
  .cc-advanced-rail,
  .cc-page-head,
  .cc-inv-toolbar,
  .cc-tpl-toolbar,
  .cc-panel[data-tab="inventory"],
  .cc-panel[data-tab="templates"] {
    display: none !important;
  }

  /* the designer panel becomes a plain flow container for the card only */
  .cc-app,
  .cc-panel[data-tab="designer"],
  .cc-designer {
    display: block !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  /* stage: drop the ambient decoration, padding and clipping */
  .cc-stage,
  .cc-stage-scroll {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  /* neutralize the preview zoom and the drop shadow so the card prints 1:1 */
  .cc-stage-canvas {
    transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  /* the card itself prints at its true inch size defined by the SVG */
  #cc-card-mount,
  #cc-card-mount svg,
  .cc-card {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cc-card {
    width: var(--card-w) !important;
    height: var(--card-h) !important;
  }

  /* faithful colours on paper (backgrounds, fills, zebra, accents) */
  .cc-card,
  .cc-card * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* multiple menu pages: each page starts fresh */
  .cc-card + .cc-card,
  .cc-print-page + .cc-print-page {
    page-break-before: always;
    break-before: page;
  }
  .cc-print-page {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* bleed / crop marks print solid black */
  .cc-bleed.show-bleed .cc-crop,
  .cc-card.show-bleed .cc-crop {
    stroke: #000000 !important;
    border-color: #000000 !important;
  }

  /* stop any motion during the print snapshot */
  * {
    transition: none !important;
    animation: none !important;
  }
}
