/*
 * Make sure that content respects the root padding
 */
.wp-block-media-text .wp-block-media-text__content {
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/*
 * Since the block doesn't use the .has-media-on-the-left anymore, we have to
 * treat the default content as if it had the class assigned.
 *
 * Make sure the content sticks to the left and abides by the container width.
 */
/*.wp-block-media-text.has-media-on-the-left .wp-block-media-text__content,*/
.wp-block-media-text .wp-block-media-text__content {
	margin-right: auto;
	max-width: calc( ( var(--wp--style--global--wide-size) / 2 ) - var(--wp--style--root--padding-right) );
}

/*
 * Make sure the content sticks to the right and abides by the container width.
 */
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
	margin-left: auto;
	margin-right: 0;
	max-width: calc( ( var(--wp--style--global--wide-size) / 2 ) - var(--wp--style--root--padding-left) );
}

/*
 * Make sure the blocks within the content abides by block spacing.
 */
.wp-block-media-text .wp-block-media-text__content > * {
	margin-top: var(--wp--style--block-gap);
	margin-bottom: 0;
}
.wp-block-media-text .wp-block-media-text__content > *:last-child {
	margin-bottom: var(--wp--style--block-gap);
}