/*!
 * VisualEditor ContentEditable attached root node styles.
 *
 * @copyright See AUTHORS.txt
 */

.ve-ce-attachedRootNode {
	cursor: text;
	/* Prevent excess scrolling when surface padding is added */
	box-sizing: border-box;

	.ve-ce-surface-readOnly & {
		/* Hide the caret (text cursor) when read-only */
		caret-color: transparent;
	}

	/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
	&::selection,
	& *::selection {
		background: fade( #6da9f7, 50% );
	}

	& [ contentEditable='false' ] {
		/* Reset styles applied to ce=true by Chrome (T207426) */
		overflow-wrap: initial;
		-webkit-line-break: initial;
	}
}
