:root {
    --takeaway-shell-width: 72rem;
    --takeaway-banner-stack-height: 0px;
}

html {
    background: #fff;
}

body.takeaway-customer-shell-page {
    background: #fff;
    color: #172033;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
}

body.takeaway-customer-shell-page *,
body.takeaway-customer-shell-page *::before,
body.takeaway-customer-shell-page *::after {
    box-sizing: border-box;
}

.takeaway-customer-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100vh;
}

.takeaway-customer-header {
    background: #fff;
    left: 0;
    margin: 0;
    padding: 0;
    position: sticky;
    right: 0;
    top: var(--takeaway-banner-stack-height);
    z-index: 999;
}

body.takeaway-customer-context-product .takeaway-customer-header,
body.takeaway-customer-context-category .takeaway-customer-header {
    position: static;
}

.takeaway-customer-header-link {
    display: block;
    margin: 0 auto;
    max-width: var(--takeaway-shell-width);
    text-decoration: none;
}

.takeaway-customer-header-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.takeaway-customer-header-image {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 160px;
    max-width: 100%;
    width: auto;
}

.takeaway-customer-main {
    margin: 0 auto;
    max-width: var(--takeaway-shell-width);
    padding: 1rem;
    width: 100%;
}

body.takeaway-customer-context-menu .takeaway-customer-main {
    padding-top: 0;
}

body.takeaway-customer-context-menu .takeaway-menu-categories {
    padding-top: 1rem;
}

body.takeaway-customer-context-order-received .takeaway-customer-main {
    padding: .75rem 1rem 1rem;
}

body.takeaway-customer-context-order-received .woocommerce,
body.takeaway-customer-context-order-received .woocommerce-order {
    width: 100%;
}

body.takeaway-customer-context-order-received .woocommerce-order {
    margin: 0 auto;
    max-width: 44rem;
}

body.takeaway-customer-context-order-received
    .woocommerce-thankyou-order-received {
    hyphens: auto;
    margin: 0 0 1rem;
    text-align: justify;
    text-justify: inter-word;
    text-wrap: pretty;
}

body.takeaway-customer-context-order-received
    .woocommerce-order-overview {
    background: var(--takeaway-menu-border, #d8dee8);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    width: 100%;
}

body.takeaway-customer-context-order-received
    .woocommerce-order-overview
    li {
    background: #f7f8fa;
    border: 0;
    float: none;
    margin: 0;
    min-width: 0;
    padding: .75rem 1rem;
    width: auto;
}

body.takeaway-customer-context-order-received
    .woocommerce-order-overview
    li
    strong {
    overflow-wrap: anywhere;
}

body.takeaway-customer-context-menu {
    padding-bottom: 5.5rem;
}

body.takeaway-customer-context-menu .takeaway-customer-business-data {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body.takeaway-customer-context-menu .takeaway-customer-footer {
    display: none;
}

.takeaway-customer-footer {
    color: #5b6472;
    font-size: .875rem;
    margin: 0 auto;
    max-width: var(--takeaway-shell-width);
    padding: 1rem;
    text-align: center;
}

.takeaway-mobile-cart-bar {
    align-items: center;
    background: #fff;
    border: 2px solid var(--takeaway-menu-border, #d8dee8);
    border-radius: 999px;
    bottom: 1rem;
    box-shadow: 0 4px 18px rgb(23 32 51 / 16%);
    display: flex;
    margin: 0;
    padding: 0;
    position: fixed;
    right: 1rem;
    right: max(
        1rem,
        calc((100vw - var(--takeaway-shell-width)) / 2 + 1rem)
    );
    z-index: 1000;
}

.takeaway-food-hygiene-badge {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    height: 50px;
    margin-left: .5rem;
    overflow: hidden;
}

.takeaway-food-hygiene-badge img {
    display: block;
    height: 50px;
    max-width: none;
    width: auto;
}

.takeaway-mobile-cart-link {
    align-items: center;
    color: #172033;
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    gap: .45rem;
    height: 3.5rem;
    justify-content: center;
    line-height: 1;
    padding: 0 1.25rem;
    text-decoration: none;
}

.takeaway-mobile-cart-link:hover,
.takeaway-mobile-cart-link:focus-visible {
    color: #172033;
}

.takeaway-mobile-cart-link:focus-visible {
    border-radius: inherit;
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.takeaway-mobile-cart-icon {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.takeaway-mobile-cart-count {
    font-size: .8rem;
    font-weight: 600;
    min-width: 1ch;
}

.takeaway-skip-link:focus {
    background: #fff;
    color: #172033;
    left: .5rem;
    padding: .75rem;
    position: fixed;
    top: .5rem;
    z-index: 10001;
}

@media (max-width: 767px) {
    .takeaway-customer-header-image {
        max-height: 96px;
    }

    body.takeaway-customer-context-order-received
        .woocommerce-order-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.takeaway-customer-context-menu {
        --takeaway-menu-category-row-height: 3.825rem;
        padding-bottom: calc(
            var(--takeaway-menu-category-row-height)
            + 4px
            + env(safe-area-inset-bottom, 0px)
        );
    }

    .takeaway-mobile-cart-bar {
        border: 0;
        border-bottom: 2px solid var(--takeaway-menu-border, #d8dee8);
        border-radius: 0;
        border-top: 2px solid var(--takeaway-menu-border, #d8dee8);
        bottom: 0;
        box-shadow: none;
        height: calc(
            var(--takeaway-menu-category-row-height)
            + 4px
            + env(safe-area-inset-bottom, 0px)
        );
        left: 0;
        margin: 0;
        padding: 0 0 env(safe-area-inset-bottom, 0px);
        position: fixed;
        right: 0;
        z-index: 1000;
    }

    .takeaway-food-hygiene-badge {
        left: .65rem;
        margin: 0;
        position: absolute;
        top: calc(50% - env(safe-area-inset-bottom, 0px) / 2);
        transform: translateY(-50%);
        z-index: 1;
    }

    .takeaway-mobile-cart-link {
        font-size: 1.25rem;
        height: var(--takeaway-menu-category-row-height);
        padding: 0;
        width: 100%;
    }

    .takeaway-mobile-cart-icon {
        height: 1.25rem;
        width: 1.25rem;
    }

    .takeaway-mobile-cart-count {
        font-size: 1.25rem;
    }

    body.takeaway-customer-context-menu .takeaway-customer-main {
        padding-bottom: 0;
    }
}

@media (max-width: 782px) {
    body.admin-bar .takeaway-customer-header {
        top: calc(46px + var(--takeaway-banner-stack-height));
    }
}

@media (min-width: 783px) {
    body.admin-bar .takeaway-customer-header {
        top: calc(32px + var(--takeaway-banner-stack-height));
    }
}
