/* print.css */
@media print {
    /* Force the document background to be white during printing */
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    body * {
        visibility: hidden;
    }
    
    #print-area, #print-area * {
        visibility: visible;
        color: #000000 !important; /* Force all receipt text to be black */
    }
    
    #print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 5mm 4mm;
        background: #ffffff !important; /* Force receipt paper to be white */
        font-family: 'Courier New', monospace;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .receipt-copy {
        page-break-after: always;
    }
    
    .receipt-header {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .receipt-header img {
        width: 50px;
        margin-bottom: 10px;
        /* Ensure logo prints correctly. If it's a transparent PNG, it will blend with white. */
    }
    
    .receipt-items {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 15px;
    }
    
    .receipt-items td {
        padding: 6px 0;
        font-size: 12px;
        vertical-align: top;
    }
    
    .receipt-total {
        font-size: 14px;
        font-weight: bold;
        border-top: 1px dashed #000;
        border-bottom: 1px dashed #000;
        padding: 8px 0;
        margin-top: 8px;
        margin-bottom: 15px;
        display: flex;
        justify-content: space-between;
    }
    
    .receipt-footer {
        text-align: center;
        margin-top: 20px;
    }

    /* Minimal receipt design */
    #print-area.receipt-design-minimal .receipt-header img {
        display: none;
    }

    #print-area.receipt-design-minimal .receipt-header {
        border-bottom: 1px dashed #000;
        padding-bottom: 8px;
    }

    #print-area.receipt-design-minimal .receipt-header h2 {
        text-transform: uppercase;
        letter-spacing: 1px;
        font-size: 15px;
    }

    #print-area.receipt-design-minimal .receipt-items {
        border-top: 1px dashed #000;
        border-bottom: 1px dashed #000;
        padding: 6px 0;
    }
}
