:root {
    --transition-duration-show-mobile-menu: 0.15s;
}

.mobile-menu-root {
    background-color: var(--charcoal-grey);
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 0;
    position: absolute;
    opacity: 0;
    overflow: hidden;
    top: 0;
    left: 100vw;
    height: 100vh;
    width: 0;
    transform: translateX(0);
}

body {
    left: 0;
    top: 0;
    overflow-x: hidden;
    width: 100vw;
    transition: left var(--transition-duration-show-mobile-menu) linear 0s;
}

@media (prefers-reduced-motion: reduce) {
    body {
        transition-duration: 0s;
    }
}

.mobile-menu-visible body {
    position: fixed;
    left: -100vw;
}

.mobile-menu-visible .mobile-menu-root {
    opacity: 1;
    width: 100vw;
}

.mobile-menu-root .featured-image {
    background-image: url(../images/mobile-menu/menu-bg.jpg);
    background-size: cover;
    background-position: center center;
    z-index: 2;
}

.supports-webp-yes .mobile-menu-root .featured-image {
    background-image: url(../images/mobile-menu/menu-bg.webp);
}

.mobile-menu-root .featured-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
}

.mobile-menu-root .featured-image .image-overlay.first {
    background-image: url(../images/mobile-menu/pattern-poly-dark.svg);
    background-size: cover;
    background-position: center center;
    opacity: 0.1;
    z-index: var(--z-index-mobile-menu-image-overlay);
}

.mobile-menu-root .featured-image .image-overlay.second {
    background-image: linear-gradient(222deg, rgba(0, 0, 0, 0), #000);
    opacity: 0.7;
    z-index: var(--z-index-mobile-menu-gradient-overlay);
}

.mobile-menu-root .featured-image .menu-text {
    color: var(--white);
    font-size: 2rem;
    font-style: italic;
    left: 0;
    line-height: 1.13;
    box-sizing: border-box;
    padding: 0 8rem;
    position: absolute;
    bottom: 16rem;
    z-index: var(--z-index-mobile-menu-text);
    width: 50%;
}

/* This is the container for the actual grey menu */
.mobile-menu-root .menu-wrap {
    align-content: start;
    align-items: start;
    /*display: grid;
    grid-auto-rows: min-content;
    grid-template-rows: minmax(0, 5rem) auto repeat(4, auto minmax(0, 1.2rem)) 1rem;*/
    height: 100vh;
    overflow-y: scroll;
    padding-left: 7rem;
    padding-top: 30px;
    position: absolute;
    right: 0;
    transition: all 0.25s ease-in;
    top: 0;
    width: 50vw;
}

.mobile-menu-root ::-webkit-scrollbar {
    display: none;
}

.mobile-menu-root .menu-wrap.screen-2 {
    right: -50vw;
}

.mobile-menu-root.show-screen-2 .menu-wrap.screen-1 {
    right: 50vw;
}

.mobile-menu-root.show-screen-2 .menu-wrap.screen-2 {
    right: 0;
}

/* Lines between items */
.mobile-menu-root .sep {
    background-color: var(--greyish-brown);
    align-self: center;
    /*border-top: 0.0625rem solid var(--greyish-brown);*/
    height: 1px;
    margin: 0.5rem 0;
    max-width: 15.625rem;
}

.mobile-menu-root .primary-mobile-menu + .sep {
    border-color: transparent;
}

/* Generic class for all top-level menus */
.mobile-menu-root .nav-with-list {
    line-height: 2.2;
}

.mobile-menu-root .nav-with-list a {
    color: var(--white);
}

/* Specific overrides for each menu */
.mobile-menu-root .primary-mobile-menu a {
    font-size: 1.75rem;
}

.mobile-menu-root .mobile-cta-nav-new a,
.mobile-menu-root .mobile-make-a-gift a {
    font-size: 1.25rem;
    text-transform: uppercase;
    font-weight: 700;
}

.mobile-menu-root .secondary-mobile-menu a {
    color: var(--brown-grey);
    font-size: 1.25rem;
}

.mobile-menu-root .close-mobile-menu {
    position: fixed;
    right: 1.875rem;
    top: 3.125rem;
    color: white;
}

.mobile-menu-root .primary-mobile-menu li {
    line-height: 2.5rem;
}

.mobile-menu-root .login-mobile-menu h2 {
    align-items: center;
    color: var(--white);
    display: grid;
    font-size: 1.25rem;
    grid-template-columns: 2rem auto 3rem;
    margin: 1rem 0;
    max-width: 15.625rem;
    padding: 0;
    text-transform: uppercase;
}

.mobile-menu-root .login-mobile-menu button {
    display: none;
}

.mobile-menu-root .login-mobile-menu h2 .lock-icon {
    color: var(--brown-grey);
    max-height: 0.875rem;
}

.mobile-menu-root .login-mobile-menu h2 .mobile-login-arrow {
    color: var(--white);
    justify-self: right;
    max-height: 2rem;
}

.mobile-menu-root .login-mobile-menu-mobile-version {
    position: relative;
}

.mobile-menu-root .login-mobile-menu a {
    color: var(--brown-grey);
    font-size: 1.25rem;
}

.mobile-menu-root .mobile-cta-nav-new .make-a-gift {
    display: none;
}

.secondary-push-back-button button {
    color: var(--white);
    font-size: 1rem;
    margin: 1rem 0;
    padding: 0;
    text-transform: uppercase;
}

.secondary-push-back-button button svg {
    display: inline-block;
    vertical-align: middle;
}

.secondary-push-menu .login-mobile-menu.nav-with-list {
    margin-top: 1.875rem;
}

@media (max-height: 52em) {
    .mobile-menu-root .menu-wrap {
        grid-template-rows: minmax(0, 3rem) auto repeat(4, auto minmax(0, 2rem));
        padding-left: 5rem;
    }

    .mobile-menu-root .primary-mobile-menu li,
    .mobile-menu-root .secondary-mobile-menu li,
    .mobile-menu-root .mobile-cta-nav-new li,
    .mobile-menu-root .login-mobile-menu li {
        line-height: 1.6rem;
    }
    
    .mobile-menu-root .mobile-make-a-gift li {
        line-height: 1;
    }

    .mobile-menu-root .primary-mobile-menu li a {
        font-size: 1.25rem;
    }

    .mobile-menu-root .secondary-mobile-menu a,
    .mobile-menu-root .mobile-cta-nav-new a,
    .mobile-menu-root .mobile-make-a-gift a,
    .mobile-menu-root .login-mobile-menu h2,
    .mobile-menu-root .login-mobile-menu a {
        font-size: 1rem;
    }
}

@media (max-height: 40em) {
    .mobile-menu-root .close-mobile-menu {
        right: 1rem;
        top: 1rem;
    }

    .mobile-menu-root .login-mobile-menu button {
        display: block;
    }

    .mobile-menu-root .login-mobile-menu .with-nav,
    .mobile-menu-root .screen-1 .login-mobile-menu ul {
        display: none;
    }

    .mobile-menu-root ::-webkit-scrollbar {
        display: unset;
    }
}

@media (max-width: 48em) {
    .mobile-menu-root {
        grid-template-columns: 1fr;
    }

    .mobile-menu-root .menu-wrap {
        padding-left: 4rem;
        width: 100vw;
    }

    .mobile-menu-root .featured-image {
        background-image: none;
        display: none;
    }

    .mobile-menu-root .menu-wrap.screen-2 {
        right: -100vw;
    }

    .mobile-menu-root.show-screen-2 .menu-wrap.screen-1 {
        right: 100vw;
    }
}
