/* ── Root Tabs: full width. The block has no width cap of its own — it's simply ── */
/* not constrained to the site's centered content column (see _globals.scss),     */
/* and `supports.align: ['full']` (set automatically, see edit()) makes Gutenberg */
/* break it out of the editor's content column the same way while editing.        */
.tabs-block {
    box-sizing: border-box;
    padding: 0 100px;
    margin-bottom: 32px;
}

@media screen and (max-width: 992px) {
    .tabs-block {
        padding: 0 20px;
    }

    /* Divider under the parent tabs row, separating it from the content below */
    .tabs-block-nav {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(61, 60, 60, 0.2);
    }
}

/* Root nav (parent tabs): mobile-first — a row, space between, above the content */
.tabs-block-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 8px;
    column-gap: 12px;
    margin-bottom: 32px;
}

@media screen and (max-width: 570px) {
    .tabs-block-nav {
        flex-direction: column;
    }
}

.tabs-block-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid var(--stone-grey, #3d3c3c);
    background-color: transparent;
    color: var(--stone-grey, #3d3c3c);
    font-family: 'Moulin', sans-serif;
    font-size: var(--p-small, 15px);
    font-weight: 400;
    line-height: 1.33;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.tabs-block-tab:hover {
    background-color: var(--stone-grey, #3d3c3c);
    color: var(--crisp-white, #fff);
}

.tabs-block-tab.is-active {
    background-color: var(--stone-grey, #3d3c3c);
    color: var(--crisp-white, #fff);
}

.tab-panel-block[hidden] {
    display: none !important;
}

/* Desktop: parent tabs move into a left-hand sidebar beside the content */
@media screen and (min-width: 993px) {
    .tabs-block {
        display: flex;
        align-items: flex-start;
        gap: 48px;
    }

    .tabs-block-nav {
        flex: 0 0 260px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        margin-bottom: 0;
    }

    .tabs-block-panels {
        flex: 1;
        min-width: 0;
    }

    .tabs-block-tab {
        width: 100%;
        justify-content: flex-start;
        padding-left: 28px;
    }
}

/* ── Nested "children" tabs (e.g. Mains / Sides / Kids): keep the original ── */
/* horizontal pill row regardless of breakpoint — only the parent tabs move.  */
.tab-panel-block .tabs-block {
    display: block;
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.tab-panel-block .tabs-block-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}

.tab-panel-block .tabs-block-tab {
    width: auto;
    max-width: none;
    padding: 8px 18px;
    font-size: var(--p-small, 15px);
    justify-content: center;
}

@media screen and (max-width: 992px) {
    .tab-panel-block .tabs-block-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        margin-bottom: 24px;
        padding-bottom: 4px;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        border-bottom: none;
    }

    .tab-panel-block .tabs-block-nav::-webkit-scrollbar {
        display: none;
    }
}

/* ── Editor-only styling ── */
.tab-panel-block--editor {
    border: 1px dashed rgba(61, 60, 60, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.tab-panel-block-label {
    max-width: 320px;
    margin-bottom: 16px;
}

.tab-panel-block-content {
    border-top: 1px solid rgba(61, 60, 60, 0.15);
    padding-top: 16px;
}
