.aw-mobile-menu {
    @apply bg-page-bg;
    width: 100%;

    display: flex;
    flex-direction: column;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;

    overflow-y: auto;
    overscroll-behavior: none;

    opacity: 0;
    visibility: hidden;
    transition: 180ms opacity, 0ms visibility 180ms;
    will-change: opacity;

    & > * {
        flex-shrink: 0;
    }

    &__header {
        @apply bg-page-bg;
        display: flex;
        align-items: center;

        padding: var(--header-padding);

        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1;
    }

    &__submenu-title {
        margin: 1rem 0 1.5rem;
        padding: 0 1.5rem;
    }

    &__user {
        @apply bg-surface;

        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;

        position: relative;
        border-top-right-radius: 1.25rem;
        border-top-left-radius: 1.25rem;

        &:after {
             @apply bg-mono-800;
             content: '';
             display: block;
             height: 1px;

             position: absolute;
             bottom: 0;
             left: 1.5rem;
             right: 1.5rem;
         }

        .aw-avatar {
            --ui-avatar-size: 2.5rem !important;
            --ui-avatar-font-size: 0.875rem !important;
            font-weight: 900;
        }

        &-name {
            margin-top: 0;
            font-size: 1rem;
            line-height: 1.5rem;
            font-weight: 400;
        }

        &-desc {
            font-size: 0.875rem;
            line-height: 1rem;
        }

        &-link {
            color: inherit;
            grid-column: 3;
            grid-row: 1 / -1;
            align-self: center;
            padding-left: 0.5rem;

            &:hover {
                text-decoration: none;
                color: inherit;
            }

            &:after {
                content: '';
                display: block;
                position: absolute;
                inset: 0;
            }
        }
    }

    &__theme {
        @apply bg-surface;

        display: flex;
        align-items: center;
        position: relative;

        padding: 0.8125rem 1.5rem;

        &-icon {
            color: var(--c-mono-300);
            margin-right: 1rem;
        }

        &-text {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.3125rem;
        }

        &-switcher {
            margin-left: auto;
            padding-top: 0;
            padding-bottom: 0;

            .aw-switch-field__switch {
                margin: 0.1875rem;
            }
        }
    }

    &__logo {
        display: block;
        align-self: center;
        padding: theme('spacing.1', 0.25rem) theme('spacing.4', 1rem);
        margin-top: auto;

        > img {
            min-height: 2rem;
            max-width: 2rem;
            margin: auto;
        }

        &.project-logo {
             width: auto;
        }
    }

    &__version {
        display: block;
        font-size: theme('fontSize.xs', 0.75rem);
        text-align: center;
        padding: 0 1rem 0.75rem;
        padding-bottom: calc(env(safe-area-inset-bottom, 0) + 0.5rem);
    }

    &__close {
        margin-left: auto;
    }

    &__widgets {
        padding: theme('spacing.4');
    }

    &__menu {
        margin-bottom: 1.5rem;
    }

    &--root &__menu h3 {
        @apply sr-only;
    }

    &--scrolled &__header {
        box-shadow: 0px 2px 2px rgba(var(--c-mono-100-rgb, 50, 50, 50), 0.1);
    }

    /**
     * Open transition
     */
    &--visible {
        opacity: 1;
        visibility: visible;
        transition: 60ms opacity ease-out, 0ms visibility;
    }

    &__back.aw-button,
    &__close.aw-button {
         display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.625rem;

        .aw-button__overlay {
            border-radius: 0.625rem;
        }
    }
}
