body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    color: #333;
}

.form-section {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    justify-content: space-between;
}

.form-col {
    flex: 1;
    margin-right: 10px;
}

.form-col:last-child {
    margin-right: 0;
}

.item-list table {
    width: 100%;
    margin-bottom: 10px;
}

.item-list th, .item-list td {
    padding: 8px;
    text-align: left;
    border: 1px solid #000000;
}

button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #218838;
}

.receipt-preview {
    text-align: center;
}

.receipt-footer {
    text-align: center;
}



.receipt-preview {
    margin-top: 20px;
    border: 1px solid #000;
    padding: 10px;
    width: 80mm; /* POS receipt width */
    text-align: center; /* Center align the content */
}

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

th, td {
    border: 1px solid #000;
    padding: 5px;
    text-align: center; /* Ensure table content is centered */
}

@media print {
    table {
        width: 100%;
        border-collapse: collapse;
        word-wrap: break-word; /* Ensures long content wraps */
        table-layout: fixed;   /* Forces the table to respect width */
    }
    th, td {
        border: 1px solid black;
        padding: 5px;
        text-align: center;
        overflow-wrap: break-word; /* Ensures that content breaks onto new line */
        white-space: normal;       /* Allows the text to wrap within cells */
    }
    body {
        font-family: Arial, sans-serif;
        font-size: 10pt;
    }
    .header, .receipt-footer {
        font-weight: bold;
        text-align: center;
    }
    .receipt-footer {
        font-size: 9pt;
    }
}

