/* Song Search CSS */

.music-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.music-search-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.music-search-wrapper input[type="text"]:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.search-result:hover,
.search-result.highlighted {
    background-color: #f5f5f5;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.search-result-meta {
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.search-result-artist {
    font-weight: 500;
}

.search-result-separator {
    margin: 0 8px;
    color: #999;
}

.search-result-album {
    font-style: italic;
}

.search-result-score {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-error {
    color: #d32f2f;
}

/* Highlighting for search matches */
.search-result mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Loading state */
.search-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .music-search-wrapper input[type="text"] {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .search-result {
        padding: 10px 14px;
    }
    
    .search-result-title {
        font-size: 13px;
    }
    
    .search-result-meta {
        font-size: 11px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .music-search-wrapper input[type="text"] {
        background: #333;
        border-color: #555;
        color: white;
    }
    
    .music-search-wrapper input[type="text"]:focus {
        border-color: #2196F3;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    }
    
    .search-results {
        background: #333;
        border-color: #555;
    }
    
    .search-result {
        border-bottom-color: #444;
    }
    
    .search-result:hover,
    .search-result.highlighted {
        background-color: #444;
    }
    
    .search-result-title {
        color: #fff;
    }
    
    .search-result-meta {
        color: #ccc;
    }
    
    .search-result-separator {
        color: #888;
    }
    
    .search-loading,
    .search-no-results {
        color: #ccc;
    }
}