/*
 * RecifeMais Supabase Intelligence UI Styles
 * Migrated from Theme V4 to Plugin Core.
 */

/* Autocomplete Dropdown */
.rm-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #E5E7EB;
    border-top: 0;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.rm-autocomplete.active {
    display: block;
    animation: rm-slideDown 200ms ease-out;
}

@keyframes rm-slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.rm-autocomplete__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #111827;
    transition: background 150ms ease;
    border-bottom: 1px solid #F3F4F6;
}

.rm-autocomplete__item:last-child {
    border-bottom: 0;
}

.rm-autocomplete__item:hover,
.rm-autocomplete__item.highlighted {
    background: #F9FAFB;
}

.rm-autocomplete__thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #F3F4F6;
}

.rm-autocomplete__info {
    flex: 1;
    min-width: 0;
}

.rm-autocomplete__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rm-autocomplete__meta {
    font-size: 0.75rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rm-autocomplete__type {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rm-autocomplete__type--agenda { background: #F3E8FF; color: #4E008E; }
.rm-autocomplete__type--lugar { background: #E0F7FA; color: #00838F; }
.rm-autocomplete__type--artista { background: #FCE4EC; color: #C2185B; }
.rm-autocomplete__type--post { background: #E3F2FD; color: #1565C0; }
.rm-autocomplete__type--agremiacoes { background: #E8F5E9; color: #2E7D32; }
.rm-autocomplete__type--roteiro { background: #FFF3E0; color: #E65100; }

.rm-autocomplete__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #6B7280;
    font-size: 0.875rem;
}

.rm-autocomplete__empty {
    padding: 1.5rem;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.875rem;
}

.rm-autocomplete__footer {
    padding: 0.75rem 1rem;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

.rm-autocomplete__footer a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4E008E;
    text-decoration: none;
}

.rm-autocomplete__footer a:hover {
    text-decoration: underline;
}

/* Recommendations */
.rm-recommendations { animation: rm-fadeIn 500ms ease-out; }

@keyframes rm-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.rm-search-engine {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.rm-search-engine--supabase {
    background: linear-gradient(135deg, #4E008E, #E10098);
    color: white;
}

.rm-search-engine--wordpress {
    background: #F3F4F6;
    color: #4B5563;
}

/* Similar Content Badge */
.rm-similar-section__badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #4E008E;
    background: #F3E8FF;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
