/**
 * KB Menu Widget (Speisekarte & Mittagstisch)
 *
 * Frontend styles for the Elementor menu widget and the matching shortcodes.
 * All colors/typography are overridable through the widget style controls.
 */

.kb-menu-widget {
    --kb-menu-gap: 14px;
}

.kb-menu-widget .kb-menu__heading {
    margin: 0 0 16px;
}

/* --- Item lists --- */

.kb-menu__items {
    display: flex;
    flex-direction: column;
    gap: var(--kb-menu-gap);
}

.kb-menu__item-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.kb-menu__item-name {
    font-weight: 600;
}

.kb-menu__item-price {
    font-weight: 600;
    white-space: nowrap;
}

.kb-menu__item-duration {
    white-space: nowrap;
    opacity: 0.75;
    font-size: 0.9em;
}

/* "Preis auf Anfrage": a sentence instead of an amount — may wrap. */
.kb-menu__item-price--text {
    white-space: normal;
    font-weight: 400;
    font-size: 0.9em;
    opacity: 0.85;
    text-align: right;
}

/* Price alignment variants */
.kb-menu__items--price-right-dotted .kb-menu__item-dots {
    flex: 1;
    border-bottom: 2px dotted currentColor;
    opacity: 0.35;
    transform: translateY(-4px);
    min-width: 24px;
}

.kb-menu__items--price-right .kb-menu__item-head {
    justify-content: space-between;
}

.kb-menu__items--price-inline .kb-menu__item-head {
    justify-content: flex-start;
}

.kb-menu__item-desc {
    font-size: 0.92em;
    opacity: 0.85;
    margin-top: 2px;
}

.kb-menu__item-desc p {
    margin: 0 0 0.4em;
}

.kb-menu__item-desc p:last-child {
    margin-bottom: 0;
}

.kb-menu__item-note {
    font-size: 0.8em;
    opacity: 0.65;
    margin-top: 2px;
}

.kb-menu__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.kb-menu__chip {
    display: inline-block;
    font-size: 0.72em;
    line-height: 1.4;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
}

/* --- Menu sections --- */

.kb-menu__section {
    margin-bottom: 28px;
    break-inside: avoid;
}

.kb-menu__section-title {
    font-size: 1.2em;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 6px;
    margin-bottom: 14px;
}

/* Layout: two columns (per section flow) */
@media (min-width: 768px) {
    .kb-menu--two-column .kb-menu__section .kb-menu__items {
        display: block;
        column-count: 2;
        column-gap: 40px;
    }

    .kb-menu--two-column .kb-menu__item {
        break-inside: avoid;
        margin-bottom: var(--kb-menu-gap, 14px);
    }
}

/* Layout: cards */
.kb-menu--cards .kb-menu__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.kb-menu--cards .kb-menu__item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

/* --- Lunch --- */

.kb-lunch {
    margin-bottom: 32px;
}

.kb-lunch__date {
    opacity: 0.7;
    margin: -8px 0 14px;
    font-size: 0.9em;
}

.kb-lunch__period {
    opacity: 0.7;
    margin: -8px 0 14px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Additional single-day dishes shown below the weekly menu. */
.kb-lunch__extras {
    margin-top: 24px;
}

.kb-lunch__extras-title {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-lunch__empty {
    opacity: 0.7;
    font-style: italic;
}

.kb-lunch__day {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

.kb-lunch__day-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.kb-lunch__day-date {
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.9em;
}

/* Lunch tabs */
.kb-lunch__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.kb-lunch__tab {
    border: none;
    background: #f3f4f6;
    color: #374151;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88em;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.kb-lunch__tab:hover {
    background: #e5e7eb;
}

.kb-lunch__tab--active {
    background: #111827;
    color: #fff;
}

.kb-lunch__tab-date {
    opacity: 0.7;
    font-size: 0.85em;
}

/* --- Editor notice --- */

.kb-menu__notice {
    padding: 14px 16px;
    background: #fef3c7;
    border: 1px dashed #d97706;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}

/* --- Responsive --- */

@media (max-width: 640px) {
    .kb-lunch__tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .kb-lunch__tab {
        white-space: nowrap;
    }
}
