.wp-block-coblocks-gallery-stacked {
	position: relative;
	text-align: center;

	&.alignleft,
	&.alignright {
		max-width: 305px;
	}

	&:not(.has-caption-color) {
		color: $gray-900 !important;
	}

	.coblocks-gallery {
		margin-left: 0;
		margin-top: 0;
		padding-left: 0;

		&.has-small-gutter li:not(:last-of-type) {
			margin-bottom: calc(var(--coblocks-spacing--1, #{map-get($spacing, 1)}) * 2);
		}

		&.has-medium-gutter li:not(:last-of-type) {
			margin-bottom: calc(var(--coblocks-spacing--2, #{map-get($spacing, 2)}) * 2);
		}

		&.has-large-gutter li:not(:last-of-type) {
			margin-bottom: calc(var(--coblocks-spacing--3, #{map-get($spacing, 3)}) * 2);
		}

		&.has-custom-gutter li:not(:last-of-type) {
			margin-bottom: calc(var(--coblocks-custom-gutter, 0) * 2);
		}
	}

	.coblocks-gallery--item {
		margin-bottom: 0;
		margin-left: auto;
		margin-right: auto;

		.coblocks-gallery--figure {
			margin-bottom: 0;
			margin-top: 0;
		}

		&:last-child {
			margin-bottom: 0;

			figure {
				margin-bottom: 0 !important;
			}

			figcaption {
				padding-bottom: 0;
			}
		}
	}

	&:not([style*="font-size"]):not([class*="font-size"]) .coblocks-gallery--caption {
		font-size: 13px;
	}

	.coblocks-gallery--caption {
		padding-bottom: 1em;
		padding-top: 1em;
		text-align: center;

		.is-selected &,
		.is-typing & {
			padding-left: 1em;
			padding-right: 1em;
		}
	}

	.has-fullwidth-images img {
		width: 100%;
	}

	.coblocks-video-bg {
		z-index: 1;
	}
}
