/*
 * Lodrette YouTube Shorts (9:16).
 * Klassen .block-oembed--short og parameteren skov_short=1 sættes i PHP,
 * når videolinket er et shorts-link (youtube.com/shorts/ID).
 * Håndskrevet fil, ikke en del af gulp-bygningen.
 */

/*
 * Video-blok og medarbejdervideoer: lodret ramme.
 * Computer: skalerer efter skærmens højde (ca. 80 %), så hele videoen
 * altid kan ses uden at scrolle. Mobil: fuld bredde.
 */
.block-oembed--short .block-oembed__inner {
    width: 100%;
    max-width: min(100%, calc(80vh * 9 / 16));
    margin-left: auto;
    margin-right: auto;
}

@supports (height: 1svh) {
    .block-oembed--short .block-oembed__inner {
        max-width: min(100%, calc(80svh * 9 / 16));
    }
}

@media (max-width: 767px) {
    .block-oembed--short .block-oembed__inner {
        max-width: 100%;
    }
}

.block-oembed--short .oembed__thumbnail {
    padding-top: calc((100% / 9) * 16);
}

/* Afspilning direkte i blokken */
.block-oembed--short .oembed__inline-wrapper iframe {
    aspect-ratio: 9 / 16;
    height: auto;
}

/* Afspilning i overlay (fuld skærm) */
.overlay-embed__inner > figure.oembed__inline-wrapper iframe[src*="skov_short=1"] {
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 9 / 16;
}
