/* ── Style-6: Playlist Layout ───────────────────────────────────── */
.captfyt-s6-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--captfyt-card-bg, #ffffff);
    border-radius: 12px;
    border: 1px solid var(--captfyt-card-border, #e5e7eb);
    box-shadow: var(--captfyt-card-shadow, 0 2px 10px rgba(0,0,0,0.08));
}

/* Left: featured large video */
.captfyt-s6-featured {
    flex: 0 0 65%;
    min-width: 0;
}

.captfyt-s6-featured-thumb {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #1f2937;
    text-decoration: none;
}

.captfyt-s6-featured-thumb img {
    width: 100% !important; height: 100% !important;
    object-fit: cover; display: block;
    transition: transform 0.3s;
}
.captfyt-s6-featured-thumb:hover img { transform: scale(1.03); }

.captfyt-s6-featured-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
    background: rgba(0,0,0,0.1);
}
.captfyt-s6-featured-thumb:hover .captfyt-s6-featured-play { opacity: 1; }

.captfyt-s6-featured-icon-pause { display: none; }
.captfyt-s6-featured-thumb.captfyt-is-playing .captfyt-s6-featured-icon-play { display: none; }
.captfyt-s6-featured-thumb.captfyt-is-playing .captfyt-s6-featured-icon-pause { display: block; }
.captfyt-s6-featured-thumb.captfyt-is-playing .captfyt-s6-featured-play { opacity: 1; }

.captfyt-s6-duration {
    position: absolute; right: 8px; bottom: 8px;
    background: rgba(0, 0, 0, 0.8); color: #fff;
    font-size: 12px; font-weight: 600; line-height: 1;
    padding: 3px 6px; border-radius: 4px; z-index: 2;
}

.captfyt-s6-featured-info {
    padding: 14px 16px 16px;
}

.captfyt-s6-featured-title {
    font-size: 16px; font-weight: 700;
    color: var(--captfyt-s6-title, #0f0f0f);
    line-height: 1.4; margin: 0 0 10px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.captfyt-s6-stats {
    font-size: 12.5px; color: var(--captfyt-s6-meta, #6b7280);
    margin: -6px 0 8px;
}

.captfyt-s6-featured-channel {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--captfyt-s6-meta, #6b7280);
}
.captfyt-s6-featured-channel svg { fill: #ff0000; flex-shrink: 0; }

.captfyt-s6-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Right: column height is synced to .captfyt-s6-featured's real height via JS (captfyt-playlist.js) — list + Load More button scroll together inside it. The max-height below is just a pre-JS fallback. */
.captfyt-s6-list-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    max-height: 480px !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}
.captfyt-s6-list-col::-webkit-scrollbar { width: 4px; }
.captfyt-s6-list-col::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }
.captfyt-s6-list {
    flex-shrink: 0;
    min-width: 0;
    padding: 8px 8px 8px 0;
}
.captfyt-s6-list-col .captfyt-load-more-wrap { flex-shrink: 0; margin-top: 12px; padding: 0 8px 12px 0; }

/* Theme-proof: no underline on playlist links (default, hover, focus, visited).
   Underline from a theme's `a` rule propagates to every child (title, channel,
   stats, index), so it must be killed on the <a> itself with higher specificity. */
.captfyt-s6-wrapper a,
.captfyt-s6-wrapper a:hover,
.captfyt-s6-wrapper a:focus,
.captfyt-s6-wrapper a:active,
.captfyt-s6-wrapper a:visited,
.captfyt-s6-wrapper a.captfyt-s6-item,
.captfyt-s6-wrapper a.captfyt-s6-item:hover,
.captfyt-s6-wrapper a.captfyt-s6-item:focus,
.captfyt-s6-wrapper a.captfyt-s6-featured-thumb,
.captfyt-s6-wrapper a.captfyt-s6-featured-thumb:hover {
    text-decoration: none !important;
    box-shadow: none;
}

/* List item */
.captfyt-s6-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    position: relative;
}
.captfyt-s6-item:hover { background: rgba(0,0,0,0.04); }

.captfyt-s6-thumb {
    flex: 0 0 120px;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #b2bec3;
}
.captfyt-s6-thumb img {
    width: 100%; height: auto; display: block;
    aspect-ratio: 16/9; object-fit: cover;
}

.captfyt-s6-list-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
}
.captfyt-s6-item:hover .captfyt-s6-list-play { opacity: 1; }

.captfyt-s6-list-duration {
    position: absolute; right: 4px; bottom: 4px;
    background: rgba(0, 0, 0, 0.8); color: #fff;
    font-size: 10px; font-weight: 600; line-height: 1;
    padding: 2px 4px; border-radius: 3px; z-index: 2;
}

.captfyt-s6-list-icon-pause { display: none; }
.captfyt-s6-playlist-item.active .captfyt-s6-list-play {
    opacity: 1;
    background: rgba(0,0,0,0.45);
}
.captfyt-s6-playlist-item.active .captfyt-s6-list-icon-play { display: none; }
.captfyt-s6-playlist-item.active .captfyt-s6-list-icon-pause { display: block; }

.captfyt-s6-info { flex: 1; min-width: 0; padding-top: 2px; }

.captfyt-s6-title {
    font-size: 12px; font-weight: 600;
    color: var(--captfyt-s6-title, #0f0f0f);
    line-height: 1.4; margin: 0 0 5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.captfyt-s6-ch {
    font-size: 11px; color: var(--captfyt-s6-meta, #6b7280);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}

.captfyt-s6-list-stats {
    font-size: 10.5px; color: var(--captfyt-s6-meta, #6b7280);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block; margin-top: 2px;
}

.captfyt-s6-idx {
    flex: 0 0 20px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
}
.captfyt-s6-idx-play { display: none; }
.captfyt-s6-item.active .captfyt-s6-idx-num { display: none; }
.captfyt-s6-item.active .captfyt-s6-idx-play {
    display: block;
    color: var(--captfyt-primary, #2271b1);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .captfyt-s6-wrapper { flex-direction: column; }
    .captfyt-s6-featured { flex: none; width: 100%; }
    .captfyt-s6-list-col { max-height: 320px !important; }
    .captfyt-s6-list { padding: 8px; }
}

/* Inline play — featured thumbnail plays in place when clicked */
.captfyt-inline-iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.captfyt-inline-close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; line-height: 0; }
.captfyt-inline-close:hover { background: rgba(0, 0, 0, 0.85); }

/* Playlist — highlight the currently-playing item in the side list */
.captfyt-s6-item.active {
    background: #eef3ff;
    border-radius: 8px;
}
.captfyt-s6-item.active .captfyt-s6-title {
    color: var(--captfyt-primary, #2271b1);
}
