/* ===== General Styles ===== */
body {
    font-family: monospace;
    background: #f5f5f5;
    padding: 20px;
    text-align: center; /* horizontal center for receipt */
}

#receipt {
    width: 80mm;                /* receipt printer width */
    margin: 20mm auto 0 auto;   /* top spacing + center horizontally */
    background: #fff;
    padding: 10px;
    text-align: left;
    font-size: 12pt;
    border: 1px solid #ccc;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

#receipt h2 {
    text-align: center;
    margin-bottom: 10px;
}

#receipt table {
    width: 100%;
    border-collapse: collapse;
}

#receipt th, #receipt td {
    border-bottom: 1px solid #000;
    padding: 4px 0;
}

#receipt tfoot td {
    font-weight: bold;
    border-top: 2px solid #000;
}

button {
    margin-top: 20px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
}

/* ===== Print Styles ===== */
@media print {
    body * {
        visibility: hidden;
    }
    #receipt, #receipt * {
        visibility: visible;
    }
    #receipt {
        margin: 20mm auto 0 auto;
        box-shadow: none;
    }
    @page {
        size: 80mm auto;
        margin: 0;
    }
}
