/*
 * Video Embeds — sjablonen kunnen bijsturen via custom properties:
 *   --videoembeds-spacing      ruimte onder de embed            (1.5em)
 */

.videoembeds {
    margin-block-end: var(--videoembeds-spacing, 1.5em);
    max-width: 100%;
}

.videoembeds iframe,
.videoembeds video {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
}

.videoembeds iframe {
    aspect-ratio: var(--videoembeds-ratio, 16 / 9);
}

.videoembeds video {
    aspect-ratio: var(--videoembeds-ratio, auto);
}

/* Vaste hoogte met flexibele breedte (bijv. SoundCloud). */
.videoembeds--fixed iframe {
    aspect-ratio: auto;
    height: var(--videoembeds-height, 166px);
}

/* Facade: thumbnail + play-knop; de echte iframe komt pas na een klik. */
.videoembeds__play {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--videoembeds-ratio, 16 / 9);
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

/* Vimeo-facade zonder (of voordat de) thumbnail: donker vlak met lichte glans. */
.videoembeds--vimeo .videoembeds__play {
    background: linear-gradient(135deg, #1a2b34 0%, #0b1217 100%);
}

.videoembeds__play img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.videoembeds__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 48px;
    margin: -24px 0 0 -34px;
    border-radius: 12px;
    background: rgb(0 0 0 / .75);
    transition: background-color .15s;
}

.videoembeds__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -6px;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
}

.videoembeds__play:hover .videoembeds__icon,
.videoembeds__play:focus-visible .videoembeds__icon {
    background: #f00;
}

.videoembeds__play:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}
