/* AOW V11.13: dock the V11.12 game-style navigation to the RIGHT.
   Override the V11.12 `position:relative` that was causing left alignment.
   Retain the pre-existing overlay / backdrop and slide animation. */
body.aow-masters-theme .portal-menu .portal-menu-panel {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  transform: translate3d(105%, 0, 0) !important;
  transform-origin: right center;
  border-right: 0 !important;
  border-left: 1px solid #5f989a !important;
  transition: transform .26s ease !important;
}
body.aow-masters-theme .portal-menu.open .portal-menu-panel {
  transform: translate3d(0, 0, 0) !important;
}

/* Account title gets a dedicated full-width row above TWO equally sized
   actions. Fixes the V11.12 auto-margin/padding from older menu CSS that
   had placed the title beside Connected Accounts and Logout below it. */
body.aow-masters-theme .portal-menu .portal-menu-account-shell {
  margin-top: auto !important;
  min-width: 0;
}
body.aow-masters-theme .portal-menu .portal-menu-account {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.aow-masters-theme .portal-menu .portal-menu-account-label {
  display: block;
  grid-column: 1 / -1 !important;
  min-width: 0;
  width: 100%;
  margin: 0 0 2px !important;
  align-self: end;
  text-align: left;
}
body.aow-masters-theme .portal-menu .portal-menu-account .menu-account-btn {
  min-width: 0;
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 10px 7px !important;
  font-size: clamp(16px, 3.3vw, 17px) !important;
  line-height: 1.12 !important;
}
body.aow-masters-theme .portal-menu .portal-menu-account .discord-login-btn {
  grid-column: 1 / -1 !important;
}
@media (max-width: 380px), (max-height: 700px) {
  body.aow-masters-theme .portal-menu .portal-menu-account {
    gap: 6px !important;
  }
  body.aow-masters-theme .portal-menu .portal-menu-account .menu-account-btn {
    min-height: 44px !important;
    font-size: 16px !important;
    padding: 7px 5px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.aow-masters-theme .portal-menu .portal-menu-panel {
    transition: none !important;
  }
}
