
// Import bootstrap variables and mixins for reference
@import "../scss-bootstrap/functions";
@import "../scss-bootstrap/variables";
@import "../scss-bootstrap/mixins";
@import "variables";
@import "common";


@include gutenberg_styles();


.wp-block[data-align="full"] {
	width: 100%;
}

@include media-breakpoint-up(sm) {
	.wp-block[data-align="full"] {
		width: calc( 100% + 90px );
		max-width: calc( 100% + 90px );
	}
}

@include media-breakpoint-up(md) {
	.editor-writing-flow {
		max-width: 80%;
		margin: 0 10%;
	}

	.editor-post-title__block,
	.editor-default-block-appender,
	.editor-block-list__block {
		margin-left: 0;
		margin-right: 0;
	}

	.wp-block[data-align="wide"] {
		width: 100%;
	}

	.wp-block[data-align="full"] {
		position: relative;
		left: calc( -12.5% - 14px );
		width: calc( 125% + 116px );
		max-width: calc( 125% + 115px ); // Subtract 1px here to avoid the rounding errors that happen due to the usage of percentages.
	}

	.wp-block[data-align="right"] {
		max-width: 125%;
	}
}

/** === Editor Block Toolbar Position === */

// Since 2019 left-aligns wide and fullwide blocks, left align the toolbar too.
.editor-block-list__block[data-align="wide"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar,
.editor-block-list__block[data-align="full"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar {
		max-width: none;
}

	
/** === Change margin for gutenberg block === */
.editor-block-list__layout {
	.editor-default-block-appender > .editor-default-block-appender__content,
	> .editor-block-list__block > .editor-block-list__block-edit,
	> .editor-block-list__layout > .editor-block-list__block > .editor-block-list__block-edit {
		margin-top:$line_height_pad;
		margin-bottom:$line_height_pad;
		
		&:before {
			top:-8px;
			bottom:-8px;
		}
	}
}