/**
 * Module: lp_youtube
 * Full-width YouTube section for landing pages
 */

/* ============================================
   LP YOUTUBE VIDEO
   ============================================ */

.t1-lp-youtube {
    padding: 5rem max(1.5rem, calc(50vw - var(--max-width) / 2 + 1.5rem));
}

/* Background variants */
.t1-lp-youtube--bg-cream {
    background: var(--cream);
}

.t1-lp-youtube--bg-white {
    background: var(--white);
}

.t1-lp-youtube--bg-pearl {
    background: var(--pearl);
}

.t1-lp-youtube--bg-ink {
    background: var(--ink);
}

.t1-lp-youtube--bg-ink .t1-lp-youtube__eyebrow {
    color: var(--jade-bright);
}

.t1-lp-youtube--bg-ink .t1-lp-youtube__heading {
    color: var(--white);
}

/* Header */
.t1-lp-youtube__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* Video wrapper */
.t1-lp-youtube__video {
    margin: 0 auto;
}

/* Max width variants */
.t1-lp-youtube__video--max-1280 {
    max-width: 1280px;
}

.t1-lp-youtube__video--max-1000 {
    max-width: 1000px;
}

.t1-lp-youtube__video--max-800 {
    max-width: 800px;
}

/* Container */
.t1-lp-youtube__container {
    position: relative;
    width: 100%;
    background: var(--ink);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Aspect ratios */
.t1-lp-youtube__video--16-9 .t1-lp-youtube__container {
    aspect-ratio: 16 / 9;
}

.t1-lp-youtube__video--21-9 .t1-lp-youtube__container {
    aspect-ratio: 21 / 9;
}

.t1-lp-youtube__video--4-3 .t1-lp-youtube__container {
    aspect-ratio: 4 / 3;
}

/* Thumbnail */
.t1-lp-youtube__thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.t1-lp-youtube__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
}

.t1-lp-youtube__container:hover .t1-lp-youtube__overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Play button */
.t1-lp-youtube__play {
    display: block;
    width: 80px;
    height: 56px;
    padding: 0;
    pointer-events: none;
    transition: transform 0.2s;
}

.t1-lp-youtube__container:hover .t1-lp-youtube__play {
    transform: scale(1.1);
}

.t1-lp-youtube__play-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.t1-lp-youtube__play-bg {
    transition: fill 0.2s, fill-opacity 0.2s;
}

.t1-lp-youtube__container:hover .t1-lp-youtube__play-bg {
    fill: #ff0000;
    fill-opacity: 1;
}

/* Privacy notice */
.t1-lp-youtube__notice {
    margin: 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    text-align: center;
    max-width: 90%;
    pointer-events: none;
}

/* Loaded state (iframe) */
.t1-lp-youtube__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.t1-lp-youtube__container--loaded {
    cursor: default;
}

/* Focus styles */
.t1-lp-youtube__container:focus {
    outline: 3px solid var(--jade);
    outline-offset: 4px;
}

.t1-lp-youtube__container:focus:not(:focus-visible) {
    outline: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .t1-lp-youtube {
        padding: 3rem 1.5rem;
    }
    
    .t1-lp-youtube__play {
        width: 68px;
        height: 48px;
    }
    
    .t1-lp-youtube__notice {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   LIGHT THEME OVERRIDE
   ======================================== */

.t1-lp-youtube--light .t1-lp-youtube__eyebrow {
    color: var(--jade);
}

.t1-lp-youtube--light .t1-lp-youtube__heading {
    color: var(--ink);
}