/**
 * Lite YouTube Embed — CSS-only facade
 * Shows a thumbnail + play button; loads the real iframe on click.
 * Eliminates ~500KB+ of YouTube JS per embed on initial page load.
 */

lite-youtube {
    background-color: #000;
    position: relative;
    display: block;
    contain: content;
    background-position: center center;
    background-size: cover;
    cursor: pointer;
}

/* Gradient overlay for play button visibility */
lite-youtube::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    background-image: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 35%);
    height: 100%;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Responsive 16:9 ratio */
lite-youtube::after {
    content: '';
    display: block;
    padding-bottom: 56.25%;
}

/* Play button */
lite-youtube > .lyt-playbtn {
    display: block;
    width: 68px;
    height: 48px;
    position: absolute;
    cursor: pointer;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath d='M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55C3.97 2.33 2.27 4.81 1.48 7.74.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z' fill='%23f00'/%3E%3Cpath d='M45 24L27 14v20' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    transition: filter 0.1s ease;
}

lite-youtube:hover > .lyt-playbtn,
lite-youtube .lyt-playbtn:focus {
    filter: brightness(1.1);
}

/* Activated state — iframe is loaded */
lite-youtube.lyt-activated {
    cursor: unset;
}

lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated > .lyt-playbtn {
    opacity: 0;
    pointer-events: none;
}

/* Inside video-responsive wrapper (keep aspect ratio from wrapper) */
.video-responsive lite-youtube::after {
    display: none;
}

.video-responsive lite-youtube {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Netflix trailer has its own wrapper */
.netflix-trailer-embed lite-youtube {
    width: 100%;
}
