/**
 * Veeble top bar + Account profile dropdown.
 * Palette: #000000 / #324FF5 / #555555 / #FFFFFF
 * Mock: 56px (h-14) rows, pl-8/pr-4, 28px (size-7) icon chips, soft-blue hover rgba(50,79,245,.10).
 */

/* ----- Top bar icon row ----- */

body.lagom .top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.lagom .top-nav > li > a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 36px;
    min-height: 36px;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #111111 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.lagom .top-nav > li > a:hover,
body.lagom .top-nav > li > a:focus,
body.lagom .top-nav > li.open > a,
body.lagom .top-nav > li.show > a {
    background: rgba(50, 79, 245, 0.06) !important;
    color: #324ff5 !important;
}

body.lagom .top-nav > li > a > i,
body.lagom .top-nav > li > a > .lm,
body.lagom .top-nav > li > a > .ls:not(.ls-caret) {
    color: #111111 !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

body.lagom .top-nav > li > a > img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    filter: brightness(0);
}

body.lagom .top-nav > li > a:hover > i,
body.lagom .top-nav > li > a:hover > .lm,
body.lagom .top-nav > li.open > a > i,
body.lagom .top-nav > li > a:hover > img,
body.lagom .top-nav > li.open > a > img,
body.lagom .top-nav > li.show > a > img {
    color: #324ff5 !important;
    filter: invert(32%) sepia(98%) saturate(2876%) hue-rotate(222deg) brightness(97%) contrast(96%);
}

/* Profile / topbar dropdown caret — hide (icon-only, like earlier) */
body.lagom .top-nav > li > a > .ls-caret,
body.lagom .top-nav > li.my-account > a > .ls-caret,
body.lagom .top-nav > li#Secondary_Navbar-Account > a > .ls-caret,
body.lagom .top-nav > li > a > .ls-caret:before {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    content: none !important;
}

/* Notification blue dot */
body.lagom .top-nav .notification-icon-container {
    position: relative;
}

/*
 * Notifications dropdown — pin to the right edge of the bell.
 * Account already gets .dropdown-menu-right; Notifications did not, so it
 * opened left-aligned and half the panel went off-screen on desktop.
 */
body.lagom .top-nav > li .dropdown-menu.client-alerts,
body.lagom .top-nav > li.open > .dropdown-menu.client-alerts,
body.lagom .top-nav > li.show > .dropdown-menu.client-alerts,
body.lagom .app-nav-header .top-nav > li .dropdown-menu.client-alerts,
body.lagom .main-top .top-nav > li .dropdown-menu.client-alerts {
    right: 0 !important;
    left: auto !important;
    min-width: 320px !important;
    width: min(380px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    margin-top: 8px !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1), 0 2px 6px rgba(16, 24, 40, 0.04) !important;
    overflow: hidden;
}

body.lagom .top-nav .dropdown-menu.client-alerts .client-alerts-header,
body.lagom .top-nav .dropdown-menu.client-alerts > .client-alerts-header {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #101828 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

body.lagom .top-nav .dropdown-menu.client-alerts > li > a,
body.lagom .top-nav .dropdown-menu.client-alerts a {
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.45 !important;
}

body.lagom .top-nav .nav-badge.badge-dot,
body.lagom .top-nav .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    padding: 0 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: #324ff5 !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden;
}

body.lagom .top-nav .nav-badge.badge-dot > span,
body.lagom .top-nav .badge-dot > span {
    display: none !important;
}

body.lagom .top-nav .nav-badge:not(.badge-dot) {
    background: transparent !important;
    color: #324ff5 !important;
    box-shadow: none !important;
}

/* =====================================================================
   Account profile dropdown — Figma mock
   ===================================================================== */

