/* CANOPY NAVIGATION HIERARCHY + ACCOUNT IDENTITY V20.3.36 */

/*
 * Match the exact Field active treatment at every navigation tier.
 *
 * Field already marks a group toggle .cf-active when one of its submenu
 * routes is current. Older CSS only painted .cf-nav-item.cf-active, which
 * is why "My listings" could look selected while "Sell" did not.
 *
 * V20.3.36 paints:
 *   - directly selected top-level links
 *   - parent group toggles whose child is selected
 *   - selected submenu links
 *   - recursively marked parent controls for future deeper menu tiers
 */
html.canopy-field .cf-sidebar .cf-nav-item[aria-current="page"],
html.canopy-field .cf-sidebar .cf-nav-item.cf-active,
html.canopy-field .cf-sidebar .cf-nav-group-toggle.cf-active,
html.canopy-field .cf-sidebar .cf-nav-group-toggle[data-canopy-route-branch-active="true"],
html.canopy-field .cf-sidebar .cf-nav-submenu a[aria-current="page"],
html.canopy-field .cf-sidebar .cf-nav-submenu a.cf-active,
html.canopy-field .cf-sidebar .cf-nav-submenu a[data-canopy-route-branch-active="true"] {
    color: #fff !important;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.16),
            rgba(255,255,255,.09)
        ) !important;
    border-radius: 10px !important;
    box-shadow:
        inset 3px 0
        var(--cf-leaf-500, #58d17b) !important;
    font-weight: 750 !important;
}

/*
 * Keep active icons/labels fully legible at every level without changing
 * the geometry, spacing, or open/close behavior of the Field sidebar.
 */
html.canopy-field .cf-sidebar
:is(
    .cf-nav-item[aria-current="page"],
    .cf-nav-item.cf-active,
    .cf-nav-group-toggle.cf-active,
    .cf-nav-group-toggle[data-canopy-route-branch-active="true"]
)
.cf-nav-icon {
    opacity: 1 !important;
}

/*
 * Account identity is intentionally only a display correction. The existing
 * account dock dimensions and V20.3.10 personal-account popover remain intact.
 */
html.canopy-field .cf-account-dock .cf-account-name,
html.canopy-field .cf-account-dock .cf-account-role {
    min-width: 0;
}