/* ============================================================
   VIP Doors – Novajet 30L Precut Adhesive Labels Engine
   Sheet: A4 (210mm x 297mm) | 30 Labels per Sheet (3 cols x 10 rows)
   Label Dimensions: 67.5mm x 27.3mm (calibrated for zero page overflow)
   Margins: Top/Bottom 4.0mm, Left/Right 3.25mm
   Pitch: Horizontal 68.0mm (Gap 0.5mm), Vertical 28.8mm (Gap 1.5mm)
   Border: 2px Solid Black
   ============================================================ */

#thermalPrintContainer {
  display: none !important;
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Completely remove non-sticker containers from flow to eliminate empty pages */
  body.print-mode-stickers > *:not(#thermalPrintContainer) {
    display: none !important;
  }

  body.print-mode-stickers #thermalPrintContainer {
    display: block !important;
    position: static !important;
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .novajet-sheet {
    width: 210mm;
    height: 295mm;
    max-height: 295mm;
    box-sizing: border-box;
    margin: 0 auto;
    padding-top: 4.0mm;
    padding-bottom: 4.0mm;
    padding-left: 3.25mm;
    padding-right: 3.25mm;
    display: grid;
    grid-template-columns: repeat(3, 67.5mm);
    grid-template-rows: repeat(10, 27.3mm);
    column-gap: 0.5mm;
    row-gap: 1.5mm;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: hidden;
    background: #ffffff;
  }

  /* Prevent trailing blank page after final sheet */
  .novajet-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .novajet-label {
    width: 67.5mm;
    height: 27.3mm;
    max-width: 67.5mm;
    max-height: 27.3mm;
    box-sizing: border-box;
    border: 2px solid #000000 !important;
    border-radius: 2px;
    padding: 1.5mm 2mm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    overflow: hidden;
  }

  .novajet-label.blank-slot {
    border: none !important;
    visibility: hidden !important;
  }

  /* Top Row: Full party name across entire width (no truncation) */
  .novajet-party-full {
    width: 100%;
    font-size: 8.5pt;
    font-weight: 900;
    text-transform: uppercase;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    line-height: 1.15;
    text-align: left;
  }

  /* Center: HUGE Door Size */
  .novajet-size-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21pt;
    font-weight: 900;
    font-family: monospace, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1;
    color: #000000;
    text-align: center;
    letter-spacing: -0.5px;
    margin: 0;
  }

  .novajet-size-main.frame-size {
    font-size: 14pt;
  }

  /* Bottom Row: Order ID (Left) & Door Counting Badge (Right) */
  .novajet-bottom-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1;
  }

  .novajet-order-tag {
    font-size: 8pt;
    font-weight: 900;
    font-family: monospace;
    color: #000000;
    white-space: nowrap;
    letter-spacing: 0.2px;
  }

  .novajet-count-badge {
    font-size: 8.5pt;
    font-weight: 900;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: monospace;
    white-space: nowrap;
    line-height: 1;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
