/* HSG header — account dropdown hover/focus/tap.
 *
 * Root cause: Additional CSS (post 6302) sets
 * `#masthead .login-cls li.header_profile_menu{padding:0!important}` and
 * `> ul{top:100%; margin-top:10px}`. The <li> shrinks to the 30px icon
 * inside a ~74px header, and the 10px margin is not part of the <li> or
 * the <ul>, so moving the pointer down kills :hover and the menu closes.
 * Theme also disables :hover under 992px without a click handler.
 *
 * Fix: stretch the account item to the header row (so top:100% is the
 * bar's bottom and the space under the icon stays hoverable), drop the
 * 10px margin, add a ::before hover bridge, plus :focus-within / .is-open
 * (JS click/tap and a close delay live in ui-kit.js).
 */

#masthead .common-menu-wrap,
#masthead .common-menu-wrap > ul.login-cls {
  align-self: stretch !important;
}

#masthead .common-menu-wrap > ul.login-cls {
  display: flex !important;
  align-items: stretch !important;
  height: auto;
}

#masthead .login-cls li.header_profile_menu,
.login-cls li.header_profile_menu {
  align-self: stretch !important;
  position: relative;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  height: auto;
}

#masthead .login-cls li.header_profile_menu > ul.user-submenu,
.login-cls li.header_profile_menu > ul.user-submenu {
  top: 100% !important;
  margin-top: 0 !important;
  right: 0 !important;
  left: auto !important;
}

/* Invisible hover bridge above the menu (covers any leftover sliver). */
#masthead .login-cls li.header_profile_menu > ul.user-submenu::before,
.login-cls li.header_profile_menu > ul.user-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 20px;
}

#masthead .login-cls li.header_profile_menu:hover > ul.user-submenu,
#masthead .login-cls li.header_profile_menu:focus-within > ul.user-submenu,
#masthead .login-cls li.header_profile_menu.is-open > ul.user-submenu,
.login-cls li.header_profile_menu:hover > ul.user-submenu,
.login-cls li.header_profile_menu:focus-within > ul.user-submenu,
.login-cls li.header_profile_menu.is-open > ul.user-submenu {
  display: block !important;
  -webkit-animation: none;
  animation: none;
}

.docent_header_profile_photo {
  cursor: pointer;
}

.docent_header_profile_photo:focus-visible {
  outline: 2px solid var(--hsg-primary, #1a56db);
  outline-offset: 3px;
  border-radius: 999px;
}
