/* Video-Einbettungen (YouTube/Vimeo): Vorschaubild mit Play-Symbol, der Player wird
 * erst nach dem Klick geladen (Muster wie doitss6 .video-placeholder).
 * Markup erzeugt VideoClickToLoadFilter (fski/code/extras/VideoClickToLoadFilter.php),
 * Verhalten themes/<theme>/javascript/video-embed.js. */
.video-embed {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: .5rem;
    cursor: pointer;
}
@supports not (aspect-ratio: 16 / 9) {
    .video-embed { height: 56.25vw; max-height: 480px; }
}
.video-embed img {
    /* absolut: stoerende Inline-Huellen im CMS-HTML (z. B. ein offenes <strong>) erzeugen sonst eine Leerzeile ueber dem Bild */
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    opacity: .85;
    transition: opacity .2s;
}
.video-embed:hover img,
.video-embed:focus img { opacity: .7; }
.video-embed:focus-visible { outline: 3px solid #f59000; outline-offset: 2px; }
/* ohne Vorschaubild: dunkle Flaeche mit Play-Symbol */
.video-embed--nothumb { background: #2b323b; }

.video-embed__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72'%3E%3Ccircle cx='36' cy='36' r='34' fill='rgba(0,0,0,.55)' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M29 22l22 14-22 14z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
    transition: transform .2s;
}
.video-embed:hover .video-embed__play,
.video-embed:focus .video-embed__play { transform: translate(-50%, -50%) scale(1.1); }

.video-embed__notice {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .4rem .75rem;
    font-size: .7rem;
    line-height: 1.3;
    color: #fff;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
    pointer-events: none;
}

/* nach dem Klick: der Player fuellt die 16:9-Box (absolut, siehe Bild) */
.video-embed.is-loaded { cursor: default; background: #000; }
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* das oEmbed-Wrapper-Div darf die Breite nicht begrenzen */
.media.leftAlone:has(> .video-embed) { width: 100%; float: none; }
