/**
 * Citation autocomplete (citeproof / quotetheorem)
 *
 * Mirrors the shared .ac-* autocomplete pattern from autocomplete.css:
 * border only (no shadow per DESIGN.md), Androma tokens, accent for
 * meta tags. JS keeps the existing .citation-autocomplete-* class names,
 * so this file applies the design-system look directly to them.
 */

.citation-autocomplete-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  padding: var(--spacing-xs);
}

/* top is set dynamically by JS, anchored to the caret line */

.citation-autocomplete-item {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.citation-autocomplete-item:hover,
.citation-autocomplete-item.selected {
  background: var(--color-bg-secondary);
}

.citation-item-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Neutral id pill — same treatment as content tags in DESIGN.md
   (gray surface, secondary text). */
.citation-item-id {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  padding: 1px var(--spacing-xs);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.citation-item-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Area tag — accent-tinted count-style pill from DESIGN.md
   (Badges & Tags → Count badges). */
.citation-area-tag {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  padding: 1px var(--spacing-xs);
  border-radius: var(--radius-full);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.citation-item-preview {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
