/* 80mm Thermal Receipt Slip Styling & Print Media */

.thermal-screen-wrapper {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
}

.thermal-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 20px;
}

/* Realistic 80mm Receipt Container */
.receipt-paper {
  width: 320px; /* ~80mm at 96 DPI */
  margin: 0 auto;
  background: #ffffff;
  color: #000000;
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.4;
  padding: 20px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  position: relative;
}

/* Jagged tear paper effect on top and bottom */
.receipt-paper::before,
.receipt-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background-size: 12px 6px;
}

.receipt-paper::before {
  top: -6px;
  background-image: radial-gradient(circle at 6px 6px, transparent 6px, #ffffff 6px);
}

.receipt-paper::after {
  bottom: -6px;
  background-image: radial-gradient(circle at 6px 0, transparent 6px, #ffffff 6px);
}

.receipt-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.receipt-title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.receipt-subtitle {
  font-size: 10px;
  font-weight: 600;
}

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

.receipt-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.receipt-total-box {
  border: 1px solid #000;
  padding: 6px;
  margin: 8px 0;
  text-align: center;
}

.receipt-barcode {
  text-align: center;
  margin-top: 12px;
  font-size: 24px;
  letter-spacing: 4px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

/* 58mm Mini POS Thermal Paper Screen Preview */
.receipt-paper.paper-58mm {
  width: 236px;
  font-size: 9.5px;
  padding: 14px 10px;
}

.receipt-paper.paper-58mm .receipt-title {
  font-size: 11px;
}

.receipt-paper.paper-58mm .receipt-subtitle {
  font-size: 8.5px;
}

.receipt-paper.paper-58mm .receipt-header img {
  height: 38px;
}

.receipt-paper.paper-58mm .receipt-total-box #slipFinalScore {
  font-size: 17px;
}

.receipt-paper.paper-58mm .receipt-barcode {
  font-size: 17px;
  letter-spacing: 2px;
}

/* ESC/POS Thermal Printing Mode */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .top-nav,
  .thermal-controls-bar,
  .no-print {
    display: none !important;
  }

  .thermal-screen-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .receipt-paper {
    width: 72mm !important; /* Standard 80mm printable width */
    margin: 0 auto !important;
    padding: 2mm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .receipt-paper.paper-58mm {
    width: 48mm !important; /* Standard 58mm printable width */
    font-size: 8.5px !important;
    padding: 1mm !important;
  }

  .receipt-paper.paper-58mm .receipt-title {
    font-size: 9.5px !important;
  }

  .receipt-paper.paper-58mm .receipt-subtitle {
    font-size: 7.5px !important;
  }

  .receipt-paper.paper-58mm .receipt-header img {
    height: 30px !important;
  }

  .receipt-paper.paper-58mm .receipt-total-box #slipFinalScore {
    font-size: 15px !important;
  }

  .receipt-paper.paper-58mm .receipt-barcode {
    font-size: 14px !important;
    letter-spacing: 2px !important;
  }

  .receipt-paper::before,
  .receipt-paper::after {
    display: none !important;
  }

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