/* Public / editor preview menu tables inside menu tab panels only */
[data-menu-panel-scope] .menu-tabs-table {
    table-layout: fixed;
    width: 100%;
}

[data-menu-panel-scope] .menu-tabs-table col.menu-tabs-col-photo {
    width: 80px;
}

[data-menu-panel-scope] .menu-tabs-table col.menu-tabs-col-price {
    width: 120px;
}

[data-menu-panel-scope] .menu-tabs-table col.menu-tabs-col-ingredients {
    width: 26%;
}

[data-menu-panel-scope] .menu-tabs-table .menu-col-ingredients--has-body {
    text-align: left;
    color: #555;
    font-size: 0.95rem;
}

[data-menu-panel-scope] .menu-tabs-table .menu-col-ingredients--empty {
    padding: 0;
}

/* Фиксированная ширина колонки фото (совпадает с col.menu-tabs-col-photo). */
[data-menu-panel-scope] .menu-tabs-table .menu-col-photo {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    box-sizing: border-box;
    vertical-align: middle;
}

[data-menu-panel-scope] .menu-tabs-table .menu-col-price {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    box-sizing: border-box;
    vertical-align: middle;
}

[data-menu-panel-scope] .menu-tabs-table img[data-menu-photo-full] {
    cursor: pointer;
}

[data-menu-panel-scope] .menu-tabs-table .menu-ingredients-toggle {
    display: none;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

[data-menu-panel-scope] .menu-tabs-table .menu-price-oos-label {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
}

@media screen and (max-width: 768px) {
    /* Одна сетка из 4 колонок: не display:none на td — иначе цена «прыгает» между строками с/без состава */
    [data-menu-panel-scope] .menu-tabs-table col.menu-tabs-col-ingredients {
        width: 0 !important;
    }

    [data-menu-panel-scope] .menu-tabs-table thead .menu-col-ingredients {
        width: 0;
        max-width: 0;
        padding: 0;
        overflow: hidden;
        font-size: 0;
        line-height: 0;
        border: none;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-col-ingredients {
        width: 0;
        min-width: 0;
        max-width: 0;
        padding: 0 !important;
        border: none;
        overflow: hidden;
        vertical-align: middle;
        font-size: 0;
        line-height: 0;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-col-ingredients [data-menu-ingredients-body] {
        display: none;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-col-dish--ing-toggle {
        position: relative;
        vertical-align: top;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-col-dish--ing-toggle .menu-dish-title {
        position: relative;
        z-index: 0;
    }

    /* «Вкладка» в правый нижний угол ячейки: сливается справа и снизу с краем */
    [data-menu-panel-scope] .menu-tabs-table .menu-ingredients-toggle {
        position: absolute;
        bottom: 0;
        right: 0;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 2px 3px 2px 4px;
        font-size: 0.6rem;
        line-height: 1.2;
        max-width: 4.5rem;
        font-family: inherit;
        font-weight: 600;
        color: var(--black);
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        background: var(--grey);
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--black);
        border-left: 1px solid var(--black);
        border-radius: 6px 0 0 0;
        transition: none;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-ingredients-toggle:hover,
    [data-menu-panel-scope] .menu-tabs-table .menu-ingredients-toggle:active {
        background: var(--grey);
        box-shadow: none;
        transform: none;
    }

    [data-menu-panel-scope] .menu-tabs-table .menu-ingredients-toggle:focus-visible {
        outline: 2px solid var(--blue);
        outline-offset: 1px;
    }
}

#restaurant-page-qr-modal.custom-modal-overlay,
#public-rent-page-qr-modal.custom-modal-overlay,
#public-restaurant-list-page-qr-modal.custom-modal-overlay {
    display: none;
}

.restaurant-page-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.restaurant-page-qr-url {
    font-size: 12px;
    word-break: break-all;
    text-align: center;
    margin: 0 0 8px;
}

.restaurant-page-qr-btn {
    min-width: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: auto;
}

.restaurant-page-qr-icon {
    display: block;
    width: 22px;
    height: 22px;
}

.restaurant-page-top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

/* .btn-main has margin-left: auto globally — back must stay left, QR stays right */
.restaurant-page-top-actions .btn-main {
    margin-left: 0;
    width: auto;
}

.restaurant-page-top-actions .restaurant-page-qr-btn {
    margin-left: auto;
}
/* Menu category accordion buttons inside tab panels */
[data-menu-panel-scope] [data-app-accordion] {
    margin-top: 4px;
}

[data-menu-panel-scope] .accordion_btn {
    font-family: 'Inter', sans-serif;
}

[data-menu-panel-scope] .app-accordion__label {
    font-weight: bold;
}

/* Category open: button + menu table share one outer border */
[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .app-accordion__panel {
    padding-top: 0;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .accordion_btn {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .app-accordion__panel > .app-accordion__panel-body {
    box-sizing: border-box;
    margin-bottom: 12px;
    border: 1px solid var(--black, #000);
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

/* One outer frame on panel-body; table/cells only internal dividers (no double borders) */
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table {
    border: none;
    border-collapse: collapse;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table th,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table td {
    border: 1px solid var(--black, #000);
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table tr > :first-child {
    border-left: none;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table tr > :last-child {
    border-right: none;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table tbody tr:last-child > th,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table tbody tr:last-child > td {
    border-bottom: none;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table thead tr:first-child > th,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table thead tr:first-child > td,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table > tbody > tr:first-child > th,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__panel-body.table-responsive .menu-tabs-table > tbody > tr:first-child > td {
    border-top: none;
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open:hover > .accordion_btn {
    border-color: var(--black, #000);
}

[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .accordion_btn:hover,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .accordion_btn:active,
[data-menu-panel-scope] .app-accordion--attached .app-accordion__item.is-open > .accordion_btn:focus {
    border-bottom: none;
}
