.aw-user-menu {
    @apply text-center;
    position: relative;
    font-size: theme('fontSize.sm', 0.875rem);

    .aw-dropdown {
        @apply text-left;
    }

    &__user {
        cursor: pointer;

        &--outline {
            display: flex;
            align-items: center;
            gap: 0.25rem;

            padding: 0.75rem;
            border-radius: 0.625rem;
            box-shadow: 0 0 0 2px var(--c-mono-800) inset;

            &:hover {
                @apply bg-mono-800;
            }
        }
    }

    &__header {
        display: block;
        color: inherit;
        padding: 0.75rem 1rem;
        border-bottom-width: 1px;

        .aw-userpic {
            &__name {
                font-size: 1rem;
                line-height: 1.5rem;
            }

            &__content {
                margin-left: 0;
            }

            .aw-avatar {
                --ui-avatar-size: 40px !important;
                margin-right: 1rem;
            }
        }

        &--hoverable:hover,
        &--hoverable:focus-visible {
            background-color: var(--c-mono-900);
        }
    }

    &__theme {
        display: flex;
        align-items: center;

        padding: 0.5rem 1rem;
        color: var(--c-on-surface);

        &-icon {
            color: var(--c-mono-400);
        }

        &-text {
            font-size: 0.875rem;
            line-height: 1.5rem;
            font-weight: 400;
        }

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

            .aw-switch-field {
                &__switch {
                    margin-top: 0;
                    margin-bottom: 0;
                }
            }
        }
    }

    &__menu {
        background-color: var(--c-surface);
        color: var(--c-on-surface);
        min-width: 250px;
        max-height: auto;

        &.aw-dropdown--desktop {
            max-width: 17.625rem;
            min-width: 17.625rem;
        }
    }

    &__nav-item {
        @apply bg-surface;
        padding: 0.5rem 1rem;
        display: flex;
        align-items: center;
        width: 100%;

        font-size: 0.875rem;
        line-height: 1.5rem;
        font-weight: 400;

        white-space: nowrap;

        svg {
            width: 1rem;
            height: 1rem;
            flex: none;
        }

        &:focus {
            outline: none;
        }

        &:hover,
        &:focus-visible,
        &--active {
            background-color: var(--c-mono-900);
        }

        &--icon-mono svg {
            color: var(--c-mono-400);
        }

        &-text {
            text-overflow: ellipsis;
            overflow: hidden;
        }
    }
}

@screen lg {
    .aw-user-menu {
        &__user {
            &--outline {
                padding-top: 0.5rem;
                padding-bottom: 0.5rem;
            }
        }
    }
}
