/* ==========================================================
   THERMAL PRINTER STYLESHEET (58mm & 80mm COMPATIBLE)
   ========================================================== */

#thermal-receipt {
  display: none;
}

@media print {
  /* Sembunyikan semua elemen layar aplikasi saat mencetak */
  body * {
    visibility: hidden;
  }

  /* Tampilkan hanya wadah struk tiket antrean */
  #thermal-receipt, #thermal-receipt * {
    visibility: visible;
  }

  #thermal-receipt {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 76mm; /* Optimal untuk printer 80mm & toleran untuk 58mm */
    max-width: 100%;
    margin: 0 auto;
    padding: 6mm 4mm;
    color: #000000 !important;
    background: #ffffff !important;
    font-family: 'Courier New', Courier, monospace, sans-serif !important;
    font-size: 11pt;
    line-height: 1.3;
    text-align: center;
    box-sizing: border-box;
  }

  @page {
    margin: 0;
    size: 80mm auto;
  }

  .ticket-header {
    border-bottom: 2px dashed #000;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }

  .ticket-title {
    font-size: 14pt;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2px;
  }

  .ticket-subtitle {
    font-size: 8pt;
    color: #222;
  }

  .ticket-service-badge {
    display: inline-block;
    border: 1px solid #000;
    padding: 3px 10px;
    font-size: 11pt;
    font-weight: bold;
    text-transform: uppercase;
    margin: 8px 0;
  }

  .ticket-number {
    font-size: 38pt;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 8px 0;
    line-height: 1;
  }

  .ticket-meta {
    font-size: 9pt;
    margin: 6px 0;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 6px 0;
    text-align: left;
  }

  .ticket-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
  }

  .ticket-footer {
    font-size: 8pt;
    margin-top: 10px;
    padding-top: 4px;
  }

  .ticket-cut-guide {
    margin-top: 15px;
    font-size: 7pt;
    color: #444;
  }
}

/* Modal Preview styling pada layar monitor biasa */
.ticket-preview-box {
  width: 320px;
  background: #ffffff;
  color: #111827;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.ticket-preview-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(-45deg, #ef4444, #ef4444 8px, #ffffff 8px, #ffffff 16px, #3b82f6 16px, #3b82f6 24px);
}
