/**
 * PHARMDATA DESIGN SYSTEM - Autocomplete
 * Suggestions dropdown for search/autocomplete inputs.
 *
 * Requires: pharmdata-tokens.css
 *
 * @example
 * <div class="search-wrap">
 *   <input type="text" />
 *   <div class="suggestions-list">
 *     <a class="suggestion-item" href="#">
 *       <span class="suggestion-name">Dipirona 500mg</span>
 *       <span class="suggestion-meta">VTM <span class="suggestion-sep">·</span> Comprimido</span>
 *     </a>
 *   </div>
 * </div>
 */

/* ─── Dropdown container ─── */
.suggestions-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--arctic-mist);
    border: 1px solid var(--soft-arctic);
    border-radius: 8px;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--graphite-depth) 10%, transparent);
    z-index: 100;
    max-height: 420px;
    overflow-y: auto;
}

.suggestions-list:empty {
    display: none;
}

/* ─── Individual suggestion ─── */
.suggestion-item {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--graphite-depth);
    cursor: pointer;
    border-bottom: 1px solid var(--soft-arctic);
    text-align: left;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--mint-signal);
}

/* ─── Name & metadata ─── */
.suggestion-name {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--graphite-depth);
    line-height: 1.3;
}

.suggestion-meta {
    display: block;
    font-size: 11px;
    color: var(--soft-steel);
    margin-top: 1px;
    line-height: 1.3;
}

.suggestion-sep {
    opacity: 0.4;
}

/* ─── Empty state ─── */
.suggestions-empty {
    padding: 16px;
    text-align: center;
    color: var(--soft-steel);
    font-size: 13px;
}

/* ─── Clickable table row (used with autocomplete results) ─── */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--mint-signal);
}
