/* FILE: global/wp/_alignment.scss */

.align-horizontal-wrap {
	margin-bottom: 0;
}

.alignleft,
.alignright {

	&,
	&:last-child {
		margin-bottom: 1em;
	}

}

.alignleft {
	float: left;

	&,
	[class^=wp-block-] & {
		margin-right: 1em;

		@include media( map_get( $breakpoint, 'l' ) ) {
			margin-right: 2em;
		}

	}

}

.alignright {
	float: right;

	&,
	[class^=wp-block-] & {
		margin-left: 1em;

		@include media( map_get( $breakpoint, 'l' ) ) {
			margin-left: 2em;
		}

	}

}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.alignnone {
	margin-left: 0;
	margin-right: 0;
}

.alignfull,
.alignwide-wrap {
	clear: both;
	position: relative;
	width: calc( 100vw - var(--scrollbar_width) );
	max-width: calc( 100vw - var(--scrollbar_width) );
	margin-#{$left}: calc( 50% - 50vw + ( var(--scrollbar_width) / 2 ) );
	z-index: 1; // This is for when using negative top margin to stack up over the Cover block overlay.

	.has-widgets-in-sidebar & {
		@include media( map_get( $breakpoint, 'l' ) ) {
			width: auto;
			margin-#{$left}: calc( ( 50% / ( 1 - var(--sidebar_width) ) ) - 50vw + ( var(--scrollbar_width) / 2 ) );
		}
	}

}

.alignwide {
	width: var(--layout_width_content);
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;

	&-wrap {
		padding-left: 6vw;
		padding-right: 6vw;

		&:not(:last-child) .alignwide {
			margin-bottom: $golden +em;
		}

		.has-widgets-in-sidebar & {
			@include media( map_get( $breakpoint, 'l' ) ) {
				padding-#{$right}: 0;
			}
		}

	}

}

.is-singular:not([class*="-template-content-only"]):not(.has-primary-title) .entry-content-singular > .alignfull:first-child {
	margin-top: var(--content_padding_negative);
}

.is-singular:not([class*="-template-content-only"]) .entry-content-singular > .alignfull:last-child {
	margin-bottom: var(--content_padding_negative);
}
