/* Styles pour la liste compacte de morceaux Funkwhale */

.funkwhale-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.funkwhale-section {
    width: 100%;
    min-width: 0;
}

.funkwhale-header {
    background: var(--primary-red);
    color: white;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.funkwhale-header a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.funkwhale-header a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.funkwhale-tracks-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) transparent;
}

.funkwhale-tracks-list::-webkit-scrollbar {
    width: 6px;
}

.funkwhale-tracks-list::-webkit-scrollbar-track {
    background: transparent;
}

.funkwhale-tracks-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-red);
    border-radius: 3px;
}

.funkwhale-track-item {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    color: inherit;
    transition: background-color 0.2s ease;
    gap: 8px;
    position: relative;
}

.funkwhale-track-item:hover {
    background: var(--hover-bg);
}

.funkwhale-track-item:last-child {
    border-bottom: none;
}

.funkwhale-track-item.playing {
    background: var(--hover-bg);
}

.funkwhale-track-item.playing .funkwhale-track-title {
    color: var(--primary-red);
}

.funkwhale-track-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--tag-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.funkwhale-track-thumb:hover {
    transform: scale(1.05);
}

.funkwhale-track-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.funkwhale-play-icon,
.funkwhale-pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.funkwhale-track-item:hover .funkwhale-play-icon {
    opacity: 1;
}

.funkwhale-track-item.playing .funkwhale-play-icon {
    opacity: 0;
}

.funkwhale-track-item.playing .funkwhale-pause-icon {
    opacity: 1;
}

.funkwhale-track-item.playing:hover .funkwhale-pause-icon {
    opacity: 1;
}

.funkwhale-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.funkwhale-track-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 4px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.funkwhale-track-artist {
    font-size: 0.7rem;
    color: var(--primary-red);
    font-weight: 600;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.funkwhale-track-artist i {
    font-size: 0.65rem;
}

.funkwhale-track-meta {
    font-size: 0.65rem;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.funkwhale-track-meta i {
    font-size: 0.6rem;
}

.funkwhale-no-tracks {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
    font-size: 0.9rem;
}

/* Lien externe vers Funkwhale */
.funkwhale-external-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: auto;
}

.funkwhale-external-link:hover {
    background: var(--tag-bg);
    color: var(--primary-red);
    transform: scale(1.1);
}

.funkwhale-external-link i {
    font-size: 0.85rem;
}

/* Masquer l'élément audio */
.funkwhale-track-item audio {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .funkwhale-section {
        width: 100%;
    }

    .funkwhale-container {
        height: auto;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .funkwhale-track-thumb {
        width: 65px;
        height: 65px;
    }

    .funkwhale-track-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .funkwhale-track-title {
        font-size: 0.85rem;
    }

    .funkwhale-track-artist {
        font-size: 0.7rem;
    }

    .funkwhale-track-meta {
        font-size: 0.65rem;
    }

    .funkwhale-header {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .funkwhale-play-icon {
        font-size: 1.3rem;
    }
}