body.lagom .top-nav > li.my-account > .dropdown-menu,
body.lagom .top-nav > li#Secondary_Navbar-Account > .dropdown-menu,
body.lagom .app-nav-header .top-nav > li.dropdown.my-account > .dropdown-menu,
body.lagom .main-top .top-nav > li.dropdown.my-account > .dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 280px !important;
    width: 280px;
    max-width: calc(100vw - 24px);
    margin-top: 8px !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1), 0 2px 6px rgba(16, 24, 40, 0.04) !important;
    overflow: hidden;
}

/* Name header — 56px (h-14), 18px #000, bottom border */
body.lagom .top-nav > li.my-account .dropdown-header--account,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-header--account {
    display: flex !important;
    align-items: center;
    align-self: stretch;
    box-sizing: border-box;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 10px 16px 10px 32px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: transparent !important;
    white-space: normal;
}

body.lagom .top-nav > li.my-account .dropdown-header--account .dropdown-header-title,
body.lagom .top-nav > li.my-account .dropdown-header--account .dropdown-header-info,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-header--account .dropdown-header-title,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-header--account .dropdown-header-info {
    color: #000000 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 27px !important;
}

body.lagom .top-nav > li.my-account .dropdown-header--account .dropdown-header-desc,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-header--account .dropdown-header-desc {
    display: none !important;
}

body.lagom .top-nav > li.my-account .dropdown-header--account .client-avatar {
    display: none !important;
}

/* Section dividers — 1px rgba(0,0,0,.10) */
body.lagom .top-nav > li.my-account .dropdown-menu > .nav-divider,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > .nav-divider,
body.lagom .top-nav > li.my-account .dropdown-menu > li.nav-divider {
    display: block !important;
    align-self: stretch;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden;
}

/* Menu rows — 56px (h-14), pad 10/16/10/32 (pl-8 pr-4), gap 8, text #555555 */
body.lagom .top-nav > li.my-account .dropdown-menu > li > a,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a,
body.lagom .app-nav-header .top-nav > li.dropdown.my-account .dropdown-menu > li > a,
body.lagom .main-top .top-nav > li.dropdown.my-account .dropdown-menu > li > a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    align-self: stretch;
    box-sizing: border-box;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 10px 16px 10px 32px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #555555 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    white-space: nowrap;
    /* Row stays put so soft blue bg never slides / leaves a white gap */
    transform: none !important;
    transition-property: color, background-color, filter !important;
    transition-duration: 0.15s !important;
    transition-timing-function: ease !important;
}

