@use 'sass:math';

@use 'variables' as *;
@use 'toolkit' as *;
@use 'include-media' as *;

embed,
iframe,
img,
object,
video,
.wp-caption {
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	margin: 0;
}

a.aligncenter img {
	display: block;
	margin: 0 auto;
}

a.alignnone {
	display: inline-block;
}

.alignleft {
	float: left;
	text-align: left;
}

.alignright {
	float: right;
	text-align: right;
}

img.centered,
.aligncenter {
	display: block;
	margin: 0 auto $spacer;
}

img.alignnone,
.alignnone {
	margin-bottom: $spacer;
}

a.alignleft,
img.alignleft,
.wp-caption.alignleft {
	margin: 0 $spacer $spacer 0;
}

a.alignright,
img.alignright,
.wp-caption.alignright {
	margin: 0 0 $spacer $spacer;
}

.wp-caption {
	p {
		margin-bottom: 0;
	}
}

.wp-caption-text {
	@include type;
	margin: 0;
	text-align: center;
}

.wp-audio-shortcode,
.wp-playlist,
.wp-video {
	margin: 0 0 $spacer;
}

iframe {

	&[src*='player.vimeo.com'],
	&[src*='youtube.com'],
	&[src*='youtube-nocookie.com'] {
		display: block;
		aspect-ratio: 16 / 9;
		width: 100%;
		height: auto;
	}
}