/* ============================================================
   My Kitchen — customer menu components (spec #33 structure)
   ------------------------------------------------------------
   Colors come from the theme custom properties that
   assets/css/theme.css + theme.js control, with literal
   fallbacks so the page still renders sensibly if the theme
   layer ever fails to load.

   Admin styles live in style.css. Menu logic is NOT affected
   by anything here (spec #29).
   ============================================================ */

body.menu-page {
    padding-bottom: 2rem;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ── Hero (#7, #8, #23) ───────────────────────────────────── */
.menu-hero {
    background: linear-gradient(140deg, var(--hero-grad-a, #c2410c) 0%, var(--hero-grad-b, #9a3412) 100%);
    padding: 2.2rem 1rem 2.4rem;
    border-radius: 0 0 28px 28px;
    box-shadow: var(--shadow);
}

.restaurant-logo {
    width: 76px; height: 76px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    background: rgba(255, 255, 255, .16);
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    font-size: 2rem;
    backdrop-filter: blur(4px);
}

.restaurant-name {
    font-size: clamp(1.7rem, 5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: .5px;
}

.restaurant-tagline { opacity: .92; letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; }

.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Hero greeting text (clock-driven; nothing else) */
.hero-greeting-line { font-size: clamp(1.15rem, 4vw, 1.5rem); font-weight: 700; margin: 0; }
.hero-greeting-icon { font-size: 1.15em; }
.hero-quote { font-size: .92rem; font-style: italic; opacity: .92; margin: 0; }

/* ── Meal tabs (#27, #28): horizontally scrollable on mobile ── */
.menu-tabs {
    --bs-nav-pills-border-radius: 999px;
    gap: .45rem;
    padding-bottom: .35rem;
    -webkit-overflow-scrolling: touch;
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tabs .nav-link {
    font-weight: 700;
    color: var(--tab-text, #374151);
    background: var(--tab-bg, #fff);
    border: 1.5px solid var(--tab-border, #e5e7eb);
    border-radius: 999px;
    padding: .45rem 1.05rem;
    font-size: .9rem;
    white-space: nowrap;
}
.menu-tabs .nav-link:hover { border-color: var(--primary, #c2410c); color: var(--primary, #c2410c); }
.menu-tabs .nav-link.active {
    background: var(--primary, #c2410c);
    border-color: var(--primary, #c2410c);
    color: #fff;
}
.menu-tabs .nav-link[data-empty="1"] { opacity: .55; }

/* ── Availability states (#10, #11): muted, never hidden ──── */
.menu-card-unavailable { opacity: .65; }
.menu-card-unavailable:hover { transform: none; }
.menu-card-unavailable .card-img-wrap img { filter: grayscale(.55); }
.flag-available   { background: #dcfce7; color: #166534; }
.flag-unavailable { background: #e5e7eb; color: #4b5563; }
/* Night needs light-on-dark variants */
body.theme-night .flag-available   { background: rgba(34, 197, 94, .18); color: #86efac; }
body.theme-night .flag-unavailable { background: rgba(255, 255, 255, .10); color: #d4d4d4; }
body.theme-night .flag-star        { background: rgba(245, 158, 11, .15); color: #fcd34d; }
body.theme-night .flag-spicy       { background: rgba(239, 68, 68, .15); color: #fca5a5; }

/* ── Food card (#25) ──────────────────────────────────────── */
.menu-card {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, 16px);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
    border: 1px solid var(--border, #f1f1f1);
}
.menu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-img-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--background, #fff1e8); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.food-badge {
    position: absolute; top: 8px; left: 8px;
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(255, 255, 255, .95);
    border-radius: 999px;
    padding: .2rem .6rem;
    font-size: .72rem; font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.food-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1.5px solid #374151; }
.dot-veg    { background: #16a34a; }
.dot-nonveg { background: #dc2626; }
.dot-egg    { background: #f59e0b; }

.card-body-wrap { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.item-name { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.25; }
.item-desc {
    color: var(--desc, var(--muted, #6b7280)); font-size: .8rem; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .35rem; }
.item-price { color: var(--accent, #c2410c); font-weight: 800; font-size: 1.05rem; }
.item-cat {
    font-size: .68rem; color: var(--cat-text, #6b7280);
    background: var(--cat-bg, #f3f4f6); border-radius: 999px; padding: .15rem .55rem; font-weight: 600;
}

.card-flags { display: flex; gap: .4rem; flex-wrap: wrap; }
.flag { font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .12rem .5rem; }
.flag-star  { background: #fef3c7; color: #92400e; }
.flag-spicy { background: #fee2e2; color: #991b1b; }

/* ── Section header + empty state ─────────────────────────── */
.section-divider { color: var(--primary, #9a3412); font-weight: 700; }
.divider-line { height: 1px; background: var(--border, #e5e7eb); }

.empty-state {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, 16px);
    box-shadow: var(--shadow);
    padding: 2.4rem 1.4rem;
}
.empty-icon { font-size: 2.6rem; margin-bottom: .4rem; }
.empty-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .2rem; }

/* ── Mobile polish (#28) ──────────────────────────────────── */
@media (max-width: 767.98px) {
    .menu-hero { padding: 1.8rem 1rem 2rem; }
    .menu-tabs .nav-link { padding: .4rem .85rem; font-size: .85rem; }
}
