@import "../icon-button/IconButton.css"; /* — the one popover every header menu (links, user, settings, alerts) opens. Right-anchored: each trigger sits at the end of a header's icon cluster, so a left anchor would push it off-screen. */ .header-menu { position: relative; display: inline-block; } .header-menu-popover { position: absolute; top: calc(100% + 0.4em); right: 0; z-index: var(--z-popover); display: flex; flex-direction: column; min-width: 12em; padding: 0.4em; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elev); box-shadow: var(--shadow-pop); animation: header-menu-enter 140ms ease; } /* A long list, such as the firing alerts: wide, and it scrolls. */ .header-menu-wide { gap: 0.4em; width: min(26em, calc(100vw - 2em)); max-height: 70vh; overflow-y: auto; } /* Mount-triggered, not a state transition: the popover only exists in the DOM while open, so a keyframe on entry is the right tool. */ @keyframes header-menu-enter { from { opacity: 0; transform: translateY(-0.25em) scale(0.98); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: reduce) { .header-menu-popover { animation: none; } } :root[data-motion="reduce"] .header-menu-popover { animation: none; } :root[data-motion="allow"] .header-menu-popover { animation: header-menu-enter 140ms ease; } /* A row that is a link or a button. */ .header-menu-item { display: flex; align-items: center; gap: 0.5em; min-height: 2.75em; padding: 0.4em 0.6em; border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; white-space: nowrap; } .header-menu-item:hover { background: var(--bg); }