/* --- MODULE: MENU --- */

/* 1. Header & Status */
.status-bar-container {
    background: #fff; 
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}
.marquee-box {
    background: #000; color: var(--primary); 
    font-size: 12px; font-weight: bold;
    padding: 8px 0; overflow: hidden; white-space: nowrap; 
    display: none; /* JS will show this if content exists */
}
.marquee-content { 
    display: inline-block; padding-left: 100%; 
    animation: scroll 15s linear infinite; 
}
@keyframes scroll { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

/* 2. Food List */
.menu-container { 
    padding: 15px; padding-bottom: 80px; 
}
.food-card {
    display: flex; background: #fff; padding: 10px; margin-bottom: 15px;
    border-radius: 16px; box-shadow: var(--shadow-soft); 
    border: 1px solid transparent; position: relative; 
    overflow: hidden; cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}
.food-card:active { transform: scale(0.98); background: #f9fafb; }

.food-img {
    width: 90px; height: 90px; border-radius: 12px; 
    object-fit: cover; background: #f3f4f6; flex-shrink: 0;
}
.food-info { 
    flex: 1; padding-right: 12px; 
    display: flex; flex-direction: column; justify-content: space-between; 
}
.food-title { font-weight: 800; font-size: 15px; color: #111; margin-bottom: 4px; }
.food-desc { 
    font-size: 11px; color: #888; line-height: 1.4; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; 
}
.food-action { 
    display: flex; justify-content: space-between; align-items: center; margin-top: 8px; 
}
.food-price { font-weight: 700; font-size: 14px; }

/* Add Button (Inline) */
.btn-add {
    width: 32px; height: 32px; background: var(--bg-gray); 
    border-radius: 8px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; font-weight: bold; color: #000;
}
.btn-add:active { background: var(--primary); }

/* 3. Modal Layer (The Fix) */
#modal-layer {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000; pointer-events: none; /* Allow clicks to pass through when empty */
    overflow: hidden;
}

/* Backdrop */
.modal-backdrop {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity 0.3s ease;
    pointer-events: none; /* Initially hidden */
}
.modal-backdrop.active { 
    opacity: 1; pointer-events: all; /* Block clicks when active */
}

/* Sheet Modal */
.sheet-modal {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: #fff; border-radius: 24px 24px 0 0;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 90%; display: flex; flex-direction: column;
    pointer-events: auto; /* Always clickable */
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.sheet-modal.active { transform: translateY(0); }

.sheet-img { width: 100%; height: 200px; object-fit: cover; border-radius: 24px 24px 0 0; }
.sheet-content { padding: 25px 20px; overflow-y: auto; padding-bottom: 80px; }
.sheet-title { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.sheet-desc { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 20px; }

/* Sheet Footer */
.sheet-footer {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 15px 20px; background: #fff; border-top: 1px solid #eee;
    display: flex; gap: 15px; align-items: center; z-index: 10;
}
.btn-sheet-add {
    flex: 1; background: #111; color: #fff; border: none;
    padding: 14px; border-radius: 14px; font-weight: bold; font-size: 15px;
    cursor: pointer;
}
.btn-sheet-add:active { transform: scale(0.98); }

/* Modern Kitchen Selector (Patch 33) */
.kitchen-selector-wrapper {
    background: #f3f4f6;
    padding: 5px;
    margin: 15px 20px 5px 20px;
    border-radius: 14px;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.k-sel-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.k-sel-btn.active {
    color: #000;
}

/* The sliding highlight pill */
.k-sel-highlight {
    position: absolute;
    top: 5px;
    bottom: 5px;
    width: calc(50% - 5px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    z-index: 1;
}

/* RTL positioning */
.k-sel-highlight.pos-1 { transform: translateX(0); }
.k-sel-highlight.pos-2 { transform: translateX(-100%); }