.coblocks-layout-selector .block-editor-block-list__layout .block-editor-block-list__block.is-focus-mode:not(.is-multi-selected) {
	opacity: 1 !important;
}

.coblocks-layout-selector .coblocks-layout-selector__layout .block-editor-block-preview__container.editor-styles-wrapper {
	--go--font-size: 0.5rem;
	--go-button--font-size: 0.5rem;
	--go--viewport-basis: 1800;
	--editor-max-w-base: 400px;
	--editor-max-w-wide: 85%;

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin-left: auto !important;
		margin-right: auto !important;
	}

	.block-editor-block-list__layout .wp-block:not([data-type="core/heading"]):first-of-type {
		margin-top: 0 !important;
	}

	.block-editor-block-list__layout .wp-block:not([data-type="core/heading"]):last-of-type {
		margin-bottom: 0 !important;
	}

	[data-type="core/paragraph"] {
		font-size: 0.75rem;
	}
}

.coblocks-layout-selector-modal {
	background-color: $gray-100;
	height: 85vh;
	position: relative;
	width: 100%;

	@include break-medium() {
		max-width: 1200px;
	}

	.components-modal__content {
		height: auto;
		padding: 0;
	}

	.components-modal__header {
		background-color: $gray-100;
		border-bottom: none;
		height: 85px;
		margin: 0;
		padding: 0;
		z-index: 15;

		@include break-medium() {
			background-color: $white;
		}

		.components-button {
			left: inherit;
			position: relative;
			right: 1em;

			@include break-medium() {
				right: 3em;
			}
		}

		.components-modal__header-heading-container {
			height: 100%;

			.components-modal__header-heading {
				background-color: $gray-100;
				display: flex;
				flex-direction: column;
				font-size: 1rem;
				height: 100%;
				justify-content: center;
				margin: 0;
				padding: 0 24px;
				width: 100%;

				@include break-medium() {
					flex-direction: row;
					justify-content: flex-start;
					padding: 0;
					width: 250px;
				}

				> div {
					@include break-medium() {
						align-self: center;
						flex: 1 0 auto;
						padding: 0 0 0 24px;
					}
				}

				> span {
					display: block;
					font-size: 14px;
					font-weight: 400;
					margin-top: 0.8em;

					@include break-medium() {
						align-self: center;
						flex: 1 0 auto;
						left: calc(150px + 5%);
						margin-bottom: 13px;
						position: relative;
					}
				}
			}
		}
	}
}

[data-type="core/buttons"] {

	.block-list-appender {
		margin-bottom: 0;
		position: relative;
		top: -10px;
	}
}

[data-type="core/buttons"]:not(.is-selected):not(.has-child-selected) {

	.block-list-appender {
		display: none !important;
	}
}

.coblocks-layout-selector {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	justify-content: space-around;

	@include break-medium() {
		flex-direction: row;
	}

	&__sidebar {
		// Display only on desktop (>= 782px) using isViewportMatch

		display: none;
		padding: 0 0 0 24px;
		position: -webkit-sticky;
		position: sticky;
		top: 12px;
		width: 250px;

		@include break-medium() {
			display: block;
		}

		&__items {
			font-size: 16px;
			margin-bottom: 2.5em;
			margin-top: 0;
		}

		&__item {
			margin-bottom: 0.85em;

			> a {
				color: $gray-900;
				text-decoration: none;

				&:hover,
				&:focus,
				&.is-selected {
					box-shadow: none;
					color: $godaddy-everyday-blue-500;
					outline: none;
				}
			}
		}
	}

	&__topbar {
		// Display only on mobile (< 782px) using isViewportMatch

		align-items: flex-end;
		display: flex;
		justify-content: space-between;
		padding: 12px 24px;
		width: 100%;

		.components-dropdown-menu__toggle {

			&:hover {
				border: 0;
				box-shadow: none !important;
			}
		}

		&__left {
			display: flex;
			flex-direction: column;

			&__settings {
				.coblocks-layout-selector__dropdown-button.is-link {
					font-size: 1.1em;
					margin-top: 0;
				}
			}

			&__category {
				align-items: center;
				display: flex;

				> strong {
					display: inline-block;
					margin-right: 0.5em;
				}
			}
		}

		&__right {
			position: relative;
			top: -4px;
		}
	}

	&__add-button {
		align-items: center;
		color: $gray-900 !important;
		display: inline-flex;
		font-weight: 500;
		height: 28px;
		min-width: 28px;
		text-decoration: none !important;
		transition-duration: 0;
		vertical-align: middle;

		> span {
			align-items: center;
			background-color: $gray-900;
			border-radius: $radius-block-ui;
			color: $white;
			display: inline-flex;
			height: 28px;
			justify-content: center;
			margin-right: 8px;
			min-width: 28px;
			position: relative;
			transition: all 0.1s;
			vertical-align: middle;
			width: 28px;
		}

		&:hover,
		&:focus {
			box-shadow: none;
			color: $godaddy-everyday-blue-500 !important;
			outline: none;

			> span {
				background-color: $godaddy-everyday-blue-500;
				color: $white;
			}
		}
	}

	&__content {
		background: $white;
		flex-grow: 1;
		overflow-y: auto;
		padding: 24px !important;
		width: 100%;

		@include break-medium() {
			padding: 0 48px 24px !important;
			width: auto;
		}

		> span {
			align-items: center;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			margin: 0 0 0 6%;
			padding: 20px 0;
		}
	}

	&__layouts {
		column-count: 1;
		column-gap: 1em;
		padding-top: 1em;

		@include break-small() {
			column-count: 2;
			column-gap: 2em;
		}
		@include break-medium() {
			column-count: 1;
		}
		@include break-large() {
			column-count: 2;
		}
	}

	&__layout-preview-container {
		margin: 2em;
		width: 100%;
	}

	&__layout {
		background-color: var(--go--color--background, $white);
		border-radius: $radius-block-ui;
		height: auto;
		margin-bottom: 2rem;
		min-height: 150px;
		padding: 0;
		position: relative;
		text-decoration: none;
		width: 100%;

		@media (max-width: 1024px) {
			margin-right: 0;
			max-width: 100%;
		}

		.block-editor-block-preview__container {
			background-color: var(--go--color--background, $white);
			position: relative;
			z-index: 10;

			&:hover {
				cursor: pointer;
			}
		}

		.components-spinner {
			left: 50%;
			margin: 0;
			position: absolute;
			transform: translateX(-50%);
			z-index: 1;
		}

		// Safari-only hack. Welcome back to 2005.
		// Hide spinner because there is a bug with how Safari is rendering column-count
		@media not all and ( min-resolution: 0.001dpcm ) {
			@supports ( -webkit-appearance: none ) {
				.components-spinner {
					display: none;
				}
			}
		}

		&::after {
			border: 1px solid rgba(0, 0, 0, 0.15);
			border-radius: $radius-block-ui;
			content: "";
			height: 100%;
			position: absolute;
			width: 100%;
			z-index: 1;
		}

		&:hover {
			box-shadow: 0 0 0 1px $white, 0 0 0 3px $godaddy-everyday-blue-500;
		}

		&.is-placeholder {
			align-items: center;
			justify-content: center;
		}

		&:hover,
		&:focus {
			outline: none;
		}
	}
}
