/* Mobile viewport, scrolling and navigation fixes. Loaded after the feature styles. */
@media (max-width: 900px) {
    html,
    body {
        min-height: calc(100vh + 1px);
        min-height: calc(100dvh + 1px);
    }

    .app {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    .main {
        flex: 1 1 auto;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 12px 12px calc(92px + env(safe-area-inset-bottom, 0px));
        overflow: visible;
    }

    .content {
        height: auto;
        min-height: 0;
    }

    .view.active {
        height: auto;
        min-height: 0;
    }

    #recipes.view.active {
        height: auto;
        overflow: visible;
        padding-bottom: 24px;
    }

    .dashboard {
        height: auto;
    }

    #chat.view.active {
        height: auto;
        min-height: 0;
    }

    #chat .dashboard {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .chat-side-panels {
        display: none;
    }

    .chat-layout {
        height: calc(100dvh - 112px - env(safe-area-inset-bottom, 0px));
        min-height: 300px;
    }

    .mobile-nav {
        height: calc(68px + env(safe-area-inset-bottom, 0px));
        padding: 0 max(4px, env(safe-area-inset-left, 0px)) env(safe-area-inset-bottom, 0px);
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav button {
        flex: 1 0 0;
        min-width: 0;
        white-space: nowrap;
        font-size: 10px;
    }

    .mobile-nav span {
        font-size: 19px;
    }
}
