/* ===== Tag AutoComplete Popup ===== */ .tac-popup { display: none; position: fixed; z-index: 10000; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px var(--shadow), 0 0 0 1px var(--border); max-height: 300px; min-width: 280px; max-width: 480px; overflow-y: auto; overflow-x: hidden; padding: 4px 0; } .tac-item { display: flex; align-items: center; gap: 6px; padding: 5px 10px; cursor: pointer; transition: background var(--transition); font-size: 0.82rem; line-height: 1.4; } .tac-item:hover, .tac-item.selected { background: var(--bg-hover); } .tac-item.selected { background: var(--accent); color: #fff; } .tac-item.selected .tac-item-count, .tac-item.selected .tac-item-zh { color: rgba(255,255,255,0.6); } .tac-item.selected .tac-item-cat { border-color: rgba(255,255,255,0.5); } .tac-item.selected .tac-alias { color: rgba(255,255,255,0.7); } .tac-item.selected .tac-alias-arrow { color: rgba(255,255,255,0.5); } /* Category dot */ .tac-item-cat { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--border); } .tac-cat-0 { background: #4a9eff; } .tac-cat-1 { background: #ff4a6a; } .tac-cat-3 { background: #a64aff; } .tac-cat-4 { background: #4aff7a; } .tac-cat-5 { background: #ffaa4a; } .tac-cat-9 { background: #ff6b6b; } /* Name area: uses flex-shrink:0 so it keeps its width */ .tac-item-name { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); font-weight: 500; } .tac-item.selected .tac-item-name { color: #fff; } /* Alias display */ .tac-alias { color: var(--text-muted); font-weight: 400; } .tac-alias-arrow { color: var(--text-muted); margin: 0 3px; font-size: 0.75rem; } /* Chinese translation: takes remaining space */ .tac-item-zh { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; color: var(--text-muted); font-weight: 400; } /* Count: always at the right edge. When there is no zh element, flex:1 on name would push count right, but we want name to shrink. Solution: use a spacer or margin-left:auto. */ .tac-item-count { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; margin-left: auto; }