/**
 * C4mulo5 Restaurant Menu — Frontend Styles
 *
 * Karten-Layout, Filter-Buttons, Allergene-Tooltips.
 * Mobile-first, brand-agnostisch (nutzt currentColor + CSS-Variablen
 * damit es sich in jedes Mesmerize-Theme einfügt).
 */

.c4mulo5-restaurant-menu {
    padding: 60px 0;
}

.c4m5-menu-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.c4m5-menu-header {
    margin-bottom: 32px;
}
.c4m5-menu-header h2 {
    margin-bottom: 12px;
}
.c4m5-menu-header p {
    color: #50575e;
    font-size: 1.05rem;
}

/* ─── Filter-Buttons ─────────────────────────────────────────── */
.c4m5-menu-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
    padding: 16px 12px;
    background: #f9f7f4;
    border-radius: 999px;
}
.c4m5-menu-filter {
    background: transparent;
    border: 1px solid transparent;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: #50575e;
    transition: all 0.18s ease;
    line-height: 1.3;
}
.c4m5-menu-filter:hover {
    background: #fff;
    border-color: #e6e6e6;
    color: #1d2327;
}
.c4m5-menu-filter.is-active {
    background: #fff;
    border-color: currentColor;
    color: #8b1538; /* Brand-Akzent — wird vom Theme überschrieben falls anders */
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ─── Kategorie-Gruppen ───────────────────────────────────────── */
.c4m5-menu-group {
    margin-bottom: 48px;
}
.c4m5-menu-group:last-child {
    margin-bottom: 0;
}
.c4m5-menu-cat-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid currentColor;
    color: #8b1538;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ─── Einzel-Eintrag ──────────────────────────────────────────── */
.c4m5-menu-item {
    margin-bottom: 4px;
    padding: 18px 0;
    border-bottom: 1px dashed #e6e6e6;
    transition: opacity 0.2s ease;
}
.c4m5-menu-item.is-hidden {
    display: none;
}
.c4m5-menu-item:last-child {
    border-bottom: none;
}

.c4m5-menu-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.c4m5-menu-item-main {
    flex: 1;
    min-width: 0;
}
.c4m5-menu-item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 6px;
    line-height: 1.4;
}
.c4m5-menu-item-name strong {
    font-weight: 700;
}
.c4m5-menu-item-desc {
    font-size: 0.92rem;
    color: #50575e;
    line-height: 1.5;
    font-style: italic;
}
.c4m5-menu-item-desc p {
    margin: 0;
}
.c4m5-menu-item-gf-note {
    margin-top: 4px;
    color: #8b1538;
    font-size: 0.82rem;
}

/* Preis */
.c4m5-menu-item-price {
    flex: 0 0 auto;
    text-align: right;
    min-width: 80px;
    font-size: 1.1rem;
    color: #1d2327;
    font-weight: 700;
}
.c4m5-menu-item-price small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #8c8f94;
    margin-top: 2px;
}

/* ─── Diät-Flags (Inline-Icons neben Namen) ──────────────────── */
.c4m5-menu-flag {
    display: inline-block;
    font-size: 0.92rem;
    margin-left: 4px;
    cursor: help;
}

/* ─── Allergene-Codes (mit Tooltip) ──────────────────────────── */
.c4m5-menu-codes {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.78rem;
    color: #8c8f94;
    font-weight: 400;
    cursor: help;
    position: relative;
}
.c4m5-menu-codes::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.72rem;
    line-height: 1.4;
    font-style: normal;
    white-space: pre-line;
    min-width: 220px;
    max-width: 320px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 10;
}
.c4m5-menu-codes:hover::after,
.c4m5-menu-codes.is-active::after {
    opacity: 1;
}
.c4m5-menu-codes::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1d2327;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.c4m5-menu-codes:hover::before,
.c4m5-menu-codes.is-active::before {
    opacity: 1;
}

/* ─── Layout: 2-spaltig ──────────────────────────────────────── */
@media (min-width: 768px) {
    .c4m5-menu-wrap[data-layout="cards-2col"] .c4m5-menu-item.col-sm-6 {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ─── Empty State ─────────────────────────────────────────────── */
.c4m5-menu-empty {
    padding: 32px 24px;
    text-align: center;
    color: #50575e;
    font-style: italic;
    background: #f9f7f4;
    border-radius: 8px;
}

/* ─── Mobile-Anpassungen ─────────────────────────────────────── */
@media (max-width: 600px) {
    .c4m5-menu-item-row {
        flex-direction: column;
        gap: 8px;
    }
    .c4m5-menu-item-price {
        text-align: left;
        font-size: 1.05rem;
    }
    .c4m5-menu-cat-title {
        font-size: 1.3rem;
    }
    .c4m5-menu-filters {
        padding: 12px 8px;
    }
    .c4m5-menu-filter {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    .c4m5-menu-codes::after {
        left: auto;
        right: 0;
        transform: none;
        max-width: 280px;
    }
    .c4m5-menu-codes::before {
        display: none;
    }
}
