/**
 * Playlist Page Styles
 */

/* Playlist Hero Icon */
.playlist-icon {
    background: linear-gradient(135deg, #22c55e 0%, #9cc809 100%);
}

/* Item Type Badges */
.item-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.item-type-badge i {
    font-size: 12px;
}

.cover-badge {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.original-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Playlist Button Styles - Override for consistency with charts.css */
.playlist-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #9cc809 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25),
                0 1px 3px rgba(34, 197, 94, 0.15);
    position: relative;
    flex-shrink: 0;
}

.playlist-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.playlist-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35),
                0 2px 6px rgba(34, 197, 94, 0.2);
}

.playlist-btn:active {
    transform: scale(1.0);
}

.playlist-btn i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

/* Icon animation on state change */
.playlist-btn i.icon-change {
    animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconPop {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.3) rotate(90deg);
        opacity: 0.3;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Button text styles */
.playlist-btn .btn-text {
    margin-left: 8px;
    transition: opacity 0.2s ease;
}

.playlist-btn.active {
    background: linear-gradient(135deg, #22c55e 0%, #9cc809 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35),
                0 2px 6px rgba(34, 197, 94, 0.2);
}

.playlist-btn.active:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.45),
                0 3px 10px rgba(34, 197, 94, 0.3);
}

.playlist-btn:active i {
    transform: scale(0.9);
}

/* Remove Button (on playlist page) */
.remove-btn {
    margin-left: 8px;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Empty State - Redesigned for better UX */
.playlist-items-list .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    width: 100%;
}

/* Reset padding and margin for all i elements in empty-state */
.playlist-items-list .empty-state i {
    padding: 0;
    margin-bottom: 0;
}

.playlist-items-list .empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 20px;
    margin-bottom: 24px;
}

.playlist-items-list .empty-state-icon i {
    font-size: 40px;
    color: #9ca3af;
}

.playlist-items-list .empty-state-title {
    color: #374151;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.playlist-items-list .empty-state-description {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Custom button styling */
.playlist-items-list .empty-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3),
                0 2px 6px rgba(59, 130, 246, 0.2);
}

.playlist-items-list .empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4),
                0 3px 8px rgba(59, 130, 246, 0.3);
    color: white;
}

.playlist-items-list .empty-state-btn:active {
    transform: translateY(0);
}

.playlist-items-list .empty-state-btn i {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .item-type-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Empty state responsive */
    .playlist-items-list .empty-state {
        padding: 40px 16px;
    }

    .playlist-items-list .empty-state-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .playlist-items-list .empty-state-icon i {
        font-size: 36px;
    }

    .playlist-items-list .empty-state-title {
        font-size: 20px;
    }

    .playlist-items-list .empty-state-description {
        font-size: 14px;
    }

    .playlist-items-list .empty-state-btn {
        padding: 11px 24px;
        font-size: 14px;
    }

    .playlist-items-list .empty-state-btn i {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    /* Empty state mobile */
    .playlist-items-list .empty-state {
        padding: 36px 16px;
        max-width: 100%;
    }

    .playlist-items-list .empty-state-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 18px;
    }

    .playlist-items-list .empty-state-icon i {
        font-size: 32px;
    }

    .playlist-items-list .empty-state-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .playlist-items-list .empty-state-description {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .playlist-items-list .empty-state-btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px;
        font-size: 13px;
    }

    .playlist-items-list .empty-state-btn i {
        font-size: 15px;
    }
}

/* Uniform button sizes on My Playlist page only */
.playlist-items-list .audio-play-btn,
.playlist-items-list .playlist-btn {
    width: 52px;
    height: 52px;
}

.playlist-items-list .audio-play-btn i,
.playlist-items-list .playlist-btn i {
    font-size: 1.25rem;
}

/* Responsive adjustments for My Playlist page */
@media (max-width: 992px) {
    .playlist-items-list .audio-play-btn,
    .playlist-items-list .playlist-btn {
        width: 48px;
        height: 48px;
    }

    .playlist-items-list .audio-play-btn i,
    .playlist-items-list .playlist-btn i {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .playlist-items-list .audio-play-btn,
    .playlist-items-list .playlist-btn {
        width: 46px;
        height: 46px;
    }

    .playlist-items-list .audio-play-btn i,
    .playlist-items-list .playlist-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .playlist-items-list .audio-play-btn,
    .playlist-items-list .playlist-btn {
        width: 44px;
        height: 44px;
    }

    .playlist-items-list .audio-play-btn i,
    .playlist-items-list .playlist-btn i {
        font-size: 0.938rem;
    }
}

/* Rectangular Playlist Button for Sidebar (Original Detail Page) */
.playlist-btn.w-100 {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    padding: 0.625rem 0.75rem !important;
    font-size: 0.813rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-btn.w-100::before {
    display: none;
}

.playlist-btn.w-100 i {
    margin-right: 0.5rem;
    font-size: 0.938rem;
}

.playlist-btn.w-100 .btn-text {
    margin-left: 0;
}
