/* Right-click menu on own messages (and, for moderators, anyone's). */

.contextMenu {
  min-width: 168px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  z-index: 1000;
  animation: contextMenuIn 120ms var(--ease) both;
}

@keyframes contextMenuIn {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Quick-reaction row (#14) at the top of the menu. */

.contextMenuReactions {
  display: flex;
  gap: 2px;
  padding: 2px;
}

/* Divider only when Edit/Delete items follow. */
.contextMenuReactions.withItems {
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.contextMenuEmoji {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.contextMenuEmoji:hover,
.contextMenuEmoji:focus-visible {
  background-color: var(--surface-3);
}

.contextMenuEmoji:focus-visible {
  outline-offset: -2px;
}

.contextMenuItem {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: var(--fs-md);
  font-weight: 550;
  color: var(--text);
  transition: background-color var(--t-fast) var(--ease);
}

.contextMenuItem svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-3);
}

.contextMenuItem:hover {
  background-color: var(--surface-3);
}

/* Keyboard navigation (#16): match the hover wash; the global outline ring
   stays on :focus-visible, inset so it is not clipped by the menu edge. */
.contextMenuItem:focus-visible {
  background-color: var(--surface-3);
  outline-offset: -2px;
}

.contextMenuItemDanger {
  color: var(--danger);
}

.contextMenuItemDanger svg {
  color: var(--danger);
}

.contextMenuItemDanger:hover {
  background-color: var(--danger-bg);
}
