/* ============================================================
   Zendrop Video Playlist Widget
   Featured player + clickable playlist (Figma: video-overview)

   All rules are scoped under .elementor-widget-zendrop_video_playlist so the
   widget's own styling reliably beats the theme's global element styles
   (headings, paragraphs, lists, links, etc.).
   ============================================================ */

.elementor-widget-zendrop_video_playlist .zvp-wrapper {
    display: flex;
    gap: 48px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.elementor-widget-zendrop_video_playlist .zvp-wrapper *,
.elementor-widget-zendrop_video_playlist .zvp-wrapper *::before,
.elementor-widget-zendrop_video_playlist .zvp-wrapper *::after {
    box-sizing: border-box;
}

/* ---- Side (default desktop) layout ---- */
.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side {
    flex-direction: row;
    /* Stretch so the featured player matches the playlist column's height
       (Figma: left video and right playlist are the same height). */
    align-items: stretch;
}

/* In side layout the featured fills the row height instead of being locked
   to its aspect-ratio, so the left video equals the right playlist height. */
.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-featured {
    height: 100%;
    aspect-ratio: auto;
}

.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-featured-col {
    flex: 0 0 52%;
    max-width: 52%;
}

.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-playlist-col {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---- Stacked layout ---- */
.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-stacked {
    flex-direction: column;
    align-items: stretch;
}

.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-stacked .zvp-featured-col,
.elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-stacked .zvp-playlist-col {
    width: 100%;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-col {
    min-width: 0;
}

/* ============================================================
   Featured player
   ============================================================ */
.elementor-widget-zendrop_video_playlist .zvp-featured {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #14131a;
    cursor: pointer;
    isolation: isolate;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 35%,
        rgba(0, 0, 0, 0.82) 100%
    );
    z-index: 1;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    pointer-events: none;
    max-width: 80%;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-caption .zvp-eyebrow {
    margin: 0;
    color: #9da0a9;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.28px;
}

.elementor-widget-zendrop_video_playlist .zvp-featured-caption .zvp-title {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.4px;
}

/* Active inline player (video / iframe injected here) */
.elementor-widget-zendrop_video_playlist .zvp-player {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: #000;
    display: none;
}

.elementor-widget-zendrop_video_playlist .zvp-featured.is-playing .zvp-player {
    display: block;
}

.elementor-widget-zendrop_video_playlist .zvp-featured.is-playing .zvp-featured-thumb,
.elementor-widget-zendrop_video_playlist .zvp-featured.is-playing .zvp-featured-overlay,
.elementor-widget-zendrop_video_playlist .zvp-featured.is-playing .zvp-featured-caption {
    opacity: 0;
    pointer-events: none;
}

.elementor-widget-zendrop_video_playlist .zvp-player video,
.elementor-widget-zendrop_video_playlist .zvp-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    background: #000;
}

/* ============================================================
   Playlist
   ============================================================ */
.elementor-widget-zendrop_video_playlist .zvp-playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.elementor-widget-zendrop_video_playlist .zvp-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    cursor: default;
    border-radius: 12px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.elementor-widget-zendrop_video_playlist .zvp-item::before {
    content: none;
}

/* Hide the currently-featured item from the list when enabled */
.elementor-widget-zendrop_video_playlist .zvp-wrapper[data-hide-active="1"] .zvp-item.is-active {
    display: none;
}

.elementor-widget-zendrop_video_playlist .zvp-item-thumb {
    position: relative;
    flex: 0 0 106px;
    width: 106px;
    /* Figma playlist thumbnails are ~101x65 (3:2), taller than the 16:9 player. */
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: #14131a;
}

.elementor-widget-zendrop_video_playlist .zvp-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.elementor-widget-zendrop_video_playlist .zvp-item-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.elementor-widget-zendrop_video_playlist .zvp-item-text .zvp-eyebrow {
    margin: 0;
    color: #9da0a9;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.28px;
}

.elementor-widget-zendrop_video_playlist .zvp-item-text .zvp-title {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.32px;
}

/* ============================================================
   Responsive — mobile stacks featured over playlist
   ============================================================ */
@media (max-width: 1024px) {
    .elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side {
        flex-direction: column;
        align-items: stretch;
    }

    /* Force full width when stacked. !important + width override beats the
       per-instance "Featured Width" control (which outputs flex/max-width at
       element specificity with no mobile bound). */
    .elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-featured-col,
    .elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-playlist-col {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Stacked: the featured returns to a normal full-width 16:9 video. */
    .elementor-widget-zendrop_video_playlist .zvp-wrapper.zvp-layout-side .zvp-featured {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 767px) {
    .elementor-widget-zendrop_video_playlist .zvp-wrapper {
        gap: 24px;
    }

    .elementor-widget-zendrop_video_playlist .zvp-featured-caption {
        padding: 16px;
    }

    .elementor-widget-zendrop_video_playlist .zvp-featured-caption .zvp-title {
        font-size: 16px;
        letter-spacing: -0.32px;
    }

    .elementor-widget-zendrop_video_playlist .zvp-playlist {
        gap: 16px;
    }
}
