/**
 * List view styles for YT Playlist plugin
 * Contains all list layout and responsive list styles
 */

/* Main List Container */
.yt-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

/* List Item Layout */
.yt-playlist-list .yt-video-item,
.yt-playlist-list .yt-card {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0;
    background: white;
    border-radius: var(--yt-playlist-radius);
    box-shadow: var(--yt-playlist-shadow);
    overflow: hidden;
    transition: var(--yt-playlist-transition);
}

.yt-playlist-list .yt-video-item:hover,
.yt-playlist-list .yt-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Thumbnail in List View */
.yt-playlist-list .yt-video-thumbnail,
.yt-playlist-list .yt-thumbnail-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 112px;
    position: relative;
    overflow: hidden;
}

.yt-playlist-list .yt-video-thumbnail img,
.yt-playlist-list .yt-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--yt-playlist-transition);
}

/* Info Panel in List View */
.yt-playlist-list .yt-video-info,
.yt-playlist-list .yt-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 112px;
}

.yt-playlist-list .yt-video-title,
.yt-playlist-list .yt-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--yt-playlist-text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video Description in List View */
.yt-playlist-list .yt-video-description {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadata in List View */
.yt-playlist-list .yt-video-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-top: auto;
}

/* List Variants */

/* Compact List */
.yt-playlist-list.yt-list-compact .yt-video-thumbnail,
.yt-playlist-list.yt-list-compact .yt-thumbnail-wrapper {
    width: 160px;
    height: 90px;
}

.yt-playlist-list.yt-list-compact .yt-video-info,
.yt-playlist-list.yt-list-compact .yt-info {
    min-height: 90px;
    padding: 0.75rem;
}

.yt-playlist-list.yt-list-compact .yt-video-title,
.yt-playlist-list.yt-list-compact .yt-info h3 {
    font-size: 1rem;
    -webkit-line-clamp: 1;
}

/* Large List */
.yt-playlist-list.yt-list-large .yt-video-thumbnail,
.yt-playlist-list.yt-list-large .yt-thumbnail-wrapper {
    width: 280px;
    height: 157px;
}

.yt-playlist-list.yt-list-large .yt-video-info,
.yt-playlist-list.yt-list-large .yt-info {
    min-height: 157px;
    padding: 1.25rem;
}

.yt-playlist-list.yt-list-large .yt-video-title,
.yt-playlist-list.yt-list-large .yt-info h3 {
    font-size: 1.2rem;
    -webkit-line-clamp: 3;
}

/* Minimal List (No Thumbnails) */
.yt-playlist-list.yt-list-minimal .yt-video-thumbnail,
.yt-playlist-list.yt-list-minimal .yt-thumbnail-wrapper {
    display: none;
}

.yt-playlist-list.yt-list-minimal .yt-video-item,
.yt-playlist-list.yt-list-minimal .yt-card {
    border-left: 4px solid var(--yt-playlist-primary-color);
}

/* List with Numbers */
.yt-playlist-list.yt-list-numbered {
    counter-reset: video-counter;
}

.yt-playlist-list.yt-list-numbered .yt-video-item::before,
.yt-playlist-list.yt-list-numbered .yt-card::before {
    counter-increment: video-counter;
    content: counter(video-counter);
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--yt-playlist-primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

/* Responsive List Breakpoints */

/* Large Tablets */
@media (max-width: 1024px) {
    .yt-playlist-list .yt-video-thumbnail,
    .yt-playlist-list .yt-thumbnail-wrapper {
        width: 180px;
        height: 101px;
    }
    
    .yt-playlist-list .yt-video-info,
    .yt-playlist-list .yt-info {
        min-height: 101px;
        padding: 0.875rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .yt-playlist-list {
        padding: 0;
    }
    
    .yt-playlist-list .yt-video-thumbnail,
    .yt-playlist-list .yt-thumbnail-wrapper {
        width: 150px;
        height: 84px;
    }
    
    .yt-playlist-list .yt-video-info,
    .yt-playlist-list .yt-info {
        min-height: 84px;
        padding: 0.75rem;
    }
    
    .yt-playlist-list .yt-video-title,
    .yt-playlist-list .yt-info h3 {
        font-size: 1rem;
    }
    
    .yt-playlist-list .yt-video-description {
        -webkit-line-clamp: 1;
    }
    
    .yt-playlist-list .yt-video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .yt-playlist-list .yt-video-item,
    .yt-playlist-list .yt-card {
        flex-direction: column;
    }
    
    .yt-playlist-list .yt-video-thumbnail,
    .yt-playlist-list .yt-thumbnail-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .yt-playlist-list .yt-video-info,
    .yt-playlist-list .yt-info {
        min-height: auto;
        padding: 1rem;
    }
    
    .yt-playlist-list .yt-video-description {
        display: none;
    }
    
    /* Compact variant on mobile */
    .yt-playlist-list.yt-list-compact .yt-video-item,
    .yt-playlist-list.yt-list-compact .yt-card {
        flex-direction: row;
    }
    
    .yt-playlist-list.yt-list-compact .yt-video-thumbnail,
    .yt-playlist-list.yt-list-compact .yt-thumbnail-wrapper {
        width: 120px;
        height: 67px;
        aspect-ratio: auto;
    }
    
    .yt-playlist-list.yt-list-compact .yt-video-info,
    .yt-playlist-list.yt-list-compact .yt-info {
        min-height: 67px;
        padding: 0.5rem;
    }
}

/* Very Small Screens */
@media (max-width: 320px) {
    .yt-playlist-list .yt-video-info,
    .yt-playlist-list .yt-info {
        padding: 0.75rem;
    }
    
    .yt-playlist-list .yt-video-title,
    .yt-playlist-list .yt-info h3 {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
}