/* Fluxo Food companion only. WKWebView uses viewport-fit=cover and no native insets. */
html.fluxo-food-app.publy-ios-app #app-container:not(.hidden) {
    box-sizing: border-box;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    overflow: hidden;
}

html.fluxo-food-app.publy-ios-app #app-main-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding-top: 0 !important;
    overflow: hidden;
}

html.fluxo-food-app.publy-ios-app #app-main-column > header.glass-panel {
    position: relative !important;
    top: auto !important;
    flex: 0 0 56px !important;
    min-height: 56px;
    height: 56px;
    width: 100%;
}

html.fluxo-food-app.publy-ios-app #app-main-scroll {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    padding-bottom: 0 !important;
    overflow: hidden;
}

html.fluxo-food-app.publy-ios-app #app-main-scroll > .tab-content {
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px !important;
}

/* The bottom bar is in flow: no content or checkout button behind it. */
html.fluxo-food-app.publy-ios-app #mobile-bottom-nav {
    position: relative !important;
    flex: 0 0 auto;
    min-width: 0;
    bottom: auto !important;
}

/* The companion has no sidebar. Reuse its header space for the existing guide. */
html.fluxo-food-app.publy-ios-app #app-main-column > header [aria-label="Abrir menu"] {
    display: none !important;
}

html.fluxo-food-app.publy-ios-app #app-main-column > header > :first-child {
    padding-left: 52px;
    min-width: 0;
}

html.fluxo-food-app.publy-ios-app #header-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.fluxo-food-app.publy-ios-app #genius-guide-fab {
    top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
    left: calc(env(safe-area-inset-left, 0px) + 12px) !important;
    right: auto !important;
    bottom: auto !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    padding: 10px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

/* Chat IA and human help remain accessible through the header's Suporte button. */
html.fluxo-food-app.publy-ios-app #support-fab {
    display: none !important;
}

html.fluxo-food-app.publy-ios-app #genius-guide-panel,
html.fluxo-food-app.publy-ios-app #support-chat-panel {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 64px) !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 132px) !important;
}
