/* SilentServe Guest — eMenu Viewer styles (CLEAN / Production-ready)
   Scope: Menu-only module. Keep core guest styles in index_css.css untouched.
   Notes:
   - Consolidated duplicate selectors.
   - Removed legacy/unused blocks (old split toggle, legacy filter row, old non-hero card layout).
   - Keeps current production behavior (desktop inline controls, iPhone wrap + Orders full-width).
*/

/* =========================
   Menu container + search
   ========================= */
#menuView {
    margin-top: 14px;
}

.menu-search {
    width: 100%;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    color: inherit;
    outline: none;
    box-sizing: border-box;
}

    .menu-search::placeholder {
        opacity: 0.65;
    }

/* Category + FX + Orders controls wrapper */
.menu-cats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 12px;
    /* Prevent the old core guest rule (overflow-x:auto) from showing scroll tracks here */
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 8px;
    padding-left: 2px;
    padding-right: 2px;
}

/* Controls row */
.menu-cat-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap; /* desktop default */
    overflow: visible;
}

    .menu-cat-row select {
        height: 40px;
        max-width: 100%;
        box-sizing: border-box;
    }

/* Single toggle button (Orders <-> Menu) */
.emenu-view-toggle-btn {
    height: 40px;
    flex: 0 0 auto;
    border-radius: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: var(--text-color, #fff);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.2px;
}

:root[data-theme="neon"] .emenu-view-toggle-btn {
    border-color: rgba(0, 217, 255, 0.28);
    background: rgba(0, 217, 255, 0.08);
}

/* --- Responsive controls --- */
/* iPhone/mobile: prevent category collapse; Orders on its own line */
@media (max-width: 520px) {
    .menu-cat-row {
        flex-wrap: wrap;
        width: 100%;
    }

        .menu-cat-row #menuCatSelect {
            flex: 1 0 190px; /* no-shrink: stops iOS Safari collapsing the select */
            min-width: 160px;
        }

        .menu-cat-row #menuFxSelect {
            flex: 0 0 110px;
            min-width: 110px;
            max-width: 140px;
        }

    .emenu-view-toggle-btn {
        flex: 1 0 100%;
        width: 100%;
        margin-top: 10px;
        padding: 10px 12px;
    }
}

/* Desktop: keep tidy; toggle compact */
@media (min-width: 521px) {
    .menu-cat-row {
        flex-wrap: nowrap;
    }

        .menu-cat-row #menuCatSelect {
            flex: 1 1 auto;
            min-width: 220px;
        }

        .menu-cat-row #menuFxSelect {
            flex: 0 0 110px;
            min-width: 110px;
            max-width: 140px;
        }

    .emenu-view-toggle-btn {
        min-width: 96px;
        max-width: 140px;
        width: auto;
    }
}

/* Ultra-small screens */
@media (max-width: 360px) {
    .menu-cat-row {
        gap: 8px;
    }

        .menu-cat-row #menuFxSelect {
            min-width: 84px;
            flex-basis: 84px;
        }

    .emenu-view-toggle-btn {
        padding: 9px 10px;
        font-size: 11px;
    }
}

/* Disabled controls styling (Orders sub-view) */
.menu-search:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.26);
}

.menu-cat-row select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.22);
    filter: grayscale(0.25);
}

/* =========================
   Menu list + empty + loading
   ========================= */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#menuEmpty {
    text-align: center;
    opacity: 0.8;
    margin-top: 18px;
}

.svc-loading {
    text-align: center;
    opacity: 0.8;
    padding: 18px 8px;
}

/* =========================
   Badges (dietary/allergen) + modal
   ========================= */
