.coblocks-gallery--item {
	margin: 0;

	> .components-spinner {
		left: 50%;
		margin-left: -9px;
		margin-top: -9px;
		position: absolute;
		top: 50%;
	}

	figure:focus {
		outline: none;
	}

	img:focus {
		border-radius: $radius-block-ui;
		outline: none;
	}

	.is-selected::after {
		border-radius: $radius-block-ui;
		bottom: 0;
		box-shadow: 0 0 0 $border-width $white, 0 0 0 3px var(--wp-admin-theme-color, #007cba);
		content: "";
		left: 0;
		pointer-events: none;
		position: absolute;
		right: 0;
		top: 0;
		z-index: 1;
	}

	.is-transient img {
		opacity: 0.3;
	}

	.block-editor-rich-text {
		z-index: 2;
	}

	.components-coblocks-gallery-item__image-link ~ .coblocks-gallery--caption {
		bottom: 3em;
	}

}

.has-caption-color .coblocks-gallery--caption a {
	color: inherit !important;
}

// Hide selected state from core/gallery block.
[data-type="core/gallery"].block-editor-block-list__block {
	::after {
		box-shadow: none !important;
	}

	figure.is-selected::before {
		pointer-events: none;
	}
}
