/* ==========================================================================
   Interactive Menu & Cart Styles
   ========================================================================== */

/* Main layout for menu page */
.menu-page-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.menu-container {
    flex: 3; /* Takes up 3/4 of the space */
    min-width: 300px;
}

/* --- Order Cart Styles --- */
.order-cart {
    flex: 1; /* Takes up 1/4 of the space */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 20px; /* Sticks to the top as you scroll */
    align-self: flex-start; /* Prevents stretching */
    min-width: 280px;
}

.order-cart h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

#cart-items {
    min-height: 50px;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

.cart-item span {
    flex-grow: 1;
    margin-right: 10px;
}

.remove-item-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-weight: bold;
    cursor: pointer;
    line-height: 22px;
    text-align: center;
}

.cart-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ddd;
    text-align: right;
    font-size: 1.2rem;
}

#review-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Interactive Menu Item Styles --- */
.menu-item-interactive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.item-name {
    font-weight: 500;
}

.item-options .add-to-cart-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.item-options .add-to-cart-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.item-options .add-to-cart-btn:disabled {
    background-color: #ccc;
    border-color: #bbb;
    color: #666;
    cursor: not-allowed;
}

/* Style for the ordering closed message */
.ordering-status-message {
    background-color: #fffbe6; /* A light yellow warning color */
    border: 1px solid #ffe58f;
    border-left: 5px solid #faad14; /* A stronger yellow/orange */
    color: #5c3c00;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}

/* --- Order Modal Styles --- */
.order-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: black;
}

#modal-order-summary {
    margin-bottom: 1.5rem;
}

.modal-total {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
    margin-bottom: 1.5rem;
}

.modal-instructions {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.modal-delivery-note {
    font-size: 0.9rem;
    color: #555;
    margin-top: -1rem; /* Pulls it closer to the text above */
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: #fdfaf6; /* Matches your site's body background */
    border-left: 4px solid #B58A61; /* Uses the Lighter Woody Brown from your theme */
}

/* --- Payment Selection Styles in Modal --- */
.payment-selection {
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.payment-selection h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.payment-details {
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 1rem;
}

.payment-confirmation {
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.payment-confirmation label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 5px;
}

.qr-code {
    max-width: 150px;
    display: block;
    margin: 0.5rem 0;
}

/* Styles for the customer details form in the modal */
#customer-info-form {
    margin: 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

#customer-info-form h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box; /* Important for padding and width */
}

/* Styles for the total breakdown in the modal */
.modal-total-breakdown {
    text-align: right;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
}

.total-row.grand-total {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #333;
}

/* Style for the disabled messenger button */
#submit-order-messenger.disabled {
    background-color: #ccc;
    border-color: #bbb;
    color: #666;
    cursor: not-allowed;
}