body {
    font-family: sans-serif;
    margin: 0;
}

/* Container grid */
.container {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Column card styles */
.column-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.column-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.column-card h2 {
    color: #333;
}

/* Order list container */
.order-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.order-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Order item card */
.order-card {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5e7eb;
}
.order-card img {
    height: 4rem;
    width: 4rem;
    object-fit: cover;
    border-radius: 0.375rem;
}
.order-details {
    flex-grow: 1;
}
.order-details p.product-name {
    font-weight: 600;
    color: #1f2937;
}
.order-details p.product-price {
    font-size: 0.875rem;
    color: #4b5563;
}
.order-details p.product-qty {
    font-size: 0.875rem;
    color: #6b7280;
}
.order-card .order-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.order-card .order-info strong {
    font-weight: 600;
}

/* Quantity Controls - NEW CSS */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.quantity-controls button {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.quantity-controls button:hover {
    background-color: #e5e7eb;
}
.quantity-controls span {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    width: 1.5rem;
    text-align: center;
}

/* Total Price Display - NEW CSS */
.total-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 1rem;
    text-align: right;
    padding-right: 1.5rem;
}

/* Checkout button section */
.checkout-section {
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
}
.checkout-button {
    width: 100%;
    background-color: #FFC222;
    color: #ffffff;
    font-weight: 700;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    transition-property: background-color;
    transition-duration: 200ms;
    cursor: pointer;
    border: none;
}
.checkout-button:hover {
    background-color: #f5b921;
}

/* Ongoing details form */
.ongoing-details-form {
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
}
.ongoing-details-form.visible {
    display: flex;
}
.ongoing-details-form h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}
.form-field select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    outline: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-field input[type="radio"] {
    height: 1rem;
    width: 1rem;
    color: #2563eb;
    border-color: #d1d5db;
}
.form-field .radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.place-order-button {
    width: 100%;
    background-color: #d9534f;
    color: #ffffff;
    font-weight: 700;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    transition-property: background-color;
    transition-duration: 200ms;
    cursor: pointer;
    border: none;
}
.place-order-button:hover {
    background-color: #c9302c;
}
.checkbox-input {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    color: #2563eb;
    transition: all 0.2s ease-in-out;
}
.completed-footer {
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    text-align: center;
}
.completed-footer p {
    font-size: 0.875rem;
    color: #6b7280;
}
/* Invoice & Feedback buttons */
.action-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}
.action-btn button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}
.invoice-btn {
    background-color: #2563eb;
    color: #fff;
}
.invoice-btn:hover {
    background-color: #1d4ed8;
}
.feedback-btn {
    background-color: #10b981;
    color: #fff;
}
.feedback-btn:hover {
    background-color: #059669;
}
.completed-btn {
    background-color: #6c757d;
    color: #fff;
}
.completed-btn:hover {
    background-color: #5a6268;
}

/* Invoice Structure (Styling the Receipt) */
.invoice-container {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    padding: 10px;
    margin: 0 auto;
    background-color: #fff; /* Ensure white background for PDF/Print */
}

.invoice-header, .invoice-footer {
    border-top: 2px dashed #000;
    border-bottom: 2px dashed #000;
    padding: 5px 0;
    text-align: center;
    margin-bottom: 10px;
}
.invoice-title {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}
.invoice-address {
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.invoice-details table {
    width: 100%;
    margin-bottom: 10px;
}
.invoice-details td {
    padding: 2px 0;
}
.invoice-details td:last-child {
    text-align: right;
}

.invoice-items {
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 10px 0;
    margin-bottom: 10px;
}

.invoice-item-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.invoice-item-row .item-name {
    flex-grow: 1;
}
.invoice-item-row .item-qty {
    width: 40px;
    text-align: center;
}
.invoice-item-row .item-price {
    width: 80px;
    text-align: right;
}

.invoice-summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 10px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
}
.summary-row strong:last-child {
    font-size: 1.1em;
}

/* Print Specific Styles */
@media print {
    body * {
        visibility: hidden;
    }
    /* Only show the invoice modal content for printing */
    #invoiceModal, #invoiceModal * {
        visibility: visible;
    }
    .main-content {
        display: none;
    }
    .invoice-modal-content {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    .invoice-preview {
        max-height: none;
        border: none;
        padding: 0;
        overflow-y: visible;
    }
    .invoice-actions, .close-invoice-modal {
        display: none !important; /* Hide buttons and close icon in print */
    }
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}
.modal-content h2 {
    margin-top: 0;
}
.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    cursor: pointer;
}
.modal-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.modal-actions .button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}
.modal-actions .button:hover {
    background: #1d4ed8;
}
