/*
 * The Food menu component (M7): the MenuDisplayVariants artboard. Colours
 * come from the theme's Bootstrap variables, so Cosmo and Cantina both read
 * right without a rule of their own.
 */
.menu-display {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.menu-display__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.menu-display__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-primary);
    margin: 0 0 0.25rem;
}

.menu-display__title {
    margin: 0;
}

.menu-display__intro > :last-child,
.menu-display__where {
    margin-bottom: 0;
}

.menu-display__where,
.menu-display__intro {
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}

.menu-display__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-display__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    font-size: 0.75rem;
}

/* Badges: the artboard's five colours. */
.menu-badge {
    display: inline-block;
    padding: 0.1875rem 0.4375rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

.menu-badge--popular { background: var(--bs-primary); color: var(--bs-white); }
.menu-badge--new { background: var(--bs-dark); color: var(--bs-white); }
.menu-badge--limited { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.menu-badge--online { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.menu-badge--diet { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.menu-badge--warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.menu-badge--house { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

/* Section links */
.menu-display__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: sticky;
    top: var(--site-header-height, 0px);
    z-index: 5;
    background: var(--bs-body-bg);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.menu-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--bs-primary);
    color: var(--bs-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.menu-pill:hover,
.menu-pill.active {
    background: var(--bs-primary);
    color: var(--bs-white);
}

.menu-display__menu-tabs,
.menu-display__section-tabs {
    margin-bottom: 1rem;
}

.menu-display__menu-tabs .nav-link,
.menu-display__section-tabs .nav-link {
    min-height: 2.75rem;
}

/* Sections */
.menu-display--pricelist .menu-display__sections {
    columns: 2;
    column-gap: 3rem;
}

.menu-display--pricelist .menu-section {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.menu-display--singlecolumn .menu-display__sections,
.menu-display--singlecolumn .tab-pane {
    max-width: 760px;
}

.menu-display--singlecolumn .menu-section {
    margin-bottom: 1.5rem;
}

.menu-display--singlecolumn .menu-section__title {
    border-bottom: 2px solid var(--bs-emphasis-color);
    padding-bottom: 0.375rem;
}

.menu-display--cardgrid .menu-section {
    margin-bottom: 2rem;
}

.menu-section {
    scroll-margin-top: calc(var(--site-header-height, 0px) + 4rem);
}

.menu-section__summary {
    list-style: none;
    cursor: default;
}

.menu-section__summary::-webkit-details-marker {
    display: none;
}

.menu-section__title {
    font-size: 1.5rem;
    margin: 0;
}

.menu-display--pricelist .menu-section__title {
    color: var(--bs-primary);
}

.menu-section__blurb,
.menu-section__note {
    margin: 0.125rem 0 0.375rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.menu-section__note {
    font-weight: 600;
}

/* Lines */
.menu-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.menu-item__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.menu-item__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.menu-display--price-leaders .menu-item__head {
    justify-content: flex-start;
}

.menu-item__dots {
    flex: 1;
    border-bottom: 1px dotted var(--bs-secondary-color);
    position: relative;
    top: -0.25rem;
    min-width: 1rem;
}

.menu-item__name {
    font-weight: 600;
    color: inherit;
}

/* A dish's name is a link to its page (the default), set like the plain name
   so the printed list reads the same; the color on hover or focus is what
   says it opens. */
a.menu-item__name {
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a.menu-item__name:hover,
a.menu-item__name:focus-visible {
    /* The link color, not its hover shade: that one is darker and sits too
       close to the text it replaces. */
    color: var(--bs-link-color, var(--bs-primary));
}

.menu-item__open {
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
}

.menu-item__price {
    font-weight: 600;
    white-space: nowrap;
}

.menu-item__desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.menu-item__extras,
.menu-item__state {
    font-size: 0.8125rem;
}

.menu-item__state {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.menu-item__order {
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
}

.menu-item__img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--bs-border-radius);
    flex-shrink: 0;
}

/* Card grid */
.menu-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.menu-card {
    display: flex;
    flex-direction: column;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

.menu-card .menu-item__img {
    width: 100%;
    height: 160px;
    border-radius: 0;
}

.menu-item__img--none {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-size: 1.5rem;
}

.menu-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.menu-card__foot {
    margin-top: auto;
    padding-top: 0.25rem;
}

@media (max-width: 991.98px) {
    .menu-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/*
 * On a phone every template becomes an accordion: the section names are its
 * headers (menu-display.js closes all but the first), and the pills and
 * section tabs step aside for them.
 */
@media (max-width: 767.98px) {
    .menu-display--pricelist .menu-display__sections {
        columns: 1;
    }

    .menu-display__pills,
    .menu-display__section-tabs {
        display: none;
    }

    /* The menus stay one row, scrolled sideways, rather than wrapping. */
    .menu-display__menu-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .menu-display__menu-tabs .nav-link {
        white-space: nowrap;
    }

    .menu-display .menu-display__sections > .tab-pane {
        display: block;
        opacity: 1;
    }

    .menu-section {
        border-bottom: 1px solid var(--bs-border-color);
        margin-bottom: 0 !important;
    }

    .menu-section__summary {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 3rem;
        padding: 0.5rem 0;
    }

    .menu-section__summary::after {
        content: "";
        width: 0.75rem;
        height: 0.75rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s;
        margin-right: 0.25rem;
    }

    .menu-section__fold[open] > .menu-section__summary::after {
        transform: rotate(225deg);
    }

    .menu-display--singlecolumn .menu-section__title {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .menu-section__title {
        font-size: 1.25rem;
    }

    .menu-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The accordion section nav on a desktop too. */
@media (min-width: 768px) {
    .menu-display--nav-accordion .menu-section {
        border-bottom: 1px solid var(--bs-border-color);
    }

    .menu-display--nav-accordion .menu-section__summary {
        cursor: pointer;
        padding: 0.5rem 0;
    }
}

/* Printing: every section, every menu, no links or buttons. */
@media print {
    .menu-display__pills,
    .menu-display__section-tabs,
    .menu-display__menu-tabs,
    .menu-display__actions,
    .menu-item__order,
    .menu-card__foot {
        display: none !important;
    }

    .menu-display .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }

    .menu-section {
        break-inside: avoid;
    }

    .menu-card {
        break-inside: avoid;
    }
}

/* Dish feature cards (M7): the menu's cards, chosen and set as a band. */
.dish-cards {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* A row of dishes is content, so on a full bleed page it keeps the site
   band, as a row of cards does. */
.page-full .dish-cards > * {
    width: 100%;
    max-width: var(--cms-band);
    margin-inline: auto;
    padding-inline: 0.75rem;
}

.dish-cards__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.dish-cards__title {
    margin: 0;
}

.dish-cards--dishgrid .dish-cards__list {
    display: grid;
    grid-template-columns: repeat(var(--dish-columns, 3), minmax(0, 1fr));
    gap: 1.5rem;
}

.dish-cards--dishrow .dish-cards__list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(15rem, 18rem);
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.dish-cards--dishrow .menu-card {
    scroll-snap-align: start;
}

.dish-cards .menu-item__img {
    height: 170px;
}

@media (max-width: 991.98px) {
    .dish-cards--dishgrid .dish-cards__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dish-cards--dishgrid .dish-cards__list {
        grid-template-columns: minmax(0, 1fr);
    }
}