.menu-badge,
.menu-chip {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.menu-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-badge {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: inherit;
    opacity: 0.95;
    cursor: default;
}

button.menu-badge {
    cursor: pointer;
}

.menu-badge.dietary {
    border-color: rgba(0, 200, 255, 0.22);
}

.menu-badge.allergen {
    border-color: rgba(255, 180, 0, 0.24);
}

.menu-badge.more {
    border-color: rgba(255,255,255,0.20);
    background: rgba(255,255,255,0.08);
    font-weight: 700;
}

/* Badge modal */
.menu-badge-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.menu-badge-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.menu-badge-modal__panel {
    position: relative;
    margin: 10vh auto 0;
    width: min(520px, calc(100% - 28px));
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px;
}

.menu-badge-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 4px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.menu-badge-modal__title {
    font-weight: 800;
    opacity: 0.95;
}

.menu-badge-modal__close {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: inherit;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.menu-badge-modal__body {
    padding: 12px 4px 6px;
}

.menu-badge-modal__section + .menu-badge-modal__section {
    margin-top: 14px;
}

.menu-badge-modal__sectionTitle {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.80;
    margin-bottom: 8px;
}

.menu-badge-modal__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================
   Hero Menu Card (current template)
   ========================= */

/* --- IMPORTANT: override core guest .menu-item (index_css.css) which is row-based.
   eMenu hero cards require column layout. */
.menu-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    position: relative;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.16);
    cursor: pointer;
}

    .menu-item:hover {
        background-color: rgba(255,255,255,0.03);
    }

:root[data-theme="neon"] .menu-item:hover {
    background-color: rgba(0, 217, 255, 0.10);
}

@media (max-width: 520px) {
    .menu-item {
        padding: 8px;
    }
}

/* Hero wrapper */
.menu-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.menu-hero-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

@media (min-width: 520px) {
    .menu-hero-img {
        height: 190px;
    }
}

@media (min-width: 820px) {
    .menu-hero-img {
        height: 220px;
    }
}

/* + button on image */
.menu-hero-add {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(20, 20, 20, 0.30);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* hide label text */
    line-height: 0;
    cursor: pointer;
}

    .menu-hero-add::before {
        content: "+";
        font-size: 24px;
        font-weight: 900;
        line-height: 1;
        color: inherit;
    }

:root[data-theme="neon"] .menu-hero-add {
    border-color: rgba(0, 217, 255, 0.55);
    background: rgba(0, 217, 255, 0.12);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.22);
}

/* Chips on image */
.menu-hero-chips {
    position: absolute;
    left: 12px;
    bottom: 50px; /* above overlay strip */
    z-index: 5;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: calc(100% - 24px - 52px); /* leave room for + button */
    max-height: 56px; /* ~2 compact rows */
    overflow: hidden;
}

.menu-hero .menu-badge {
    font-size: 10.5px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.26);
    border-color: rgba(255,255,255,0.18);
    opacity: 0.92;
}

/* Overlay strip (name + price) */
.menu-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 10px 12px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.70), rgba(0,0,0,0.16));
}

.menu-hero-titleRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.menu-hero-name {
    font-weight: 900;
    letter-spacing: 0.2px;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.menu-hero-priceCol {
    text-align: right;
    flex: 0 0 auto;
    min-width: 80px;
}

.menu-hero-priceBase {
    font-weight: 900;
    opacity: 0.98;
}

.menu-hero-priceFx {
    margin-top: 2px;
    font-size: 11.5px;
    opacity: 0.75;
}

/* Body below hero */
.menu-hero-body {
    padding-top: 8px;
}

.menu-hero-portion {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.75;
}

.menu-hero-desc {
    margin-top: 8px;
    opacity: 0.85;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .menu-hero-desc.expanded {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

.menu-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.menu-tag {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    opacity: 0.95;
}

/* =========================
   Cart (guest-side)
   ========================= */
.emenu-cart-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9500;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.35);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 18px rgba(0, 217, 255, 0.22);
}

:root[data-theme="neon"] .emenu-cart-fab {
    border-color: rgba(0, 217, 255, 0.45);
    background: rgba(0, 217, 255, 0.10);
    box-shadow: 0 0 22px rgba(0, 217, 255, 0.35);
}

.emenu-cart-fab__icon {
    font-size: 22px;
    line-height: 1;
}

.emenu-cart-fab__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #000;
    background: var(--accent-glow, #00d9ff);
    border: 1px solid rgba(0,0,0,0.35);
}

.emenu-cart-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.emenu-cart-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.emenu-cart-modal__panel {
    position: relative;
    margin: 8vh auto 0;
    width: min(560px, calc(100% - 28px));
    max-width: calc(100vw - 28px);
    max-height: 82vh;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.26);
    background: rgba(18,18,18,0.97);
    box-shadow: 0 28px 70px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.06) inset;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

    .emenu-cart-modal__panel,
    .emenu-cart-modal__panel * {
        box-sizing: border-box;
    }

