/**
 * Profile dropdown fixes — load after web.assets_frontend.min.css
 * (Odoo theme styles navbar .dropdown-menu with dark colors / heavy shadows)
 */

#wrapwrap #upbar-container,
#wrapwrap #top {
    position: relative;
    z-index: 1030;
}

#wrapwrap #top #main_nav > .container.upbar-desktop-row,
#wrapwrap #top #main_nav > .container.d-flex {
    overflow: visible;
}

#wrapwrap #top .upbar-nav-left {
    overflow: visible;
}

#wrapwrap #top #desktop-profile-nav {
    position: relative;
    z-index: 1055;
}

#wrapwrap #top #desktop-profile-nav .upbar-profile-toggle {
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
}

#wrapwrap #top #desktop-profile-nav .upbar-profile-toggle.show,
#wrapwrap #top #desktop-profile-nav .upbar-profile-toggle:hover,
#wrapwrap #top #desktop-profile-nav .upbar-profile-toggle:focus,
#wrapwrap #top #desktop-profile-nav .upbar-profile-toggle:active {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hx-ink, #0f172a) !important;
}

#wrapwrap #top #desktop-profile-nav .o_ripple_item {
    display: none !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .dropdown-menu.upbar-profile-menu {
    --bs-dropdown-bg: #ffffff;
    --bs-dropdown-color: #334155;
    --bs-dropdown-link-color: #334155;
    --bs-dropdown-link-hover-color: #0f172a;
    --bs-dropdown-link-hover-bg: #f1f5f9;
    --bs-dropdown-link-active-color: #51649a;
    --bs-dropdown-link-active-bg: #eef2ff;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    float: none;
    min-width: 13rem;
    max-height: none;
    margin-top: 0.35rem;
    padding: 0.35rem 0;
    background: var(--hx-surface, #ffffff) !important;
    background-color: var(--hx-surface, #ffffff) !important;
    color: var(--hx-ink-2, #334155) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: visible;
    z-index: 1056 !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .dropdown-menu.upbar-profile-menu.show {
    display: block;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item {
    color: var(--hx-ink-2, #334155) !important;
    background-color: transparent !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item:hover,
#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item:focus {
    color: var(--hx-ink, #0f172a) !important;
    background-color: var(--hx-surface-2, #f1f5f9) !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item.active {
    color: #51649a !important;
    background-color: var(--hx-primary-soft, #eef2ff) !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item.text-danger {
    color: #dc3545 !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item.text-danger:hover,
#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-item.text-danger:focus {
    color: #bb2d3b !important;
    background-color: var(--hx-danger-soft, #fff5f5) !important;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .dropdown-divider {
    border-top-color: rgba(15, 23, 42, 0.08) !important;
    opacity: 1;
}

#wrapwrap #top .navbar-light #desktop-profile-nav .upbar-profile-menu .text-muted {
    color: var(--hx-muted, #64748b) !important;
}
