/* Mobile navigation fixes shared by the storefront and personal center. */

.sg-mobile-nav-toolbar {
    display: none;
}

@media (max-width: 991.98px) {
    .navbar-acg .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 6px;
    }

    .navbar-acg .navbar-brand {
        order: 1;
        min-width: 0;
        margin-right: auto;
        flex: 0 1 auto;
    }

    .navbar-acg .user-login-box,
    .navbar-acg .user-info-box {
        position: static !important;
        top: auto !important;
        right: auto !important;
        order: 2;
        flex: 0 0 auto;
        margin-left: 0 !important;
    }

    .navbar-acg .user-login-box {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .navbar-acg .shop-language {
        order: 3;
        margin-left: 0;
    }

    .navbar-acg .navbar-toggler {
        position: relative;
        z-index: 2;
        order: 4;
        width: 42px;
        height: 36px;
        flex: 0 0 42px;
        margin: 0;
        padding: 3px 7px;
    }

    .navbar-acg #navbarNav {
        order: 5;
        width: 100%;
        flex-basis: 100%;
    }

    .navbar-acg #navbarNav.show,
    .navbar-acg #navbarNav.collapsing {
        margin-top: 9px;
        padding: 8px 11px;
        border: 1px solid rgba(52, 58, 64, .08);
        border-radius: 14px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 12px 30px rgba(45, 38, 40, .08);
    }

    .navbar-acg #navbarNav .nav-link {
        min-height: 42px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 575.98px) {
    .navbar-acg {
        padding: 8px 0;
    }

    .navbar-acg .container {
        gap: 0 4px;
    }

    .navbar-acg .user-login-box .btn {
        display: inline-flex;
        width: 36px;
        min-width: 36px;
        height: 35px;
        align-items: center;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .navbar-acg .user-login-box .btn .nav-icon {
        margin: 0 !important;
        font-size: 14px;
    }

    .navbar-acg .shop-language summary {
        min-width: 46px;
        padding: 0 7px;
        gap: 4px;
    }

    .navbar-acg .navbar-toggler {
        width: 40px;
        flex-basis: 40px;
    }
}

@media (max-width: 359.98px) {
    .navbar-acg .navbar-brand .shopgpt-wordmark {
        font-size: 18px;
    }

    .navbar-acg .brand-logo {
        width: 28px;
        height: 28px;
    }

    .navbar-acg .shop-language summary {
        width: 36px;
        min-width: 36px;
        padding: 0;
    }

    .navbar-acg .shop-language__current,
    .navbar-acg .shop-language__chevron {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .sg-mobile-nav-toolbar {
        position: sticky;
        top: 0;
        z-index: 3;
        display: flex;
        min-height: 58px;
        align-items: center;
        justify-content: space-between;
        padding: max(8px, env(safe-area-inset-top)) 12px 8px 18px;
        border-bottom: 1px solid rgba(125, 105, 115, .10);
        background: rgba(255, 255, 255, .97);
        color: #ef7185;
        font-size: 15px;
        font-weight: 800;
    }

    .sg-mobile-nav-toolbar > span {
        display: inline-flex;
        align-items: center;
    }

    .sg-mobile-nav-toolbar > span .layui-icon {
        top: 0;
        margin-right: 8px;
        font-size: 18px;
    }

    .sg-mobile-nav-close {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        padding: 0;
        border: 1px solid rgba(239, 113, 133, .20);
        border-radius: 12px;
        outline: 0;
        background: #fff5f7;
        color: #e45f78;
        cursor: pointer;
    }

    .sg-mobile-nav-close .layui-icon {
        top: 0;
        margin: 0;
        font-size: 18px;
    }

    .site-mobile {
        overflow: hidden;
    }

    .site-mobile .bg-content {
        overflow: hidden !important;
    }

    .site-mobile .fly-user-main > .sg-user-nav {
        width: min(82vw, 260px);
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fly-user-main > .layui-nav {
        transition: none !important;
    }
}
