.omail-account-menu {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 1005;
  display: block;
  width: 44px;
  height: 44px;
  padding: 0;
  line-height: normal;
  background: transparent;
  border-radius: 50%;
}

body .omail-account-menu {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  line-height: normal !important;
  background: transparent !important;
}

html.layout-small .omail-account-menu,
html.layout-normal .omail-account-menu,
html.layout-large .omail-account-menu {
  display: block !important;
}

.omail-account-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 4px;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    transform 160ms cubic-bezier(0.2, 0, 0, 1);
}

.omail-account-button:hover,
.omail-account-button:focus-visible,
.omail-account-button[aria-expanded="true"] {
  background: rgba(60, 64, 67, 0.12);
}

.omail-account-button:active {
  transform: scale(0.94);
}

.omail-account-button:focus-visible {
  outline: 2px solid #0b57d0;
  outline-offset: 2px;
}

.omail-account-button .omail-profile-avatar,
.omail-account-avatar {
  display: block;
  flex: 0 0 auto;
  background-color: #e8eaed;
  background-image: var(--omail-profile-image, url("../images/stranger.jpeg"));
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: cover;
  border-radius: 50%;
}

.omail-account-button .omail-profile-avatar {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 2px rgba(95, 99, 104, 0.48);
}

.omail-account-popover {
  position: fixed;
  top: 60px;
  right: 12px;
  z-index: 1100;
  width: min(412px, calc(100vw - 24px));
  max-height: calc(100dvh - 76px);
  overflow: hidden auto;
  color: #e8eaed;
  background: #2d2e30;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
}

.omail-account-popover[hidden] {
  display: none;
}

.omail-account-popover.is-opening,
.omail-account-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.omail-account-popover.is-opening {
  animation: omail-account-open 180ms cubic-bezier(0.2, 0, 0, 1) both;
}

.omail-account-popover.is-closing {
  animation: omail-account-close 130ms cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes omail-account-open {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@keyframes omail-account-close {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}

.omail-account-current {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 18px 24px 20px;
  text-align: center;
}

.omail-account-email {
  max-width: calc(100% - 56px);
  overflow: hidden;
  color: #f1f3f4;
  font-size: 14px;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omail-account-close {
  position: absolute;
  top: 13px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #bdc1c6;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.omail-account-close:hover,
.omail-account-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.omail-account-current .omail-account-avatar {
  width: 84px;
  height: 84px;
  margin-top: 14px;
  border: 3px solid #fbbc04;
  box-shadow: 0 0 0 2px #0b57d0;
}

.omail-account-greeting {
  margin-top: 12px;
  color: #f1f3f4;
  font-size: 22px;
  font-weight: 400;
  line-height: 30px;
}

.omail-manage-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 22px;
  color: #a8c7fa;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #8e918f;
  border-radius: 20px;
  transition:
    color 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease;
}

.omail-manage-account:hover,
.omail-manage-account:focus-visible {
  color: #d3e3fd;
  text-decoration: none;
  background: rgba(168, 199, 250, 0.1);
  border-color: #a8c7fa;
}

.omail-account-section {
  margin: 0 16px;
  overflow: hidden;
  background: #1f1f1f;
  border-radius: 16px;
}

.omail-account-expand,
.omail-account-row,
.omail-account-command {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 9px 16px;
  color: #e8eaed;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.omail-account-expand:hover,
.omail-account-expand:focus-visible,
.omail-account-row:hover,
.omail-account-row:focus-visible,
.omail-account-command:hover,
.omail-account-command:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.omail-account-expand {
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}

.omail-account-stack {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.omail-account-stack .omail-account-avatar {
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border: 2px solid #1f1f1f;
}

.omail-account-stack-count {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  color: #1f1f1f;
  font-size: 11px;
  font-weight: 600;
  place-items: center;
  background: #d3e3fd;
  border: 2px solid #1f1f1f;
  border-radius: 50%;
}

.omail-account-chevron {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  color: #bdc1c6;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.omail-account-expand[aria-expanded="true"] .omail-account-chevron {
  transform: rotate(180deg);
}

.omail-account-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 240ms cubic-bezier(0.2, 0, 0, 1),
    opacity 140ms ease;
}

.omail-account-list.is-expanded {
  max-height: 460px;
  overflow-y: auto;
  opacity: 1;
}

.omail-account-row {
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.omail-account-row .omail-account-avatar {
  width: 38px;
  height: 38px;
}

.omail-account-copy {
  min-width: 0;
}

.omail-account-name,
.omail-account-row-email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omail-account-name {
  color: #f1f3f4;
  font-size: 14px;
  font-weight: 500;
}

.omail-account-row-email {
  margin-top: 2px;
  color: #bdc1c6;
  font-size: 12px;
}

.omail-account-current-mark {
  margin-left: auto;
  color: #a8c7fa;
  font-size: 12px;
}

.omail-account-actions {
  margin-top: 12px;
  margin-bottom: 16px;
  border-radius: 16px;
}

.omail-account-command {
  gap: 14px;
  min-height: 54px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.omail-account-command:last-child {
  border-bottom: 0;
}

.omail-account-command::before {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: #a8c7fa;
  font-size: 20px;
  place-items: center;
  background: rgba(168, 199, 250, 0.1);
  border-radius: 50%;
}

.omail-account-command.add::before {
  content: "+";
}

.omail-account-command.signout::before {
  content: "\2192";
}

.omail-account-storage {
  margin: 12px 16px 16px;
  padding: 14px 16px;
  background: #1f1f1f;
  border-radius: 16px;
}

.omail-account-storage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #e8eaed;
  font-size: 13px;
}

.omail-account-storage-value {
  color: #bdc1c6;
  white-space: nowrap;
}

.omail-account-storage-track {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  background: #4a4c4f;
  border-radius: 2px;
}

.omail-account-storage-fill {
  display: block;
  width: 0;
  height: 100%;
  background: #a8c7fa;
  border-radius: inherit;
}

.omail-account-switching {
  pointer-events: none;
  opacity: 0.58;
}

@media (max-width: 600px) {
  .omail-account-menu {
    top: 10px;
    right: 8px;
  }

  .omail-account-popover {
    top: 62px;
    right: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 70px);
    border-radius: 20px;
  }

  .omail-account-current {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .omail-account-button,
  .omail-account-popover,
  .omail-account-list,
  .omail-account-chevron {
    animation: none !important;
    transition: none !important;
  }
}
