/* ============================================================
   OkPlace Autocomplete v4.0 — Estilo Mercado Livre
   ============================================================ */

#search-suggestions {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 460px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* ── Seção: histórico ── */
.suggestion-section-title {
    padding: 8px 15px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #f0f0f0;
}
.suggestion-section-title:first-child {
    border-top: none;
}

/* ── Item base ── */
.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    background: #fff;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f5f5f5; }

/* ── Item de busca principal ── */
.search-suggestion {
    background: #fff;
    border-left: 3px solid #2a9d8f;
}
.search-suggestion:hover { background: #f0fafa; }

/* ── Thumbnail do produto ── */
.suggestion-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    flex-shrink: 0;
    background: #f5f5f5;
}
.suggestion-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ── Ícone (busca/categoria) ── */
.suggestion-icon {
    font-size: 18px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Textos ── */
.suggestion-text-group { flex: 1; min-width: 0; }

.suggestion-main-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-main-text mark {
    background: none;
    color: #2a9d8f;
    font-weight: 700;
}

.suggestion-description {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.suggestion-price {
    font-size: 13px;
    font-weight: 700;
    color: #2a9d8f;
    margin-top: 3px;
}

/* ── Badge de tipo ── */
.suggestion-type-badge {
    font-size: 11px;
    color: #888;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-suggestion .suggestion-type-badge {
    color: #2a9d8f;
    background: #e0f5f2;
}

/* ── Histórico item ── */
.history-suggestion .suggestion-icon {
    color: #aaa;
}
.history-suggestion .suggestion-remove {
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}
.history-suggestion .suggestion-remove:hover { color: #e63946; }

/* ── Status ── */
.suggestion-none,
.suggestion-loading,
.suggestion-error {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #888;
}
.suggestion-error { color: #cc0000; }
.suggestion-loading { font-style: italic; }

/* ── Botão de voz ── */
#okplace-voice-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
#okplace-voice-btn:hover { background: #f0f0f0; color: #2a9d8f; }
#okplace-voice-btn.listening {
    color: #e63946;
    animation: pulse-voice 1s infinite;
}
@keyframes pulse-voice {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
