/* ==========================================================================
   ClassKit Global - Store Receipts & Money Math Stylesheet
   Calibrated for high-precision A4 & US Letter printing
   Strict Decoupling: Under 500 lines
   ========================================================================== */

.receipt-sheet {
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  page-break-after: always;
  break-after: page;
  padding: 8mm 10mm 6mm 10mm;
}

.receipt-sheet.is-answer-key-page {
  border-top: 3px solid #059669;
}

/* Directive Banner */
.receipt-directive-banner {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: 4px solid #0F172A;
  padding: 5px 10px;
  font-size: 8pt;
  line-height: 1.35;
  color: #1E293B;
  border-radius: 4px;
  margin-bottom: 3.5mm;
  box-sizing: border-box;
}

.receipt-directive-banner.is-answer {
  background: #ECFDF5;
  border-color: #A7F3D0;
  border-left: 4px solid #059669;
  color: #065F46;
}

/* Main Receipts Layout Grid */
.receipts-container {
  display: grid;
  gap: 4mm;
  flex: 1;
}

.receipts-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.receipts-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Individual Receipt Column Box */
.receipt-column {
  display: flex;
  flex-direction: column;
  gap: 3mm;
  box-sizing: border-box;
}

/* Realistic Thermal Paper Receipt Card */
.thermal-receipt-card {
  background: #FFFFFF;
  border: 1.5px solid #334155;
  border-radius: 6px;
  padding: 4mm 5mm;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-family: 'Courier New', Courier, monospace;
  font-size: 8pt;
  color: #0F172A;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.receipt-store-header {
  text-align: center;
  border-bottom: 1px dashed #64748B;
  padding-bottom: 2mm;
  margin-bottom: 2.5mm;
}

.receipt-store-name {
  font-family: 'Inter', sans-serif;
  font-size: 11pt;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #0F172A;
}

.receipt-store-sub {
  font-size: 7pt;
  color: #64748B;
  margin-top: 1px;
}

/* Items List */
.receipt-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5mm;
}

.receipt-items-table th {
  font-family: 'Inter', sans-serif;
  font-size: 7pt;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #0F172A;
  padding-bottom: 1mm;
  color: #334155;
}

.receipt-items-table th.th-num {
  text-align: right;
}

.receipt-items-table td {
  padding: 1.2mm 0;
  font-size: 7.5pt;
  border-bottom: 1px dotted #E2E8F0;
}

.receipt-items-table td.td-num {
  text-align: right;
  font-weight: 700;
}

.receipt-item-icon {
  margin-right: 3px;
  font-size: 8.5pt;
}

/* Totals and Calculation Section */
.receipt-totals-section {
  border-top: 1px dashed #0F172A;
  padding-top: 2mm;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5mm;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8pt;
  font-weight: 700;
}

.receipt-total-row.row-grand {
  font-family: 'Inter', sans-serif;
  font-size: 9pt;
  font-weight: 900;
  color: #0F172A;
  border-top: 1px solid #0F172A;
  padding-top: 1.5mm;
}

.receipt-total-row.row-paid {
  font-size: 8pt;
  color: #334155;
}

.receipt-total-row.row-change {
  font-family: 'Inter', sans-serif;
  font-size: 9pt;
  font-weight: 900;
  background: #F1F5F9;
  border: 1px dashed #475569;
  border-radius: 4px;
  padding: 2mm 3mm;
  margin-top: 1.5mm;
}

.receipt-total-row.row-change.is-solution {
  background: #ECFDF5;
  border-color: #059669;
  color: #065F46;
}

.receipt-writein-box {
  display: inline-block;
  min-width: 50px;
  height: 18px;
  border-bottom: 2px solid #0F172A;
  text-align: right;
  font-size: 9.5pt;
}

/* Barcode */
.receipt-barcode-wrap {
  text-align: center;
  margin-top: 2.5mm;
  padding-top: 1.5mm;
  border-top: 1px dashed #CBD5E1;
}

.receipt-barcode-svg {
  height: 18px;
  width: 110px;
}

/* Visual Currency Drawer Card */
.currency-drawer-card {
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #F8FAFC;
  padding: 2.5mm 3.5mm;
  box-sizing: border-box;
}

.currency-drawer-title {
  font-size: 7.5pt;
  font-weight: 800;
  color: #334155;
  margin-bottom: 2mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.currency-tokens-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2mm;
  align-items: center;
}

/* Vector Coins & Bills Mini Badges */
.coin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 7pt;
  font-weight: 900;
  border: 1.5px solid #475569;
  box-sizing: border-box;
}

.coin-quarter {
  width: 24px;
  height: 24px;
  background: #E2E8F0;
  color: #1E293B;
  border-color: #64748B;
}

.coin-dime {
  width: 19px;
  height: 19px;
  background: #E2E8F0;
  color: #1E293B;
  border-color: #64748B;
  font-size: 6.5pt;
}

.coin-nickel {
  width: 22px;
  height: 22px;
  background: #CBD5E1;
  color: #1E293B;
  border-color: #64748B;
}

.coin-penny {
  width: 20px;
  height: 20px;
  background: #FED7AA;
  color: #7C2D12;
  border-color: #C2410C;
}

.bill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 7pt;
  font-weight: 900;
  border: 1px solid #15803D;
  background: #DCFCE7;
  color: #14532D;
}

.bill-badge.is-tendered {
  border-width: 1.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Change Coins Breakdown in Solution */
.solution-coin-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 7.2pt;
  font-weight: 700;
  color: #065F46;
  margin-top: 1mm;
}

/* Sheet Footer */
.sheet-footer-block {
  margin-top: auto;
  padding-top: 2mm;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7pt;
  color: #64748B;
  box-sizing: border-box;
}

.footer-brand-tag {
  font-weight: 700;
  color: #0F172A;
}

/* Print Specific */
@media print {
  .studio-header,
  .studio-sidebar,
  .pro-modal-backdrop {
    display: none !important;
  }

  .studio-body {
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  .studio-viewport {
    padding: 0 !important;
    background: transparent !important;
    height: auto !important;
    overflow: visible !important;
  }

  .a4-wrapper {
    transform: none !important;
  }

  .receipt-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    page-break-after: always !important;
    break-after: page !important;
    width: 100% !important;
  }

  .thermal-receipt-card,
  .currency-drawer-card {
    border-color: #000000 !important;
  }
}
