﻿/* ---------- Base Styles ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #fff;
    color: #000;
    font-size: 13px;
}

.invoice-container {
    width: 100%;
    max-width: 800px;
    margin: auto;
    padding: 10px 15px;
    border: 1px solid #000;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ---------- Header ---------- */
.invoice-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
}

    .invoice-header h2 {
        font-size: 18px;
        margin-bottom: 3px;
    }

/* ---------- Table ---------- */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

    .invoice-table th,
    .invoice-table td {
        border-bottom: 1px solid #000;
        padding: 4px 6px;
    }

    .invoice-table th {
        text-align: left;
        font-weight: bold;
    }

/* ---------- Summary ---------- */
.summary-section {
    margin-top: 10px;
    border-top: 1px solid #000;
    padding-top: 5px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.total-row {
    font-size: 14px;
    font-weight: bold;
    border-top: 1px solid #000;
    margin-top: 4px;
    padding-top: 4px;
}

/* ---------- Footer ---------- */
.invoice-footer {
    text-align: center;
    margin-top: 15px;
    border-top: 1px solid #000;
    padding-top: 5px;
    font-size: 12px;
}

/* ---------- Print Rules ---------- */
@media print {
    body {
        margin: 0;
        padding: 0;
    }

    .no-print,
    .mud-dialog,
    .mud-dialog-container,
    .mud-overlay,
    .mud-paper {
        display: none !important;
    }

    #invoice {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    /* Epson POS printer optimization */
    @page {
        size: auto; /* let printer decide (POS vs A4) */
        margin: 5mm;
    }

    table, tr, td, th {
        page-break-inside: avoid;
    }
}
