/* Plyr Playlist Block Frontend Styles */
.plyr-playlist-wrapper {
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.plyr-playlist-container {
    display: flex;
    min-height: 500px;
    background: #ffffff;
}

.plyr-video-player {
    flex: 1;
    background: #000;
    position: relative;
}

.plyr-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Plyr player customization */
.plyr--video {
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.plyr__controls {
    background: rgba(0, 0, 0, 0.8);
}

.plyr__control--overlaid {
    background: rgba(59, 130, 246, 0.9);
}

.plyr__control--overlaid:hover {
    background: rgba(59, 130, 246, 1);
}

/* Video placeholder styling */
.plyr-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.plyr-playlist-sidebar {
    width: 350px;
    background: #ffffff;
    border-left: 1px solid #e9ecef;
    overflow-y: auto;
    transition: width 0.3s ease;
}

.plyr-playlist-sidebar.plyr-collapsed {
    width: 50px;
}

.plyr-toggle-playlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.plyr-toggle-playlist:hover {
    background: #2563eb;
}

.plyr-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.plyr-playlist-content {
    padding: 15px;
}

.plyr-playlist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plyr-playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.plyr-playlist-item:hover {
    background: #f8f9fa;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plyr-playlist-item.plyr-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.plyr-playlist-item.plyr-active .plyr-video-title {
    color: white;
}

.plyr-playlist-item.plyr-active .plyr-video-channel {
    color: rgba(255, 255, 255, 0.8);
}

.plyr-playlist-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plyr-playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plyr-placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.plyr-playlist-info {
    flex: 1;
    min-width: 0;
}

.plyr-video-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plyr-video-channel {
    font-size: 12px;
    color: #6c757d;
}

.plyr-playing-indicator {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #3b82f6;
    font-size: 16px;
    font-weight: bold;
}

.plyr-playlist-item.plyr-active .plyr-playing-indicator {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .plyr-playlist-container {
        flex-direction: column;
    }

    .plyr-playlist-sidebar {
        width: 100%;
        max-height: 300px;
    }

    .plyr-playlist-sidebar.plyr-collapsed {
        width: 100%;
        max-height: 50px;
    }

    .plyr-playlist-item {
        padding: 10px;
    }

    .plyr-playlist-thumb {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .plyr-playlist-wrapper {
        border-radius: 0;
    }

    .plyr-playlist-content {
        padding: 10px;
    }

    .plyr-playlist-item {
        padding: 8px;
        gap: 8px;
    }

    .plyr-playlist-thumb {
        width: 50px;
        height: 38px;
    }

    .plyr-video-title {
        font-size: 13px;
    }

    .plyr-video-channel {
        font-size: 11px;
    }
}

/* Collapsed state styles */
.plyr-playlist-sidebar.plyr-collapsed .plyr-playlist-content {
    display: none;
}

.plyr-playlist-sidebar.plyr-collapsed .plyr-toggle-playlist {
    position: relative;
    top: auto;
    right: auto;
    margin: 10px auto;
    display: block;
}

/* Loading and error states */
.plyr-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px;
}

/* Animation for playlist items */
.plyr-playlist-item {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}