/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* Bill Form */
.bill-form {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-image: url('ez-laundry-watermark.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    background-blend-mode: lighten;
    position: relative;
}

.header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a90e2;
}

.header h1 {
    color: #4a90e2;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.form-section {
    padding: 10px;
}

.form-row {
    display: flex;
    margin-bottom: 22px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.form-group {
    margin-right: 15px;
    flex: 1;
    min-width: 180px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.12);
}

/* Highlight field when focused */
.highlight-group {
    animation: pulse-border 1s ease-in-out;
}

/* Flash effect for value changes */
.highlight-value {
    animation: flash-highlight 0.7s ease-in-out;
    background-color: #e6f0ff !important;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(74, 144, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

@keyframes flash-highlight {
    0% { background-color: #e6f0ff; }
    50% { background-color: #c8dfff; }
    100% { background-color: #e6f0ff; }
}

.checkbox-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-options {
    display: flex;
    gap: 20px;
}

.checkbox-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-options input[type="radio"],
.checkbox-options input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: #4a90e2;
    cursor: pointer;
}

.amount-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amount-input {
    position: relative;
    width: 100%;
}

.amount-input .currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 500;
    color: #444;
    z-index: 1;
}

.amount-input input {
    padding-left: 40px !important;
}

.total-group {
    font-weight: bold;
}

.total-group input {
    font-weight: 600;
    font-size: 16px;
    color: #222;
    background-color: #f8fafc;
}

#total {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    background-color: #e6f0ff;
    border: 2px solid #4a90e2;
}

.signature-row {
    margin-top: 30px;
}

/* Button Section */
.button-section {
    padding: 24px;
    display: flex;
    justify-content: center;
    gap: 18px;
    background-color: #f8fafc;
    border-top: 1px solid #eaeef3;
}

.action-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background-color: #4a90e2;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.action-button:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

.action-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#printBtn {
    background-color: #28a745;
}

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

#resetBtn {
    background-color: #e74c3c;
}

#resetBtn:hover {
    background-color: #c0392b;
}

/* Install Prompt */
.install-prompt {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
    display: none;
    justify-content: space-between;
    align-items: center;
}

.install-prompt.show {
    display: flex;
}

#installBtn {
    padding: 5px 10px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Print Styles */
@media print {
    body {
        padding: 0;
        background-color: white;
        display: block;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .button-section, 
    .install-prompt {
        display: none;
    }
    
    .bill-form {
        padding: 20px;
        border: 1px solid #ddd;
        margin: 10px;
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    input, select {
        border: none !important;
        background: transparent !important;
        pointer-events: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        font-size: 14px;
    }
    
    .form-row {
        margin-bottom: 18px;
    }
    
    #total {
        font-weight: bold;
        border: 1px solid #999 !important;
        padding: 5px 10px !important;
    }
    
    /* Add a watermark indicating this is a copy */
    .bill-form::after {
        content: "EZ Laundry Receipt";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        color: rgba(200, 200, 200, 0.2);
        font-size: 60px;
        font-weight: bold;
        pointer-events: none;
        z-index: -1;
    }
}
