// core/group
//
// @since    1.0.0
// @version  2.0.0
@use 'sass:map';

@import '../_tools/_index';
@import '../_setup/_index';

.wp-block-group {
	// In block editor, the default value is empty,
	// but visual pointer is clearly at `50% 50%` value.
	// However, CSS default is `0% 0%`, so we need to
	// reset the default value here.
	background-position: 50% 50%;
}

.is-layout-flex {

	> * {
		max-width: 100%;
	}

	// Helper classes to set children width on mobile devices.
	@for $i from 2 through 4 {

		&.has-#{$i}-columns-mobile > * {

			@include media( ( map.get( $breakpoint, 'm' ), 'max-width' ) ) {
				flex-basis: calc( 100% / #{$i} - #{ $i - 1 } / #{$i} * var(--wp--style--block-gap) );
			}
		}
	}
}
