/**
 * #.# Editor Styles
 *
 * CSS for just Backend enqueued after style.scss
 * which makes it higher in priority.
 */

.c9-equal-height-check {
	> div {
		position: absolute;
		left: -10000em;
		display: block;
	}
}

body:not(.folded)
	.is-sidebar-opened
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container
	.c9-carousel.container,
body.folded
	.is-sidebar-opened
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container
	.c9-carousel.container,
body
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container
	.c9-carousel.container,
body
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container-fluid
	.c9-carousel.container,
body
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container-narrow
	.c9-carousel.container,
body
	.editor-styles-wrapper
	.wp-block[data-type='c9-blocks/grid']
	.container
	.wp-block[data-type='c9-blocks/carousel']
	.c9-image-carousel.container {
	min-width: auto !important;
}

.c9-carousel
	.container
	.c9-layout-column-wrap-admin
	> .block-editor-inner-blocks
	> .block-editor-block-list__layout,
.c9-carousel
	.container-narrow
	.c9-layout-column-wrap-admin
	> .block-editor-inner-blocks
	> .block-editor-block-list__layout,
.c9-carousel
	.container-fluid
	.c9-layout-column-wrap-admin
	> .block-editor-inner-blocks
	> .block-editor-block-list__layout {
	display: -ms-grid;
	display: grid;
}

.c9-carousel {
	.hide-indicator {
		display: none;
	}

	.carousel-item {
		margin-top: 0px;
		margin-bottom: 0px;
	}

	.carousel-inner {
		padding-top: 0px;
		padding-bottom: 0px;

		> .editor-inner-blocks > .editor-block-list__layout {
			display: flex;
			margin: 10px 0px 0px 0px;
		}

		.c9-carousel-slide .editor-inner-blocks > .editor-block-list__layout {
			display: block;
		}

		.c9-carousel-slide
			.editor-inner-blocks
			> .editor-block-list__layout
			div[data-type='c9-blocks/column-container']
			.c9-column-container
			> .c9-layout-column-wrap-admin
			> .editor-inner-blocks
			> .editor-block-list__layout {
			display: flex;
		}
	}

	.carousel-indicators {
		/* fix for resizable being selectable */
		z-index: -1 !important;
	}
}

/*this should be overwritten by a carousel slide setting for how many slides are shown at once or how many columns in the slide are visible at once*/
.c9-carousel [data-type='c9-blocks/carousel-slide'],
.c9-carousel .c9-carousel-slide {
	min-width: 100%;
}

@media only screen and (min-width: 600px) {
	.edit-post-visual-editor
		.c9-layout-column-wrap-admin
		.c9-block-layout-column
		> .c9-column-innner
		.wp-block[data-type='c9-blocks/carousel'],
	.edit-post-visual-editor
		.c9-layout-column-wrap-admin
		.c9-block-layout-column
		> .c9-column-innner
		.wp-block[data-type='c9-blocks/carousel-slide'] {
		margin-left: 0px;
		margin-right: 0px;
	}
}

.carousel-control-next {
	right: 0px;
}

.is-hovered .carousel-control-prev,
.is-hovered .carousel-control-next,
.is-selected .carousel-control-prev,
.is-selected .carousel-control-next,
.has-child-selected .carousel-control-prev,
.has-child-selected .carousel-control-next {
	border: 2px dashed var(--wp-admin-theme-color);
	background-color: rgba(12, 12, 12, 0.4);
	z-index: 22;
}

.is-selected .carousel-control-prev,
.is-selected .carousel-control-next {
	border: 2px dashed #fff;
}

.carousel-control-prev {
	left: 0px;
}

.edit-post-layout
	.block-editor-block-list__layout.is-root-container
	.c9-carousel
	.wp-block[data-type='c9-blocks/column-container'] {
	margin-top: 0px;
	margin-bottom: 0px;
}

@media only screen and (min-width: 600px) {
	.edit-post-layout
		.block-editor-block-list__layout.is-root-container
		.c9-carousel
		.wp-block:not(.wp-block-button) {
		margin-top: 0px;
		margin-bottom: 0px;
	}
}

@media only screen and (min-width: 1200px) {
	body
		.editor-styles-wrapper
		.is-root-container
		.c9-carousel
		.wp-block[data-type='c9-blocks/grid']
		body.folded.post-type-page
		.is-sidebar-opened
		.editor-styles-wrapper
		.is-root-container
		.c9-carousel
		.wp-block[data-type='c9-blocks/grid'] {
		margin-left: 0;
		margin-right: 0;
	}
}

@media only screen and (min-width: 1500px) {
	body.folded
		.is-sidebar-opened
		.editor-styles-wrapper
		.wp-block[data-type='c9-blocks/grid'],
	body
		.editor-styles-wrapper
		.is-root-container
		.c9-carousel
		.wp-block[data-type='c9-blocks/grid']
		body.folded.post-type-page
		.is-sidebar-opened
		.editor-styles-wrapper
		.is-root-container
		.c9-carousel
		.wp-block[data-type='c9-blocks/grid'] {
		margin-left: 0;
		margin-right: 0;
	}
}

@media only screen and (min-width: 1200px) {
	.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='narrow']
		[data-align='narrow'],
	.editor-styles-wrapper [data-type='c9-blocks/carousel'][data-align='narrow'],
	.editor-styles-wrapper .wp-block[data-align='narrow'] .c9-carousel {
		max-width: 960px;
		margin-left: auto;
		margin-right: auto;
	}

	.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide']
		[data-align='wide'],
	.editor-styles-wrapper [data-type='c9-blocks/carousel'][data-align='wide'],
	.editor-styles-wrapper .wp-block[data-align='wide'] .c9-carousel {
		max-width: calc(100vw - 260px);
		width: 120%;
		margin-left: auto;
		margin-right: auto;
	}

	.is-sidebar-opened
		.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide']
		[data-align='wide'],
	.is-sidebar-opened
		.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide'],
	.is-sidebar-opened
		.editor-styles-wrapper
		.wp-block[data-align='wide']
		.c9-carousel {
		max-width: 100%;
		width: 100%;
	}
}

@media only screen and (min-width: 1500px) {
	.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide']
		[data-align='wide'],
	.editor-styles-wrapper [data-type='c9-blocks/carousel'][data-align='wide'],
	.editor-styles-wrapper .wp-block[data-align='wide'] .c9-carousel {
		max-width: 1368px;
	}
}

@media only screen and (min-width: 1628px) {
	.is-sidebar-opened
		.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide']
		[data-align='wide'],
	.is-sidebar-opened
		.editor-styles-wrapper
		[data-type='c9-blocks/carousel'][data-align='wide'],
	.is-sidebar-opened
		.editor-styles-wrapper
		.wp-block[data-align='wide']
		.c9-carousel {
		max-width: 1368px;
		width: 120%;
	}
}
