.receipt {
    width: 300px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: 'Arial', sans-serif;
    background: #fff;
}

.hidden {
    display: none;
    /* Hide by default until printed */
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.receipt-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.receipt-date {
    font-size: 0.7em;
    color: #777;
    margin: 5px 0 0;
}

.receipt-body {
    margin-bottom: 15px;
}

.receipt-items {
    margin-bottom: 20px;
}

.item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.7em;
    color: #444;
}
.items-border{
    border-bottom: 1px dashed #eee;

}

.item:last-child {
    border-bottom: none;
}

.receipt-summary {
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.7em;
    color: #555;
}

.summary-row.discount {
    color: #e74c3c;
}

.summary-row.total {
    font-weight: 700;
    font-size: 0.75em;
    color: #333;
    border-top: 1px solid #ccc;
    padding-top: 10px;
}

.receipt-footer {
    text-align: center;
    font-size: 0.85em;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.footer-note {
    font-size: 0.8em;
    color: #aaa;
    margin: 5px 0 0;
}



.item .discount-amount {
    color: #e74c3c;
    /* Red for discount */
    font-weight: 500;
}

.extras-block {
    margin-top: 6px;
    margin-left: 10px;
    border-left: 2px solid #ddd;
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.extra-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #aaa;
    display: inline-block;
}

.extra-label {
    font-size: 11px;
    color: #777;
}

.extras-badge {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #888;
}
@media print {
    html, body {
        margin: 0;
        padding: 0;
        height: 1px;        /* kills extra blank page from body height */
        overflow: hidden;
    }

    body * {
        visibility: hidden;
    }

    .receipt,
    .receipt * {
        visibility: visible;
    }

    .receipt {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 10px;
        box-shadow: none;
        border: none;
        max-height: 100vh;
        overflow: hidden;
        page-break-before: avoid;
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    .receipt-hidden {
        visibility: visible !important;
        display: block !important;
    }

    @page {
        margin: 5mm;   /* small margin prevents clipping on real printers */
        size: auto;
    }

    body::after {
        content: none;
    }
}
