/* ==============================================
   Anima WebUI - Autocomplete Dropdown
   ============================================== */

.ac-dropdown {
    position: fixed;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    animation: fadeIn 0.1s ease;
}

/* ── Scrollbar ── */
.ac-dropdown::-webkit-scrollbar {
    width: 5px;
}

.ac-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.ac-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

/* ── Item ── */
.ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 0.85rem;
}

.ac-item:hover,
.ac-item--selected {
    background: var(--bg-hover);
}

/* ── Color Dot (Category) ── */
.ac-tag-color {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Tag Name ── */
.ac-tag-name {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Alias Hint ── */
.ac-alias {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

/* ── Category Label ── */
.ac-tag-cat {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    opacity: 0.8;
}

/* ── Post Count ── */
.ac-tag-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
}

/* ── Mobile Override ── */
@media (max-width: 768px) {
    .ac-dropdown {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        border-top: 2px solid var(--accent-primary, #38bdf8);
        padding: 2px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .ac-item {
        padding: 10px 10px;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .ac-tag-name {
        font-size: 0.85rem;
    }
}