
.omni-header-popover {
  position: fixed;
  top: calc(var(--omni-header-height) + 8px);
  right: 12px;
  z-index: 80;
  width: 280px;
  padding: 10px;
  border: 1px solid var(--omni-border);
  border-radius: 8px;
  background: var(--omni-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  transform-origin: var(--omni-popover-origin-x, calc(100% - 24px)) 0;
  will-change: opacity, transform, filter;
}

.omni-header-popover.is-open {
  display: block;
}

.omni-header-popover.is-opening {
  animation: omni-popover-open var(--omni-motion-popover-duration) var(--omni-motion-popover-ease) both;
}

.omni-profile-panel {
  width: 300px;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
}

@keyframes omni-popover-open {
  0% {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(var(--omni-motion-popover-offset-y)) scale(var(--omni-motion-popover-scale-start));
  }

  58% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(2px) scale(1.018);
  }

  82% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-1px) scale(0.997);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

/* Reduce OS-level motion without removing the required popup affordance entirely. */
@media (prefers-reduced-motion: reduce) {
  .omni-header-popover.is-opening {
    animation-duration: 120ms;
  }
}

.omni-popover-head {
  display: grid;
  gap: 2px;
  padding: 5px 6px 8px;
  border-bottom: 1px solid var(--omni-border);
}

.omni-popover-head.is-profile-head {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 14px 15px 13px;
  border-bottom: 1px solid var(--omni-border);
  background: var(--omni-active-soft);
}

.omni-popover-profile-avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--omni-border);
  border-radius: 50%;
  background: var(--omni-avatar-bg);
  color: var(--omni-avatar-text);
  font-size: 14px;
  font-weight: 900;
}

.omni-popover-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.omni-popover-profile-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.omni-popover-profile-copy strong,
.omni-popover-profile-copy small,
.omni-popover-profile-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omni-popover-profile-email {
  color: var(--omni-muted);
  font-size: 10px;
  font-weight: 500;
}

.omni-popover-head strong {
  font-size: 13px;
  font-weight: 900;
}

.omni-popover-head small {
  color: var(--omni-muted);
  font-size: 11px;
  font-weight: 700;
}

.omni-popover-setting {
  display: grid;
  grid-template-columns: minmax(64px, 0.9fr) 1.7fr;
  align-items: center;
  gap: 8px;
  padding: 9px 6px 6px;
}

.omni-profile-panel .omni-popover-setting {
  margin: 10px 12px 4px;
  padding: 8px 9px;
  border: 1px solid var(--omni-border);
  border-radius: 7px;
  background: var(--omni-surface);
}

.omni-popover-setting > span {
  color: var(--omni-muted);
  font-size: 11px;
  font-weight: 800;
}

.omni-popover-toggle {
  justify-self: end;
  display: inline-grid;
  grid-template-columns: auto 30px;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--omni-text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.omni-popover-toggle:hover {
  color: var(--omni-text);
}

.omni-popover-toggle-track {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #6b7280;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
  transition: background-color 0.14s ease;
}

.omni-popover-toggle-track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.14s ease;
}

.omni-popover-toggle.is-on {
  color: var(--omni-text);
}

.omni-popover-toggle.is-on .omni-popover-toggle-track {
  background: #0078d4;
}

.omni-popover-toggle.is-on .omni-popover-toggle-track i {
  transform: translateX(14px);
}

.omni-popover-list {
  display: grid;
  gap: 4px;
  padding-top: 7px;
}

.omni-popover-list button,
.omni-popover-list a {
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--omni-text);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.omni-popover-list button:hover,
.omni-popover-list a:hover {
  background: var(--omni-active-soft);
}

.omni-popover-list .omni-popover-danger {
  color: var(--omni-danger);
}

.omni-profile-panel .omni-popover-list {
  gap: 2px;
  padding: 6px 10px 10px;
}

.omni-profile-panel .omni-popover-list button,
.omni-profile-panel .omni-popover-list a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 12px;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  font-weight: 700;
}

.omni-popover-item-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: var(--omni-muted);
}

.omni-popover-item-icon .omni-rail-svg {
  width: 16px;
  height: 16px;
}

.omni-popover-item-chevron {
  color: var(--omni-muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.omni-profile-panel .omni-popover-danger {
  margin-top: 5px;
  padding-top: 10px;
  box-shadow: 0 -1px 0 var(--omni-border);
}

.omni-profile-panel .omni-popover-danger .omni-popover-item-icon,
.omni-profile-panel .omni-popover-danger .omni-popover-item-chevron {
  color: currentColor;
}

@media (max-width: 1180px) {
  .omni-store-badge,
  .omni-story-time {
    display: none;
  }
}

@media (max-width: 860px) {
  .omni-profile-copy,
  .omni-breadcrumb {
    display: none;
  }
}
