.cyvp-vimeo-wrapper,
figure.kern-video .video-wrapper {
    position: relative;
    width: 100%;
}

.cyvp-vimeo-wrapper iframe {
    max-width: 100%;
}

/* INITIAL STATE
   Keep .video-wrapper in the layout because it provides the video card's
   width, height and aspect ratio. Hide only the CookieYes placeholder itself.
   The theme thumbnail, scrim and original play button remain visible. */
figure.kern-video.cyvp-before-click .video-wrapper {
    display: block !important;
    visibility: visible !important;
}

figure.kern-video.cyvp-before-click [data-cky-tag="video-placeholder"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

figure.kern-video.cyvp-before-click .kern-video__image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

figure.kern-video.cyvp-before-click .kern-video__button,
figure.kern-video.cyvp-before-click .kern-video__scrim {
    visibility: visible !important;
    opacity: 1 !important;
}

/* AFTER THE THEME PLAY BUTTON IS CLICKED
   Reveal the CookieYes notice over the same thumbnail. */
figure.kern-video.cyvp-after-click .video-wrapper {
    display: block !important;
    visibility: visible !important;
}

figure.kern-video.cyvp-after-click [data-cky-tag="video-placeholder"],
.cyvp-vimeo-wrapper [data-cky-tag="video-placeholder"] {
    position: relative !important;
    max-width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

figure.kern-video.cyvp-after-click [data-cky-tag="placeholder-title"],
.cyvp-vimeo-wrapper [data-cky-tag="placeholder-title"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    box-sizing: border-box;
    width: auto !important;
    max-width: 500px !important;
    margin: 0 !important;
    padding: 15px 20px !important;
    text-align: center !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    color: #fff !important;
    border: 0 !important;
    z-index: 2;
}

/* Remove the theme overlay only after its original play button is clicked. */
figure.kern-video.cyvp-after-click .kern-video__image {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


/* v1.1.9: keep the theme play button centered before and after consent updates.
   The anchor is the stable positioning container in the kern-video markup. */
figure.kern-video > a[role="button"] {
    position: relative !important;
}

figure.kern-video > a[role="button"] .kern-video__button,
figure.kern-video .kern-video__image .kern-video__button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    z-index: 20 !important;
}
