/**
 * Styles for the <apc-youtube> lazy-loading YouTube embed facade.
 *
 * Self-contained: builds its own 16:9 aspect-ratio box by default so it
 * sizes itself sensibly wherever dropped. On this site the element also
 * carries the page's existing .mainVideoIframe / .allVideoIframe classes so
 * it keeps the exact width/height those rules already set; the override
 * below lets that fixed height win over the default aspect-ratio box.
 */

apc-youtube {
    display: block;
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

apc-youtube.mainVideoIframe,
apc-youtube.allVideoIframe {
    max-width: none;
    aspect-ratio: auto;
}

.apc-youtube__fallback {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.apc-youtube__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apc-youtube__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.apc-youtube__play-icon {
    width: 56px;
    height: 56px;
    transition: transform 0.15s ease;
}

.apc-youtube__fallback:hover .apc-youtube__play-icon,
.apc-youtube__fallback:focus-visible .apc-youtube__play-icon {
    transform: scale(1.08);
}

.apc-youtube--activated .apc-youtube__fallback {
    display: none;
}

apc-youtube iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
