/**
 * #.# Editor Styles
 *
 * CSS for just Backend enqueued after style.scss
 * which makes it higher in priority.
 */
.editor-styles-wrapper .is-root-container [data-type="c9-blocks/toggles-toggle"],
.editor-styles-wrapper .c9-grid [data-type="c9-blocks/toggles-toggle"] {
	margin-top: 0px;
	margin-bottom: 0px;
}

.c9-toggles {
	.c9-toggles-item-collapse {
		width: 28px;
	}

	div[data-type="c9-blocks/toggles-toggle"] {
		.c9-toggles-item-heading {
			.block-editor-rich-text .components-autocomplete {
				display: flex;
			}
		}
	}

	&.c9-toggles-reverse {
		.c9-toggles-item-heading {
			.block-editor-rich-text {
				margin-left: 16px;
			}
		}
	}
}

.c9-toggles-add-item {
	>.components-button.components-icon-button {
		margin: 0 auto;
	}

	margin-top: 25px;
	padding-bottom: 20px;
}

.c9-component-remove-button {
	position: absolute;
	align-items: center;
	justify-content: center;
	top: 0;
	right: 0;
	width: 20px;
	height: 20px;
	padding: 0 !important;
	margin-top: -10px;
	margin-right: -10px;
	color: #fff;
	background-color: #4f5969;
	border-radius: 50%;
	opacity: 0.7;
	transition: 0.2s opacity, 0.2s background-color;

	&:hover {
		background-color: #c9586c;
		opacity: 1;
	}

	svg {
		width: auto;
		height: 0.8em;
	}
}

.c9-component-remove-button-confirm {

	.c9-component-remove-button-confirm-yep,
	.c9-component-remove-button-confirm-nope {
		padding: 0;
		margin-left: 5px;

		&:hover,
		&:focus {
			text-decoration: underline;
		}

		&,
		&:focus {
			background: none;
			box-shadow: none;
		}
	}

	.c9-component-remove-button-confirm-yep,
	.c9-component-remove-button-confirm-yep:focus {
		color: #c9586c;
	}

	.c9-component-remove-button-confirm-nope,
	.c9-component-remove-button-confirm-nope:focus {
		color: #999;
	}

	&.components-popover {
		&::before {
			border-color: transparent;
		}

		&.is-top::after {
			border-top-color: #191e23;
		}

		&.is-bottom::after {
			border-bottom-color: #191e23;
		}
	}

	.components-popover__content {
		padding: 4px 12px;
		color: $white;
		white-space: nowrap;
		background: #191e23;
		border-width: 0;
	}

	&:not(.is-mobile) .components-popover__content {
		min-width: 0;
	}

	.components-tooltip__shortcut {
		display: block;
		color: #7e8993;
		text-align: center;
	}
}

.c9-toggles .wp-block:last-child .c9-toggles-toggle,
.c9-toggles .c9-toggles-toggle:last-child {
	border-bottom: none;
	// border-bottom: 1px solid #979797;
}

.c9-toggles:not(.is-style-toggles-small) .wp-block:last-child .c9-toggles-toggle:last-child {
	border-bottom: 1px solid #979797;
}

.c9-toggles.is-style-toggles-small .c9-toggles-toggle .fa-angle-right:before {
	padding: 0px;
}

.c9-toggles.small-toggle .c9-toggles-toggle .c9-toggles-item-collapse .fas,
.c9-toggles.small-toggle .c9-toggles-toggle .c9-toggles-item-heading:not([data-toggle="collapse"]) .c9-toggles-item-collapse .fa-angle-right,
.c9-toggles.small-toggle .c9-toggles-toggle .c9-toggles-item-heading[aria-expanded="true"] .c9-toggles-item-collapse .fa-angle-right {
	line-height: 0.7;
}

.editor-styles-wrapper .c9-toggles .c9-toggles-item-heading:not([data-toggle="collapse"]) .c9-toggles-item-collapse .fa-angle-right,
.editor-styles-wrapper .c9-toggles .c9-toggles-item-heading[aria-expanded="false"] .c9-toggles-item-collapse .fa-angle-right {
	transform: rotate(0);
	line-height: 1;
}

.editor-styles-wrapper .c9-toggles .is-selected .c9-toggles-item-heading:not([data-toggle="collapse"]) .c9-toggles-item-collapse .fa-angle-right {
	transform: rotate(90deg);
	line-height: 1;
}

@media (min-width: 600px) {
	.block-editor-block-list__layout .block-editor-block-list__block[data-type="c9-blocks/toggles"] {
		margin-top: 30px;
		margin-bottom: 30px;
	}

	.block-editor-block-list__layout .block-editor-block-list__block[data-type="c9-blocks/toggles"]:before {
		left: -48px;
		right: -48px;
	}
}
