/**
 * Favorites - Estilos para funcionalidad de favoritos
 */

/* Botón estrella en filas de canciones */
.btn-favorite {
    padding: 0.25rem;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-favorite:hover {
    color: rgba(250, 204, 21, 0.7);
    transform: scale(1.1);
}

.btn-favorite.active {
    color: #facc15;
}

.btn-favorite.active:hover {
    color: #fbbf24;
}

.btn-favorite svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Tarjeta de género Favoritas en sidebar */
.category-favorites {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    position: relative;
    overflow: visible;
}

.category-favorites:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
}

.category-favorites .favorites-star {
    color: #dc2626;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.category-favorites .category-name {
    color: #1a1a2e;
    font-weight: 600;
}

.category-favorites .category-count {
    background: rgba(0, 0, 0, 0.2);
    color: #1a1a2e;
}

/* Botón X para eliminar favoritos */
.btn-clear-favorites {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-favorites:hover .btn-clear-favorites {
    opacity: 1;
}

.btn-clear-favorites:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.btn-clear-favorites svg {
    width: 12px;
    height: 12px;
    color: white;
}

/* Carrusel de favoritos */
#favoritesCarouselSection {
    display: none;
}

/* :not(.carousels-hidden) evita que has-favorites override el display:none de app-critical.css
   (ambos tienen misma especificidad, favorites.css carga después y ganaba por cascada) */
#favoritesCarouselSection.has-favorites:not(.carousels-hidden) {
    display: block;
}

.favorites-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.favorites-carousel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.favorites-carousel-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #facc15;
}

.favorites-count-badge {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(250, 204, 21, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

/* Animación al agregar/quitar favorito */
@keyframes favoriteAdded {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes favoriteRemoved {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-favorite.animate-add {
    animation: favoriteAdded 0.3s ease;
}

.btn-favorite.animate-remove {
    animation: favoriteRemoved 0.3s ease;
}

/* Responsive */
@media (max-width: 640px) {
    .btn-favorite svg {
        width: 1rem;
        height: 1rem;
    }

    .btn-clear-favorites {
        width: 18px;
        height: 18px;
        top: -4px;
        right: -4px;
        opacity: 1;
    }

    .btn-clear-favorites svg {
        width: 10px;
        height: 10px;
    }
}
