.ws-mention-popup {
  position: fixed;
  z-index: 1400;
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
  max-height: min(300px, calc(100dvh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9e2f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(24, 43, 78, .2);
  color: var(--ink, #17243d);
  scrollbar-width: thin;
  scrollbar-color: #c4cee0 transparent;
}
.ws-mention-list { display: grid; gap: 2px; padding: 5px; }
.ws-mention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.ws-mention-option:hover, .ws-mention-option.is-active { background: #eef3ff; }
.ws-mention-option:focus-visible { outline: 2px solid #6f92ee; outline-offset: -2px; }
.ws-mention-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #315edf;
  background: #eaf0ff;
  font-size: 14px;
  font-weight: 750;
}
.ws-mention-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ws-mention-person { display: grid; flex: 1; gap: 2px; min-width: 0; }
.ws-mention-person strong { overflow: hidden; color: #24334f; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.ws-mention-person small { overflow: hidden; color: #8793a8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ws-mention-option > svg { flex: 0 0 auto; color: #315edf; opacity: 0; }
.ws-mention-option[aria-selected="true"] > svg { opacity: 1; }
.ws-mention-empty { padding: 20px 14px; color: #77839a; text-align: center; font-size: 13px; }
.ws-mention-caret-mirror {
  z-index: -1;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.ws-mention-caret-mirror span { display: inline; }
@media (max-width: 600px) {
  .ws-mention-popup {
    max-height: min(260px, calc(100dvh - 24px));
    border-radius: 11px;
    box-shadow: 0 8px 28px rgba(24, 43, 78, .22);
  }
  .ws-mention-option { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-mention-popup { scroll-behavior: auto; }
}
