.user-pic {
  width: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 30px;
}

.sub-menu-wrap {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(272px, calc(100vw - 24px));
  z-index: 1050;
  visibility: hidden;
  max-height: 0px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.sub-menu-wrap.open-menu {
  max-height: calc(100vh - 104px);
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  visibility: visible;
  border-radius: 16px;
  box-shadow: 0 12px 32px #28103926;
}

.sub-menu {
  color: #332a3e;
  background: white;
  padding: 12px;
  margin: 0;
  border-radius: 16px;
}

.user-info {
  /*display: flex;*/
  align-items: center;
}

.user-info h3 {
  font-weight: bold;
}

.user-info img {
  width: 60px;
  border-radius: 50%;
  margin-right: 15px;
}

.sub-menu hr {
  border: 0;
  height: 2px;
  width: 100%;
  background: #ccc;
  margin: 15px 0 10px;
}

.sub-menu-link {
  display: flex;
  font-size: 15px !important;
  align-items: center;
  text-decoration: none;
  color: black;
  margin: 0;
  gap: 12px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.4;
}

#subMenu .sub-menu-link p {
  min-width: 0;
  margin: 0 !important;
  color: #494152 !important;
  overflow-wrap: anywhere;
}
#subMenu .sub-menu-link i { flex: 0 0 20px; text-align: center; color: #9926f0; }
#subMenu .sub-menu-link:hover, #subMenu .sub-menu-link:focus-visible { background: #f5edfc; }
#subMenu .user-info p { margin: 4px 12px 8px; font-size: 15px; overflow-wrap: anywhere; }
#subMenu .logout { border-top: 1px solid #eee7f4; border-radius: 0 0 10px 10px; margin-top: 6px; }
#subMenu .logout i, #subMenu .logout p { color: #b32639 !important; }

.sub-menu-link img {
  width: 29px;
  color: darkgrey;
  background: #e5e5e5;
  padding: 5px;
  margin-right: 14px;
}

.sub-menu-link span {
  font-size: 22px;
  transition: transform 0.5s;
}

.sub-menu-link:hover span {
  transform: translate(5px);
}

.sub-menu-link:hover p {
  font-weight: 600;
}

.sub-menu-link[hidden] {
  display: none !important;
}

/* Phones use the account screen (account-sheet.js); the old dropdown must never show there, even if a tap
   lands before that script loads. Same media query as account-sheet.js. */
@media (max-width: 767px), (hover: none) and (pointer: coarse) and (max-width: 1100px) {
  .sub-menu-wrap, .sub-menu-wrap.open-menu { display: none !important; }
}
