/**
 * CSS for the YouTube-Style Playlist Module.
 * FINAL VERSION: Adds styles for the "Up Next" countdown overlay.
 *
 * @since 1.6.3
 */

/* Main layout styles remain the same */
.shvh-playlist-layout { display: flex; flex-direction: column; gap: 20px; margin: 20px 0; }
.shvh-playlist-main-content, .shvh-playlist-sidebar { width: 100%; }
.shvh-playlist-sidebar { border: 1px solid #ddd; border-radius: 12px; overflow: hidden; background: #f9f9f9; }
.shvh-playlist-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #ddd; }
.shvh-playlist-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.shvh-autoplay-control { display: flex; align-items: center; gap: 8px; }
.shvh-autoplay-text { font-size: 14px; font-weight: 500; color: #333; }
.shvh-autoplay-switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.shvh-autoplay-switch input { opacity: 0; width: 0; height: 0; }
.shvh-slider-round { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 22px; }
.shvh-slider-round:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .shvh-slider-round { background-color: #e74c3c; }
input:checked + .shvh-slider-round:before { transform: translateX(22px); }
.shvh-playlist-items {}
.shvh-playlist-item { display: flex; gap: 12px; padding: 10px; align-items: flex-start; text-decoration: none; color: inherit; cursor: pointer; border-bottom: 1px solid #eee; min-height: 90px; }
.shvh-playlist-item:last-child { border-bottom: none; }
.shvh-playlist-item:hover { background: #efefef; }
.shvh-playlist-item.is-playing { background: #e7e7e7; }
.shvh-playlist-item.is-playing .shvh-playlist-item-title { font-weight: 600; color: #c0392b; }
.shvh-playlist-item-thumb { width: 142px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; flex-shrink: 0; background-color: #ccc; background-size: cover; background-position: center; }
.shvh-playlist-item-details { flex-grow: 1; display: flex; flex-direction: column; }
.shvh-playlist-item-title { font-size: 14px; line-height: 1.4; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shvh-playlist-item-desc { font-size: 13px; line-height: 1.5; color: #555; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- NEW: "Up Next" Countdown Overlay Styles --- */
.shvh-up-next-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(28, 28, 28, 0.9);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    z-index: 22; /* Ensure it's above the player controls */
    font-family: sans-serif;
    width: 280px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.up-next-content .up-next-label {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.up-next-content .up-next-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.up-next-content .up-next-countdown {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

@media (min-width: 992px) {
    .shvh-playlist-layout { flex-direction: row; align-items: flex-start; }
    .shvh-playlist-main-content { flex: 1; min-width: 0; }
    .shvh-playlist-sidebar { width: 380px; flex-shrink: 0; }
    .shvh-playlist-items { max-height: 500px; overflow-y: auto; }
}