/**
 * HitFinder / Playlist Styles
 * Schlager Radio Theme
 */

/* Section */
.section-hitfinder {
    padding: 3rem 0;
    background: linear-gradient(180deg, transparent 0%, hsl(var(--muted) / 0.3) 100%);
}

.section-hitfinder .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-hitfinder .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-hitfinder .hitfinder-icon {
    color: hsl(var(--primary));
}

/* Suchbereich */
.hitfinder-search {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary) / 0.05) 50%, transparent 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid hsl(var(--border) / 0.5);
}

.hitfinder-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.hitfinder-search-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hitfinder-search-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hitfinder-search-field input {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hitfinder-search-field input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.hitfinder-search-buttons {
    display: flex;
    gap: 0.5rem;
}

.hitfinder-search-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Song-Liste Container */
.hitfinder-songs {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Song-Zeile */
.hitfinder-song {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    transition: background-color 0.2s;
}

.hitfinder-song:last-child {
    border-bottom: none;
}

.hitfinder-song:hover {
    background: hsl(var(--muted) / 0.3);
}

/* Cover */
.hitfinder-cover {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
}

.hitfinder-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Song Info */
.hitfinder-info {
    flex: 1;
    min-width: 0;
}

.hitfinder-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.hitfinder-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hitfinder-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
}

.hitfinder-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hitfinder-artist {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Streaming Links */
.hitfinder-links {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.hitfinder-song:hover .hitfinder-links {
    opacity: 1;
}

.hitfinder-link {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.hitfinder-link svg {
    width: 18px;
    height: 18px;
}

.hitfinder-link:hover {
    transform: scale(1.1);
}

.hitfinder-spotify {
    background: rgba(30, 215, 96, 0.1);
    color: #1DB954;
}

.hitfinder-spotify:hover {
    background: rgba(30, 215, 96, 0.2);
}

.hitfinder-apple {
    background: rgba(252, 60, 68, 0.1);
    color: #FC3C44;
}

.hitfinder-apple:hover {
    background: rgba(252, 60, 68, 0.2);
}

/* Loading Skeleton */
.hitfinder-loading {
    display: block;
}

.hitfinder-skeleton .hitfinder-cover,
.hitfinder-skeleton .skeleton {
    background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted) / 0.5) 50%, hsl(var(--muted)) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.hitfinder-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
}

.hitfinder-empty svg {
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section-hitfinder {
        padding: 2rem 0;
    }

    .hitfinder-search {
        padding: 1rem;
    }

    .hitfinder-search-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hitfinder-search-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hitfinder-search-buttons .btn {
        justify-content: center;
    }

    .hitfinder-song {
        padding: 0.875rem 1rem;
    }

    .hitfinder-cover {
        width: 56px;
        height: 56px;
    }

    .hitfinder-title {
        font-size: 0.9375rem;
    }

    .hitfinder-artist {
        font-size: 0.8125rem;
    }

    /* Links immer sichtbar auf Mobile */
    .hitfinder-links {
        opacity: 1;
    }

    .hitfinder-link {
        width: 32px;
        height: 32px;
    }

    .hitfinder-link svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .hitfinder-cover {
        width: 48px;
        height: 48px;
    }

    .hitfinder-title {
        font-size: 0.875rem;
    }

    .hitfinder-artist {
        font-size: 0.75rem;
    }
}

/* Cover Placeholder */
.hitfinder-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--muted) / 0.5) 100%);
    border-radius: 0.25rem;
}

/* Text Links for Spotify/Apple */
.hitfinder-link {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s;
}

/* Icon Buttons für Spotify/Apple */
.hitfinder-link svg {
    width: 20px;
    height: 20px;
}

.hitfinder-spotify {
    background: rgba(30, 215, 96, 0.1);
    color: #1DB954;
}

.hitfinder-spotify:hover {
    background: rgba(30, 215, 96, 0.2);
}

.hitfinder-apple {
    background: rgba(252, 60, 68, 0.1);
    color: #FC3C44;
}

.hitfinder-apple:hover {
    background: rgba(252, 60, 68, 0.2);
}
