/**
 * Karaoke Search Autocomplete Styles
 */

.karaoke-search-dropdown {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.karaoke-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.karaoke-search-item:hover,
.karaoke-search-item.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.1));
}

.karaoke-search-item-content {
    flex: 1;
    min-width: 0;
}

.karaoke-search-title {
    font-weight: 500;
    color: var(--text-primary, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.karaoke-search-artists {
    font-size: 12px;
    color: var(--text-secondary, #9ca3af);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.karaoke-search-views {
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
}

/* Match type badges */
.match-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.match-badge.match-title {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.match-badge.match-artists {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.match-badge.match-lyrics {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* Loading state */
.karaoke-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-secondary, #9ca3af);
}

.karaoke-search-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: karaoke-spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes karaoke-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.karaoke-search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary, #9ca3af);
    font-size: 14px;
}

/* Scrollbar styling */
.karaoke-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

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

.karaoke-search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.karaoke-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Input highlight when searching */
.karaoke-search-active {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* Mobile Search Results - Card Style like Desktop */
.mobile-search-result {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: #e5e7eb;
    transition: background-color 0.15s ease;
}

.mobile-search-result:hover,
.mobile-search-result:active {
    background: rgba(59, 130, 246, 0.1);
}

/* Header Row: Title + Views */
.mobile-search-result .result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.mobile-search-result .result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #60a5fa;
    flex: 1;
    line-height: 1.3;
}

.mobile-search-result .result-views {
    font-size: 0.75rem;
    color: #6b7280;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.mobile-search-result .result-views i {
    font-size: 0.65rem;
}

/* Artist Name */
.mobile-search-result .result-artist {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Lyrics Excerpt */
.mobile-search-result .result-excerpt {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}

/* Mobile Search Modal styling */
#mobile-search-modal {
    background: rgba(17, 24, 39, 0.98);
}

#mobile-search-results {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

#mobile-search-results::-webkit-scrollbar {
    width: 4px;
}

#mobile-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}