/* Optimized Sets styles */

/* Use transform for better performance */
.set-actions button {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.set-actions button:hover {
    transform: translateY(-1px) scale(1.02);
}

/* Optimize scrolling performance */
.set-songs ul {
    max-height: 250px;
    overflow-y: auto;
    /* Enable GPU acceleration */
    transform: translateZ(0);
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Optimize repaints */
    contain: layout style paint;
}

.set-songs .song-list {
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.5rem;
}

/* Optimize collapse animations */
.collapse {
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height;
}

/* Styling for songs in a different language */
.different-lang {
    position: relative;
}

.different-lang::after {
    content: '↗';
    display: inline-block;
    margin-left: 5px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Optimize focus states */
#sets-container .collapse-title:focus {
    background-color: rgba(0, 0, 0, 0.03);
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Optimized scrollbar styling */
.set-songs ul::-webkit-scrollbar {
    width: 5px;
}

.set-songs ul::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.set-songs ul::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.set-songs ul::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Loading states */
.sets-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.sets-loading .loading {
    margin-right: 0.5rem;
}

/* Optimize list item rendering */
.song-list li {
    contain: layout style;
}

/* Reduce repaints on hover */
.song-list li:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transition: background-color 0.15s ease;
}

/* Optimize badge rendering */
.badge {
    will-change: auto;
}

/* Animation optimizations */
@media (prefers-reduced-motion: reduce) {
    .set-actions button,
    .collapse,
    .song-list li {
        transition: none;
    }
    
    .set-songs ul {
        scroll-behavior: auto;
    }
}

/* Container optimizations */
#sets-container {
    contain: layout style;
}

/* Optimize button interactions */
.btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Performance hint for collapse content */
.collapse-content {
    contain: layout style paint;
}
