/* Presence and Share in the header (docs/CONSOLE-REDESIGN.md §3.2, §8 step 12; presence.js, views.js). On the frame:
   frame tokens only. The faces overlap a little, each ringed in the frame's own colour; a name shows on hover and on
   keyboard focus; past four, "+n" opens the list. On a phone (≤ 780 px) the faces fold into one count that opens the
   same list, and Share keeps its icon. Loaded after frame.css. */

.topbar .faces { position: relative; display: flex; align-items: center; gap: 8px; flex: none; height: 30px; }
.pr-faces { display: flex; align-items: center; padding-left: 4px; }
.pr-face, .pr-more { position: relative; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  margin-left: -4px; padding: 0; border: 0; box-shadow: 0 0 0 2px var(--chrome-bg);
  background: var(--chrome-active); color: var(--chrome-fg); font: 700 9.5px/1 var(--sans); letter-spacing: .02em; cursor: default; }
.pr-more { font-variant-numeric: tabular-nums; cursor: pointer; }
.pr-more:hover, .pr-more[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--chrome-bg), 0 0 0 3px var(--chrome-fg-2); }
.pr-face:focus-visible, .pr-more:focus-visible { z-index: var(--z-raise); }
/* the name: on hover and on focus, under the face, kept inside the header's right edge */
.pr-faces [data-name]::after { content: attr(data-name); position: absolute; top: calc(100% + 8px); right: -6px; z-index: var(--z-tooltip); pointer-events: none;
  max-width: 220px; width: max-content; padding: 5px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-1); font: 500 12px/1.2 var(--sans); letter-spacing: 0;
  opacity: 0; visibility: hidden; transition: opacity .1s; }
.pr-faces [data-name]:hover::after, .pr-faces [data-name]:focus-visible::after { opacity: 1; visibility: visible; }
.pr-more[aria-expanded="true"]::after { display: none; }
.pr-word { font-size: 12.5px; color: var(--chrome-fg-2); white-space: nowrap; }
.pr-count { display: none; height: 30px; align-items: center; gap: 4px; padding: 0 8px; border: 0; border-radius: 6px; background: none;
  color: var(--chrome-fg-2); font: 600 12.5px/1 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.pr-count svg { width: 16px; height: 16px; flex: none; }
.pr-count:hover, .pr-count[aria-expanded="true"] { background: var(--chrome-hover); color: var(--chrome-fg); }
/* the list: "+n" or the phone's count opens it */
.pr-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-popover); min-width: 180px; max-width: min(280px, calc(100vw - 24px));
  padding: 6px; border-radius: 8px; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.pr-list[hidden] { display: none; }
.pr-h { padding: 4px 6px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.pr-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; min-width: 0; }
.pr-row .pr-face { margin: 0; box-shadow: none; background: var(--chrome-active); color: var(--chrome-fg); }
.pr-n { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Share on a view (views.js): in the header; in the icon-rail state, where the header is folded away, on the view's bar */
.hbtn.hd-share-on { color: var(--chrome-fg); }
.hbtn[disabled] { opacity: .55; cursor: default; }
.hbtn[disabled]:hover { background: none; color: var(--chrome-fg-2); }
.vw-acts .vw-share-alt { display: none; }
body.chrome-compact .vw-acts .vw-share-alt { display: inline-flex; }

@media (max-width: 780px) {
  .pr-faces, .pr-word { display: none; }
  .pr-count { display: inline-flex; }
  .topbar .faces { gap: 0; }
  #hdShare .hbtn { width: 36px; padding: 0; justify-content: center; }
  #hdShare .hbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ⋯ › Copy link (CONSOLE-REDESIGN §3.2): on every page but a view, which has Share */
.hbtn.hd-more { width: 32px; padding: 0; justify-content: center; }
.hbtn.hd-more[aria-expanded="true"] { background: var(--chrome-hover); color: var(--chrome-fg); }
.hd-menu { position: fixed; z-index: var(--z-menu); width: 200px; }
