/* YOUTUBE PLAYLIST PLAYER ----------------------------------------------------------------------------------------------*/
/* Contain playlist within its parent .box */
.box:has(.yt-playlist) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yt-playlist-box {
    aspect-ratio: 11 / 5;
}

.yt-playlist {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    background-color: #000;
    flex: 1;
    min-height: 0;
}

.yt-player-wrap {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.yt-player-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.yt-player-title {
    background-color: #111;
    color: #fff;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-list-wrap {
    width: 260px;
    flex-shrink: 0;
    background-color: #111;
    overflow-y: auto;
    min-height: 0;
    max-height: 260px;
}

.yt-list {
    display: flex;
    flex-direction: column;
}

.yt-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #222;
}

.yt-list-item:hover {
    background-color: #222;
}

.yt-list-item.active {
    background-color: #333;
}

.yt-list-thumb {
    width: 68px;
    height: 38px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.yt-list-meta {
    display: flex;
    gap: 0.4rem;
    min-width: 0;
}

.yt-list-num {
    color: #888;
    font-size: 0.75rem;
    flex-shrink: 0;
    padding-top: 1px;
}

.yt-list-text {
    color: #ddd;
    font-size: 0.78rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yt-list-item.active .yt-list-text {
    color: #fff;
}

/* MOBILE */
@media (max-width: 700px) {
    .yt-playlist-box {
        aspect-ratio: unset;
    }

    .yt-playlist {
        flex-direction: column;
        max-width: 100%;
    }

    .yt-player-wrap {
        align-self: stretch;
    }

    .yt-list-wrap {
        width: 100%;
        max-height: 240px;
    }

    .yt-list-item {
        padding: 0.25rem 0.4rem;
        gap: 0.3rem;
    }

    .yt-list-thumb {
        width: 48px;
        height: 27px;
    }

    .yt-list-text {
        font-size: 0.7rem;
    }

    .yt-list-num {
        font-size: 0.65rem;
    }

    .yt-list-meta {
        gap: 0.3rem;
    }
}