/* Slide icon + label only (bg stays full-width on the <a>) */
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > i,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .ls,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .lm,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .fa,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > img,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .menu-item-content,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > span,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > i,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > .ls,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > .lm,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > .menu-item-content,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > span {
    transform: translateX(0);
    transition: transform 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a .menu-item-content,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a .menu-item-content {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Icon chips — 28×28 (size-7), radius 8; idle = no chip bg */
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > i,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .ls,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .lm,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a > .fa,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > i,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > .ls,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > .lm {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    margin: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #555555 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a > i:before,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > i:before {
    color: inherit !important;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a > img {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    margin-right: 0 !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    background: transparent !important;
    object-fit: contain !important;
    filter: brightness(0) invert(33%);
}

/* Hover — soft blue strip (same as sidebar dropdown); only children slide */
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:focus,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:focus,
body.lagom .app-nav-header .top-nav > li.dropdown.my-account .dropdown-menu > li > a:hover,
body.lagom .main-top .top-nav > li.dropdown.my-account .dropdown-menu > li > a:hover {
    background: rgba(50, 79, 245, 0.05) !important;
    background-color: rgba(50, 79, 245, 0.05) !important;
    color: #324FF5 !important;
    border-radius: 0 !important;
    transform: none !important;
    padding: 10px 16px 10px 32px !important;
}

/* Selected — same soft strip */
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a:hover,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a:hover {
    background: rgba(50, 79, 245, 0.05) !important;
    background-color: rgba(50, 79, 245, 0.05) !important;
    color: #324FF5 !important;
    border-radius: 0 !important;
    transform: none !important;
    padding: 10px 16px 10px 32px !important;
}

/* Hover/active — soft blue row; grey icon chip + blue glyph; content slides */
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > i,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > .ls,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > .lm,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > .fa,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > i,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > .ls,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > .lm,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > .fa,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > i,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > .ls,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > .lm,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > i,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > .ls,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > .lm {
    background: rgba(85, 85, 85, 0.10) !important;
    color: #324FF5 !important;
    transform: translateX(12px) !important;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > img,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > img {
    background: rgba(85, 85, 85, 0.10) !important;
    transform: translateX(12px) !important;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > .menu-item-content,
body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > span,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > .menu-item-content,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > span,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > .menu-item-content,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > span,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > .menu-item-content,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > span {
    background: transparent !important;
    color: #324FF5 !important;
    transform: translateX(12px) !important;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > i:before,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > i:before,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > i:before,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > i:before {
    color: #324FF5 !important;
}

body.lagom .top-nav > li.my-account .dropdown-menu > li > a:hover > img,
body.lagom .top-nav > li.my-account .dropdown-menu > li.active > a > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li > a:hover > img,
body.lagom .top-nav > li#Secondary_Navbar-Account .dropdown-menu > li.active > a > img {
    margin: 0 !important;
    margin-right: 0 !important;
    filter: invert(32%) sepia(98%) saturate(2876%) hue-rotate(222deg) brightness(97%) contrast(96%) !important;
}

/* Page-class active fallbacks */
body.lagom.page-account-contacts-manage .top-nav #Secondary_Navbar-Account-Contacts > a,
body.lagom.page-account-contacts-new .top-nav #Secondary_Navbar-Account-Contacts > a,
body.lagom.page-clientareadetails .top-nav #Secondary_Navbar-Account-Account_Details > a,
body.lagom.page-account-user-management .top-nav #Secondary_Navbar-Account-User_Management > a,
body.lagom.page-clientareasecurity .top-nav #Secondary_Navbar-Account-Account_Security > a,
body.lagom.page-clientareaemails .top-nav #Secondary_Navbar-Account-Email_History > a,
body.lagom.page-user-profile .top-nav #Secondary_Navbar-Account-Your_Profile > a,
body.lagom.page-user-switch-account .top-nav #Secondary_Navbar-Account-Switch_Account > a,
body.lagom.page-user-password .top-nav #Secondary_Navbar-Account-Change_Password > a,
body.lagom.page-user-security .top-nav #Secondary_Navbar-Account-Security_Settings > a {
    background: rgba(50, 79, 245, 0.05) !important;
    color: #324FF5 !important;
    border-radius: 0 !important;
}

body.lagom.page-account-contacts-manage .top-nav #Secondary_Navbar-Account-Contacts > a > i,
body.lagom.page-account-contacts-new .top-nav #Secondary_Navbar-Account-Contacts > a > i,
body.lagom.page-clientareadetails .top-nav #Secondary_Navbar-Account-Account_Details > a > i,
body.lagom.page-account-user-management .top-nav #Secondary_Navbar-Account-User_Management > a > i,
body.lagom.page-clientareasecurity .top-nav #Secondary_Navbar-Account-Account_Security > a > i,
body.lagom.page-clientareaemails .top-nav #Secondary_Navbar-Account-Email_History > a > i,
body.lagom.page-user-profile .top-nav #Secondary_Navbar-Account-Your_Profile > a > i,
body.lagom.page-user-switch-account .top-nav #Secondary_Navbar-Account-Switch_Account > a > i,
body.lagom.page-user-password .top-nav #Secondary_Navbar-Account-Change_Password > a > i,
body.lagom.page-user-security .top-nav #Secondary_Navbar-Account-Security_Settings > a > i {
    background: rgba(85, 85, 85, 0.10) !important;
    color: #324FF5 !important;
}
