

.pm-box {
    background: #fff;
	margin-left:5px;
    box-shadow: 0 0 10px #000;
}

.pm-header, .pm-footer {
    padding: 8px;
    background: #f1f1f1;
    font-weight: bold;
}

.pm-toggle {
    padding: 2px 5px;
    text-align: center;
}

.pm-body {
    padding: 0;
}

.pm-close {
    float: right;
    cursor: pointer;
}

/* Width Modes */
.paper-thermal { width: 360px; }
.paper-a4 { width: 210mm; }

/* ================================
   THERMAL MODAL PRINT FIX
   ================================ */
@media print {

    body.print-modal-active * {
        visibility: hidden !important;
    }

    body.print-modal-active #printModal,
    body.print-modal-active #printModal * {
        visibility: visible !important;
    }

    body.print-modal-active .modal-header,
    body.print-modal-active .modal-footer,
    body.print-modal-active .modal-toggle,
    body.print-modal-active .modal-close {
        display: none !important;
    }

    body.print-modal-active #printModal {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        background: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.print-modal-active #printModalBox {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 76mm !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
    }

    body.print-modal-active .modal-body {
        margin: 0 !important;
        padding: 0 !important;
    }

    .thermal-invoice {
        width: 72mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    @page {
        size: 76mm auto;
        margin: 2mm 3mm !important;
    }

    html, body {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
}



.thermal-invoice {
    width: 72mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
}



#upiQR {
    display: block;
    margin: 6px auto;
    max-width: 72mm;
    text-align: center;
}

#upiQR canvas {
    margin: 0 auto;
}
#upiQR img {
    display: block;
    margin: 0 auto;
    width: 85px !important;
    height: 85px !important;
}

.th-title {
    font-weight: bold;
    font-size: 12px;
    margin: 3px 0;
}

.th-items td:first-child {
    width: 45mm;              /* fixed width for item column */
    max-width: 45mm;
    word-wrap: break-word;
	font-size: 11px;
    font-weight: bold;
    white-space: normal;
}

.th-items td:nth-child(2) {  /* Qty */
    width: 8mm;
    text-align: right;
	font-size: 11px;
    font-weight: bold;
	padding-left:5px;
	padding-right:5px;
}

.th-items td:nth-child(3) {  /* Rate */
    width: 9mm;
    text-align: right;
	font-size: 11px;
    font-weight: bold;
	padding-left:5px;
	padding-right:5px;
}

.th-items td:nth-child(4) {  /* Amount */
    width: 10mm;
    text-align: right;
	font-size: 11px;
    font-weight: bold;
	padding-left:5px;
	padding-right:5px;
}


.th-items th:first-child { width: 45mm; }
.th-items th:nth-child(2) { width: 8mm; }
.th-items th:nth-child(3) { width: 9mm; }
.th-items th:nth-child(4) { width: 10mm; }


.th-center {
    text-align: center;
    width: 100%;
}
.th-left { text-align: left; }

.th-company {
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.th-small {
    font-size: 13px;
    font-weight: bold;
}

.th-logo {
    max-width: 40mm;
    max-height: 20mm;
    margin-bottom: 4px;
}

hr {
    border: none;
    border-top: 1px dashed #000;
    margin: 4px 0;
}


.th-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 4px;
}

.th-items th {
    border-bottom: 1px solid #000;
    padding: 2px 0;
    font-size: 10px;
}

.th-items td {
    padding: 2px 0;
    vertical-align: top;
}

.th-hsn {
    font-size: 8px;
    color: #333;
}

.th-sep {
    border-top: 1px dashed #000;
    margin: 6px 0;
}

.th-items, .th-totals {
    width: 100%;
    border-collapse: collapse;
}

.c-item { width: 45%; text-align: left; }
.c-qty  { width: 15%; text-align: right; }
.c-rate { width: 20%; text-align: right; }
.c-amt  { width: 20%; text-align: right; }

.th-desc {
    font-size: 8px;
    color: #444;
    line-height: 1.2;
}

.th-totals td {
    padding: 2px 0;
    font-size: 10px;
    font-weight: bold;
}

.th-grand td {
    border-top: 1px solid #000;
    font-size: 12px;
    font-weight: bold;
    font-weight: bold;
}

.th-totals td:last-child { text-align: right; }

#barcode{
    display: block;
    margin: 6px auto;
    max-width: 45mm;
    text-align: center;
}
