/* MoPower Account Dropdown Hotfix v1.0.0-rc1
 * Scoped to the active mopowerlab v3 header. Bootstrap's existing dropdown
 * plugin remains the sole behavior owner for toggle, outside-click, Escape,
 * focus, and aria-expanded state.
 */

.mopowerlab-theme.mpl-v3 .mpl-account-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.mopowerlab-theme.mpl-v3 .mpl-account-menu > .mpl-account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #e5eaf0;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.mopowerlab-theme.mpl-v3 .mpl-account-menu > .mpl-account-trigger:hover,
.mopowerlab-theme.mpl-v3 .mpl-account-menu.open > .mpl-account-trigger {
  background: #1c2630;
  border-color: #354553;
  color: #fff;
}

.mopowerlab-theme.mpl-v3 .mpl-account-menu > .mpl-account-trigger:focus {
  outline: 3px solid #2196f3;
  outline-offset: 2px;
}

.mopowerlab-theme.mpl-v3 .mpl-account-menu > .dropdown-menu {
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: 200px;
  min-width: 0;
  max-width: calc(100vw - 24px);
  margin: 0;
  z-index: 1100;
}

.mopowerlab-theme.mpl-v3 .mpl-account-menu > .dropdown-menu a:focus {
  background: rgba(33, 150, 243, .18);
  color: #fff;
  outline: 2px solid #2196f3;
  outline-offset: -2px;
}

/* Keep the accessibility shortcut off-canvas until it receives keyboard focus. */
.mopowerlab-theme.mpl-v3 > .v3-skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  transform: translateY(calc(-100% - 12px));
}

.mopowerlab-theme.mpl-v3 > .v3-skip-link:focus {
  top: 8px;
  transform: translateY(0);
  outline: 3px solid #2196f3;
  outline-offset: 2px;
}

@media (max-width: 380px) {
  /* The actions are centered on the second header row at these widths. */
  .mopowerlab-theme.mpl-v3 .mpl-account-menu > .dropdown-menu {
    right: auto;
    left: 0;
  }
}

