* [class*='ae-toolbar-'][role='toolbar'] {
	z-index: 990;

	@include media-breakpoint-down(sm) {
		z-index: 1000;
	}
}

.alloy-editor-container {
	position: relative;

	.wrapper {
		position: relative;
	}

	.alloy-editor-icon {
		bottom: 8px;
		display: none;
		position: absolute;
		right: 8px;
	}

	.alloy-editor {
		cursor: text;
		overflow: hidden;
		text-align: start;

		&[dir='rtl'] + .alloy-editor-icon {
			left: 8px;
		}

		~ .alloy-editor-placeholder {
			display: none;
		}

		&.ae-placeholder {
			~ .alloy-editor-placeholder {
				background-color: transparent;
				color: #2b4259;
				display: block;
				padding-left: 10px;
				pointer-events: none;
				position: absolute;
				top: 0.25rem;
			}
			&.readonly ~ .alloy-editor-placeholder {
				color: #ccc;
			}
			&:empty {
				min-height: 1.5em;
			}
			&:not(:focus) {
				~ .alloy-editor-placeholder {
					border-left-color: #dbdde1;
					color: #b0b4bb;
				}

				&:not(.form-control) ~ .alloy-editor-placeholder {
					border-left: 2px solid;
					padding-left: 10px;
				}

				.has-error & {
					border-left-color: #c67;
				}
			}
			&:focus,
			&.cke_focus {
				~ .alloy-editor-placeholder {
					display: none !important;
				}
			}
			&:not(:focus):before {
				content: '';
			}
		}

		a {
			cursor: auto;
		}

		blockquote {
			margin: 1em 40px;
		}

		p:only-child {
			margin-bottom: 0;
		}

		&.form-control {
			height: auto;

			~ .alloy-editor-icon {
				display: block;
				max-width: 24px;
			}
		}

		.cke_widget_wrapper {
			max-width: 100%;
		}
	}

	.alloy-editor-switch {
		position: absolute;
		text-align: right;
		top: 0;
		width: 100%;

		.btn {
			margin-top: 0;
		}
	}

	.alloy-editor-wrapper {
		padding-top: 44px;

		.lfr-source-editor {
			display: none;
		}

		&.show-source {
			.alloy-editor-placeholder {
				display: none;
			}

			.lfr-source-editor {
				display: block;
			}
		}
	}
}

.ae-ui .ae-toolbars .ae-toolbar-add {
	border-width: 1px;
	margin-left: 4px;
	z-index: 989;

	.ae-button {
		height: 28px;
		width: 28px;

		@include media-breakpoint-up(xl) {
			height: 32px;
			width: 32px;
		}
	}
}

.has-error .alloy-editor-container .form-feedback-item {
	font-size: 16px;
	font-weight: normal;
	line-height: 1.4em;
	text-align: left;
}

.ie11 .alloy-editor-container .cke_widget_inline {
	display: inline-block;
}
