/* Mention autocomplete dropdown */
.mention-dropdown {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  max-width: 320px;
  max-height: 240px;
  overflow-y: auto;
  background: #1c1917;
  border: 1px solid #44403c;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 0.25rem;
}
.mention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #d6d3d1;
  transition: background 0.1s;
}
.mention-item:hover,
.mention-item-active {
  background: #292524;
  color: #fbbf24;
}
.mention-item-name {
  font-weight: 600;
}
.mention-item-detail {
  font-size: 0.6875rem;
  color: #78716c;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.mention-item-active .mention-item-detail {
  color: #a8a29e;
}

/* Rendered mention links */
a.mention {
  color: #fbbf24;
  font-weight: 600;
  text-decoration: none;
  background: rgba(251, 191, 36, 0.1);
  padding: 0.1em 0.3em;
  border-radius: 0.25em;
  transition: background 0.15s;
}
a.mention:hover {
  background: rgba(251, 191, 36, 0.2);
  text-decoration: underline;
}
a.mention-table {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}
a.mention-table:hover {
  background: rgba(167, 139, 250, 0.2);
}

/* Light mode */
html:not(.dark) a.mention {
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
}
html:not(.dark) a.mention:hover {
  background: rgba(180, 83, 9, 0.2);
}
html:not(.dark) a.mention-table {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}
html:not(.dark) a.mention-table:hover {
  background: rgba(124, 58, 237, 0.2);
}
html:not(.dark) .mention-dropdown {
  background: #fafaf9;
  border-color: #d6d3d1;
}
html:not(.dark) .mention-item {
  color: #44403c;
}
html:not(.dark) .mention-item:hover,
html:not(.dark) .mention-item-active {
  background: #f5f5f4;
  color: #b45309;
}
