body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f4f4f9;
}
.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.input-group {
    margin: 15px 0;
}
label {
    display: block;
    margin-bottom: 5px;
}
input, select {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}
button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}
button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
#tip-button {
    background-color: #28a745;
}
#tip-button:hover {
    background-color: #218838;
}
#qrcode, #tip-qrcode, #print-qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    width: 200px;
    height: 200px;
}
#qrcode canvas, #tip-qrcode canvas, #print-qrcode canvas, #print-qrcode img {
    margin: 0 auto;
}
.error {
    color: red;
    display: none;
}

/* Print-specific styles */
@media print {
    body * {
        visibility: hidden;
    }
    #print-template, #print-template * {
        visibility: visible !important;
    }
    #print-template {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        text-align: center;
        background: white;
    }
    #print-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 20px;
    }
    #print-qrcode {
        display: block !important;
        margin: 20px auto;
        width: 200px;
        height: 200px;
    }
    #print-qrcode canvas, #print-qrcode img {
        width: 200px !important;
        height: 200px !important;
        display: block !important;
        margin: 0 auto;
        visibility: visible !important; /* Ensure QR code is visible */
    }
    h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    p {
        font-size: 16px;
        margin: 5px 0;
    }
    /* Ensure no other elements interfere */
    body > :not(#print-template) {
        display: none !important;
    }
}
