/* Shared customer profile menu and mobile dashboard navigation. */
.site-header .user-account-dropdown[hidden] {
    display: none !important;
}

.site-header .user-account-dropdown {
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-header .user-account-toggle:focus-visible,
.site-header .user-account-dropdown a:focus-visible {
    outline: 2px solid #5275fa;
    outline-offset: 3px;
}

@media (max-width: 820px) {
    .site-header .header-main {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow: visible;
    }

    .site-header .header-main > .mobile-menu-toggle {
        order: 0;
        flex: 0 0 42px;
    }

    .site-header .header-main > .brand {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
        gap: 8px;
    }

    .site-header .brand-mark {
        flex-shrink: 0;
    }

    .site-header .brand-copy {
        min-width: 0;
    }

    .site-header .header-actions {
        order: 2;
        flex: 0 0 auto;
        margin: 0;
        gap: 0;
    }

    .site-header .header-actions > .user-account-menu {
        display: block !important;
        position: relative;
    }

    .site-header .user-account-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 3px;
        border: 1px solid #dce4ff;
        border-radius: 50%;
        background: #f3f6ff;
    }

    .site-header .user-account-toggle .avatar {
        display: grid;
        place-items: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        margin: 0;
        border-radius: 50%;
    }

    .site-header .user-account-toggle .account-link-copy,
    .site-header .user-account-toggle .account-chevron {
        display: none !important;
    }

    .site-header .user-account-dropdown {
        top: calc(100% + 12px);
        right: 0;
        left: auto;
        box-sizing: border-box;
        width: min(320px, calc(100vw - 40px));
        max-height: calc(100vh - 110px);
        max-height: calc(100dvh - 110px);
        padding: 8px;
        border: 1px solid #e0e7ff;
        border-radius: 16px;
        box-shadow: 0 16px 40px rgb(32 56 110 / 18%);
    }

    .site-header .user-account-card strong,
    .site-header .user-account-card small {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .site-header .user-account-dropdown > a {
        min-height: 48px;
    }

    .site-header .user-account-dropdown > a strong {
        font-size: 13px;
    }

    .site-header .user-account-dropdown > a small {
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    .user-dashboard-page .dashboard-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .user-dashboard-page .dashboard-sidebar {
        display: none !important;
    }

    .user-dashboard-page .dashboard-main {
        min-width: 0;
        width: 100%;
    }
}
