@use 'sass:math' as math;

$-aspect-height: 9;
$-aspect-width: 16;

@mixin -embed-container($height, $width) {
    padding-bottom: math.percentage(math.div($height,$width));
}

.embed-container {
    @include -embed-container($-aspect-height, $-aspect-width);
    position: relative;
    height: 0;
    overflow: hidden;
    max-width: 100%;

    iframe,
    object,
    embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}