@use "../1-helpers/functions";

#main-container {
	display: flex;
	flex-direction: column;
	position: relative;
	min-height: calc(100vh - var(--admin-bar, 0px) - var(--theme-frame-size, 0px) * 2);

	overflow: hidden; // to remove later, check caniuse.com
	overflow: clip;

	.site-main {
		flex-grow: 1;
	}
}



// Layout containers
[class*='ct-container'] {
	margin-inline: auto;
}

.ct-container,
.ct-container-narrow {
	width: var(--theme-container-width);
}


// Default container
.ct-container {
	max-width: var(--theme-normal-container-max-width);
}


// Narrow container
.ct-container-narrow {
	max-width: var(--theme-narrow-container-max-width);
}


// Fluid container
.ct-container-fluid {
	width: calc(var(--theme-container-edge-spacing) - var(--theme-frame-size, 0px) * 2);

	@include functions.media-breakpoint-up (lg) {
		--theme-container-edge-spacing: calc(100vw - 60px);
	}
}


// Constrained layout
.is-layout-constrained {

	> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
		width: var(--theme-block-width);
	}
}


// Constrained width
.is-width-constrained {
	margin-inline: auto;
	width: var(--theme-container-width);
	max-width: var(--theme-block-max-width);
}



// Page verticla spacing
[data-vertical-spacing*='top'] {
	padding-top: var(--theme-content-vertical-spacing);
}

[data-vertical-spacing*='bottom'] {
	padding-bottom: var(--theme-content-vertical-spacing);
}