.emenu-cart-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.emenu-cart-modal__title {
    font-weight: 900;
    opacity: 0.95;
}

.emenu-cart-modal__close {
    /* Compact icon button (prevents huge full-width close bar on some browsers) */
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    /* Ensure global button rules can't stretch it */
    flex: 0 0 auto;
    max-width: 36px;
}


.emenu-cart-modal__body {
    padding: 12px;
    overflow: auto;
    overflow-x: visible;
}

.emenu-cart-empty {
    text-align: center;
    opacity: 0.85;
    padding: 18px 8px;
}

/* Cart rows */
.emenu-cart-row {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.07);
    width: 100%;
    max-width: 100%;
}

    .emenu-cart-row + .emenu-cart-row {
        margin-top: 10px;
    }

.emenu-cart-row__img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.06);
}

    .emenu-cart-row__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .emenu-cart-row__img.placeholder {
        background: rgba(255,255,255,0.04);
    }

.emenu-cart-row__main {
    flex: 1 1 auto;
    min-width: 0;
}

.emenu-cart-row__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.emenu-cart-row__name {
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emenu-cart-row__remove {
    /* Compact circular remove button (avoid wide pill) */
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
    max-width: 32px;
}


.emenu-cart-row__portion {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.75;
}

.emenu-cart-row__meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.emenu-cart-row__unit {
    font-weight: 700;
    opacity: 0.95;
    flex: 1 1 auto;
    min-width: 0;
}

.emenu-cart-row__qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.emenu-cart-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.emenu-cart-qty-num {
    min-width: 22px;
    text-align: center;
    font-weight: 800;
}

.emenu-cart-row__note,
.emenu-cart-summary__note textarea {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: inherit;
    padding: 10px 12px;
    resize: vertical;
}

.emenu-cart-row__note {
    margin-top: 8px;
    border-radius: 10px;
    padding: 8px 10px;
}

/* Cart summary */
.emenu-cart-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.emenu-cart-summary__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.emenu-cart-summary__label {
    font-weight: 800;
    opacity: 0.85;
}

.emenu-cart-summary__vals {
    text-align: right;
}

.emenu-cart-summary__base {
    font-weight: 900;
}

.emenu-cart-summary__fx {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.78;
}

.emenu-cart-taxnotice {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.72;
    line-height: 1.25;
}

.emenu-cart-summary__note {
    margin-top: 12px;
}

.emenu-cart-summary__noteLabel {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.80;
    margin: 0 0 6px 0;
}

/* Order staging toggle (checkout) */
.emenu-cart-staging {
    margin-top: 12px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
}

.emenu-cart-staging__row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.emenu-cart-staging__chk {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--accent-glow, #00d9ff);
}

.emenu-cart-staging__text {
    flex: 1 1 auto;
    min-width: 0;
}

.emenu-cart-staging__label {
    font-weight: 900;
    opacity: 0.92;
    line-height: 1.15;
}

.emenu-cart-staging__hint {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.72;
    line-height: 1.25;
}


/* Submit */
.emenu-cart-submit {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.emenu-cart-submit__btn {
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: inherit;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

:root[data-theme="neon"] .emenu-cart-submit__btn {
    border-color: rgba(0, 217, 255, 0.50);
    background: rgba(0, 217, 255, 0.14);
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.18);
}

.emenu-cart-submit__btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.emenu-cart-submit__hint {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.72;
    text-align: center;
}

.emenu-cart-submit__spinner {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: rgba(255,255,255,0.95);
    animation: ssSpin 0.9s linear infinite;
}

@keyframes ssSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Lock background scroll when modal open */
body.emenu-modal-open {
    overflow: hidden;
}

/* =========================
   Toast
   ========================= */
.emenu-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%) translateY(10px);
    z-index: 10050;
    max-width: min(520px, calc(100% - 28px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(18,18,18,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.65);
    color: inherit;
    cursor: pointer;
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
    display: none; /* shown by JS + .show */
    align-items: flex-start;
    gap: 10px;
}

    .emenu-toast.show {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

.emenu-toast__icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 900;
    line-height: 1;
    color: #000;
    background: rgba(255,255,255,0.85);
}

.emenu-toast__msg {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 800;
    opacity: 0.95;
    line-height: 1.25;
}

.emenu-toast.success {
    border-color: rgba(0, 217, 255, 0.32);
}

    .emenu-toast.success .emenu-toast__icon {
        background: var(--accent-glow, #00d9ff);
    }

.emenu-toast.error {
    border-color: rgba(255, 90, 90, 0.38);
}

    .emenu-toast.error .emenu-toast__icon {
        background: rgba(255, 90, 90, 0.88);
        color: #000;
    }

.emenu-toast.info {
    border-color: rgba(255,255,255,0.20);
}

@media (max-width: 520px) {
    .emenu-toast {
        bottom: 14px;
        padding: 12px 12px;
    }
}

/* =========================
   Orders list (session) + details modal
   ========================= */
.emenu-orders {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.emenu-orders__title {
    margin: 0 0 8px 0;
    font-weight: 700;
    opacity: 0.85;
}

.emenu-orders__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emenu-orders__row {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
}

/* Top row (summary) stays side-by-side */
.emenu-orders__rowTop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.emenu-orders__left {
    min-width: 0;
}

.emenu-orders__right {
    text-align: right;
    flex: 0 0 auto;
    min-width: 92px;
}

/* Drum in the orders list: slightly more compact */
.emenu-orders__row .emenu-course-drum {
    margin: 0;
}

.emenu-orders__row .emenu-course-drum__track {
    padding-bottom: 6px;
}

.emenu-orders__row .emenu-course-tile {
    flex-basis: 150px;
    padding: 8px 10px;
}


.emenu-orders__line1 {
    font-weight: 600;
    line-height: 1.15;
}

.emenu-orders__line2 {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.75;
}


.emenu-orders__total {
    font-weight: 700;
    opacity: 0.95;
}

.emenu-orders__status {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.78;
    font-weight: 500;
}

/* Order details modal */
.emenu-order-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
}

.emenu-order-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.emenu-order-modal__panel {
    position: relative;
    margin: 10vh auto 0;
    width: min(560px, calc(100% - 28px));
    max-height: 78vh;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(18,18,18,0.97);
    box-shadow: 0 28px 70px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.06) inset;
    display: flex;
    flex-direction: column;
}

.emenu-order-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.emenu-order-modal__title {
    font-weight: 900;
    opacity: 0.95;
}

.emenu-order-modal__close {
    /* Compact icon button (prevents huge full-width close bar on some browsers) */
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    /* Ensure global button rules can't stretch it */
    flex: 0 0 auto;
    max-width: 36px;
}

    .emenu-order-modal__close:hover {
        background: rgba(255,255,255,0.15);
    }

:root[data-theme="neon"] .emenu-order-modal__close {
    border-color: rgba(0,217,255,0.45);
    box-shadow: 0 0 10px rgba(0,217,255,0.22);
}


.emenu-order-modal__body {
    padding: 12px;
    overflow: auto;
}

.emenu-order-modal__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.emenu-order-modal__when {
    font-size: 12px;
    opacity: 0.78;
}

.emenu-order-modal__status {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.85;
    text-align: right;
}

.emenu-order-modal__section + .emenu-order-modal__section {
    margin-top: 14px;
}

.emenu-order-modal__sectionTitle {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.80;
    margin-bottom: 8px;
}

.emenu-order-modal__items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emenu-order-modal__item {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
}

.emenu-order-modal__itemTop {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.emenu-order-modal__itemName {
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
}

.emenu-order-modal__itemQty {
    font-weight: 900;
    opacity: 0.85;
    flex: 0 0 auto;
}

.emenu-order-modal__itemMeta {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.80;
}

.emenu-order-modal__note {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.78;
}

.emenu-order-modal__noteBlock {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    opacity: 0.92;
}

.emenu-order-modal__totals {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.emenu-order-modal__totRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.emenu-order-modal__totLabel {
    font-weight: 600;
    opacity: 0.80;
}

.emenu-order-modal__totVal {
    font-weight: 800;
    opacity: 0.95;
    text-align: right;
}

.emenu-order-modal__totRow.total .emenu-order-modal__totVal {
    font-size: 16px;
    font-weight: 900;
}

.emenu-order-modal__empty {
    text-align: center;
    opacity: 0.8;
    padding: 18px 8px;
}

/* ===== Guest Order Details: Course Readiness Rolling Drum ===== */
.emenu-course-drum {
    margin: 10px 0 14px;
    overflow: hidden;
}

.emenu-course-drum__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

    .emenu-course-drum__track::-webkit-scrollbar {
        height: 8px;
    }

    .emenu-course-drum__track::-webkit-scrollbar-thumb {
        border-radius: 99px;
    }

.emenu-course-tile {
    flex: 0 0 170px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    scroll-snap-align: center;
}

    .emenu-course-tile.current {
        box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
    }

.emenu-course-tile__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.emenu-course-tile__label {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emenu-course-tile__counts {
    font-size: 0.85rem;
    opacity: 0.85;
}

.emenu-course-tile__bar {
    margin-top: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
}

.emenu-course-tile__barFill {
    height: 100%;
    border-radius: 999px;
    background: rgba(255,255,255,0.45);
    width: 0;
    transition: width 220ms ease;
}

.emenu-course-tile.done .emenu-course-tile__barFill {
    background: rgba(255,255,255,0.65);
}

.emenu-course-tile.hold {
    opacity: 0.75;
}

.emenu-course-tile__hold {
    margin-top: 10px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    font-size: 18px;
}

@media (max-width: 420px) {
    .emenu-course-tile {
        flex-basis: 150px;
    }
}
/* ===== Drum Progress Color Upgrade (Guest Order Details) ===== */

/* Active / partial progress = neon cyan -> blue gradient */
.emenu-course-tile__barFill {
    background: linear-gradient(90deg, rgba(0,217,255,0.92), rgba(0,140,255,0.92));
    box-shadow: 0 0 8px rgba(0,217,255,0.32);
}

/* Completed course = green gradient */
.emenu-course-tile.done .emenu-course-tile__barFill {
    background: linear-gradient(90deg, rgba(0,255,140,0.95), rgba(0,200,120,0.95));
    box-shadow: 0 0 10px rgba(0,255,140,0.40);
}

/* Current course gets a subtle glow frame */
.emenu-course-tile.current {
    box-shadow: 0 0 0 2px rgba(0,217,255,0.32), 0 0 16px rgba(0,217,255,0.12);
}

/* Hold tile should feel paused */
.emenu-course-tile.hold {
    opacity: 0.70;
    border-color: rgba(255,255,255,0.08);
}

/* Hold pill: calm blue */
.emenu-course-tile__hold {
    background: rgba(0,140,255,0.14);
    color: rgba(0,217,255,0.88);
}

/* Optional: make the horizontal drum scrollbar thumb visible (WebKit) */
.emenu-course-drum__track::-webkit-scrollbar-thumb {
    background: rgba(0,217,255,0.18);
    border: 1px solid rgba(0,217,255,0.22);
}



/* =========================
   Crystal Menu Card Refinement
   ========================= */

.menu-item {
    background: #171c24 !important;
    border: 1px solid #2a3442 !important;
}

.menu-hero-overlay {
    background: linear-gradient( to top, rgba(0,0,0,0.85), rgba(0,0,0,0.25) ) !important;
}

.menu-badge {
    background: #1c2330 !important;
    border: 1px solid #2f3b4a !important;
    opacity: 1 !important;
}

.emenu-cart-modal__panel,
.emenu-order-modal__panel {
    background: #151a22 !important;
    border: 1px solid #2a3442 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.emenu-orders__row {
    background: #171c24 !important;
    border: 1px solid #2a3442 !important;
}

.emenu-view-toggle-btn,
.emenu-cart-submit__btn {
    background: #1b222c !important;
    border: 1px solid #2f3b4a !important;
}


/* Badges rail layout: multi-column grid (3–4 columns depending on width)
   Best practice: keep chips readable, aligned, and non-overlapping with the hero image. */
.menu-hero-badges .menu-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px;
    align-items: stretch;
}

.menu-hero-badges .menu-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Slightly tighter columns on small screens */
@media (max-width: 520px) {
    .menu-hero-badges .menu-badges {
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
        gap: 8px;
    }
}

/* Ultra-small screens: 2 columns */
@media (max-width: 360px) {
    .menu-hero-badges .menu-badges {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}
