.editor {
	position: relative
}

.editor .placeholder {
	padding: 8px 16px;
	font: var(--font-ui-15-large-reg);
	color: var(--base-txt-muted);
	position: absolute;
	z-index: 1;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: calc(100% - 32px);
	line-height: 24px;
}
.editor__data {
	-webkit-user-modify: read-write;
	-webkit-user-select: text;
	user-select: text;
}
.editor .editor__data {
	min-height: 40px;
	position: relative;
	font: var(--font-txt-15-large-reg);
	padding: 10px 16px;
	line-height: 24px;
}

.editor__data div[style],
.editor__data pre span[style] {
	background-color: transparent !important;
	color: inherit !important;
}
.editor__data:focus {
	outline: none
}
.editor__data p {
	color: var(--base-txt-primary)
}
.editor__data ws-emoji {
	width: 18px;
	height: 18px;
}

.editor__toolbar {
	padding: 6px;
	position: relative;
	--hint-dir: top;
	--hint-arrow: yes;
	--hint-color: white;
}
.editor__toolbar.editor__toolbar-fixed {
	position: sticky;
	top: 0;
	z-index: 10;
}
.editor__toolbar .sp + .sp {
	display: none;
}
.editor:not(.with-topToolbar) .editor__toolbar:not(.editor__toolbar-mini),
.editor.with-topToolbar .editor__toolbar.editor__toolbar-mini {
	display: none;
}
.editor.with-topToolbar .editor__toolbar:not(.editor__toolbar-fixed):not(.editor__toolbar-active) {
	display: none;
}
.editor__toolbar-menu, .editor__toolbar-ai {
	display: none;
}

.editor__toolbar .editor-btn {
	float: left;
	width: 20px;
	height: 20px;
	padding: 3px;
	margin: 0 1px;
	transition: opacity 0.2s ease;
	border-radius: 6px;
	-webkit-transition: opacity 0.2s ease;
	border: 1px solid transparent;
}

.editor__toolbar .editor-btn use:last-child {
	display:none
}
.editor__toolbar .editor-btn use:first-child {
	display:inline-block
}
.editor__toolbar .editor-btn:hover use:first-child {
	display:none
}
.editor__toolbar .editor-btn:hover use:last-child {
	display:inline-block
}

.editor__toolbar-active .editor-btn {
	opacity: 1;
}

.editor__toolbar .editor-btn:hover {
	opacity: 1
}

.editor__toolbar .editor-btn:hover {
	background: var(--base-hlt-g-hover);
}

.editor__toolbar .editor-btn:hover:active {
	background: var(--base-hlt-g-selected);
}

.editor__toolbar .undo, .editor__toolbar .undo:not(.btn_act):hover {
	opacity: 0.5;
}

.editor__toolbar .btn_act {
	border-color: var(--base-line-primary);
	background: var(--base-cont-top-elevated);
	opacity: 1;
}

.editor__textarea {
	display: none;
}

.editor__toolbar .sv_status {
	display: none;
	font: italic 13px/20px var(--font-base);
	padding: 4px 6px;
	color: var(--base-txt-secondary);
	transition: opacity 0.3s ease;
	-webkit-transition: opacity 0.3s ease;
	opacity: 0;
	height: 20px;
}

.editor__toolbar .sv_status:hover {
	opacity: 0.7;
	display: inline-block;
}

.editor__toolbar .sv_status_preact {
	display: inline-block;
}

.editor__toolbar .sv_status_act {
	opacity: 0.7
}

.editor__toolbar .sv_status i {
	color: var(--base-txt-link-minor);
	margin-left: 5px
}

.editor__toolbar .editor-btn.clean:not(.btn_act),
.editor__toolbar .editor-btn.redo:not(.btn_act),
.editor__toolbar .editor-btn.draft:not(.btn_act),
.editor__toolbar .editor-btn.undo:not(.btn_preact)
{
	display: none
}

.editor__toolbar .btn_act.clean, .editor__toolbar .btn_act.redo, .editor__toolbar .btn_preact.undo, .editor__toolbar .btn_act.draft {
	border-color: transparent;
}

.editor__toolbar .editor-btn.draft {
	margin-left: 5px;
}
.editor__toolbar .sp {
	display: inline-block;
	border-left: 1px solid var(--base-line-secondary);
	padding: 4px 0;
	margin: 0 2px;
	height: 20px;
	box-sizing: border-box;
}

.editor__data ol.todo {
	margin: 0 0 10px 0;
	padding: 10px 0
}

.editor__data ol.todo li {
	position: relative;
	margin: 0;
	padding: 5px 0 5px 47px;
}

.editor__data ol.todo li:before {
	float: left;
	width: 12px;
	height: 12px;
	border: 2px solid var(--base-txt-muted);
	border-radius: 4px;
	margin: 4px 0 0 -23px;
	content: '';
	display: block !important;
}

.editor__data ol.todo li:after {
	content: counter(ol-counter);
	font: 12px/20px var(--font-base);
	color: var(--base-txt-ghost);
	text-align: right;
	width: 16px;
	position: absolute;
	left: 0;
	top: 7px
}

.editor__data ol.todo li:first-child:last-child:after {
	display: none
}

.editor__data ol.todo li:hover {
	cursor: initial;
	color: var(--base-txt-secondary);
}

.editor__data .invite {
	cursor: pointer

}

.editor__data .contact {
	cursor: pointer;
}

.editor__data blockquote, .editor__data address, .editor__data pre {
	margin-right: 0;
	min-height: 20px
}

.editor__data blockquote:before, .editor__data address:before, .editor__data pre:before {
	display: none
}

.editor__data pre {
	overflow: auto;
	padding: 10px 15px
}

.editor__data scode {
	display: inline-block;
	background: var(--post-code-bg);
	color: var(--base-txt-alert-major);
	padding: 2px 4px;
	box-shadow: var(--shadow-brd-enable);
	border-radius: 4px;
	word-break: break-word;
	font: 400 0.8125rem/123.08% var(--font-mono);
}
.editor__data hr {
	margin: 20px auto;
	width: 12px;
	height: 2px;
	background: var(--base-txt-muted);
	border: none;
	position: relative;
	overflow: visible;
	border-radius: 1px;
}
.editor__data hr:before, .editor__data hr:after {
	position: absolute;
	content: '';
	display: block;
	width: 12px;
	height: 2px;
	background: var(--base-txt-muted);
	border-radius: 1px;
}
.editor__data hr:after { left: 20px; }
.editor__data hr:before { left: -20px; }
.editor__data pre code {
	padding: 0;
}

.editor__data a.inline_task, .editor__data span.invite, .editor__data span.contact {
	padding: 3px 26px 3px 5px;
	position: relative;
}

.editor__data a.inline_task ws-icon[name="cancel_sm:cancel_sm-solid"], .editor__data span.invite ws-icon[name="cancel_sm:cancel_sm-solid"], .editor__data span.contact ws-icon[name="cancel_sm:cancel_sm-solid"] {
	position: absolute;
	right: 0;
	display: inline-block;
	width: 18px; height: 18px;
	margin-right: 4px;
	--icon-color: var(--colorize-lbl-txt-primary);
	svg use:last-child { display: none; }
}
.editor__data a.inline_task ws-icon[name="cancel_sm:cancel_sm-solid"]:hover,
.editor__data span.invite ws-icon[name="cancel_sm:cancel_sm-solid"]:hover,
.editor__data span.contact ws-icon[name="cancel_sm:cancel_sm-solid"]:hover {
	--icon-color: var(--colorize-lbl-txt-accent);
	svg use:first-child { display: none; }
	svg use:last-child { display: block; }
}
.editor__data a.inline_task ws-icon[name="cancel_sm:cancel_sm-solid"] svg,
.editor__data span.invite ws-icon[name="cancel_sm:cancel_sm-solid"] svg,
.editor__data span.contact ws-icon[name="cancel_sm:cancel_sm-solid"] svg {
	width: 18px; height: 18px;
}

.editor__data strike, .page_content strike, .editor__data span[style*=line-through] {
	text-decoration-color: var(--base-btn-alert-primary-minor)
}

@media (max-width: 560px) {
	.commentForm__main {
		justify-content: center;
	}
	.commentForm-fullSize .commentForm__left {
		width: 0;
	}
}

@media (min-width: 481px) {
	.commentForm__buttons .place_button ws-btn[data-role="cancel"] .btn-left-icon {
		display: none;
	}
	.editor__toolbar .editor-btn-r-stick {
		display: none;
	}
	.taskView-comment_expanded .commentForm__buttons .editor__toolbar .editor-btn.toolbar {
		pointer-events: none;
	}
}
@media (max-width: 480px) {
	.commentForm__buttons .place_button ws-btn[data-role="cancel"] .btn {
		padding: 0;
		min-width: 32px;
	}
	.commentForm__buttons .place_button ws-btn[data-role="cancel"] span:not([class]) {
		display: none;
	}

	.commentForm__content__editor > .editor__toolbar {
		box-shadow: var(--mobile-head-hairline);
	}
	.editor__toolbar .editor-btn {
		width: 32px; height: 32px; padding: 0; margin: 0 2px;
	}
	.editor__toolbar .editor-btn > ws-icon {
		width: 32px; height: 32px;
	}

	/* .taskView-comment_expanded .commentForm__buttons .editor__toolbar .editor-btn.toolbar,
	.taskView-comment_expanded .commentForm__buttons .editor__toolbar .editor-btn.list_todo {
		display:none;
	} */

	/* .editor__toolbar .editor-btn.emoji,
	.editor__toolbar .editor-btn.code {
		display:none;
	} */

	.editor__toolbar .sv_status {
		display: none;
	}

	.editor .editor__data {
		/* max-height: 200px */
	}

	.editor__toolbar > .editor-btn.more {
		display: none;
	}
	.editor__toolbar .editor-btn-r-stick {
		display: block;
		position: sticky;
		top: 0;
		right: -6px;
		margin: -6px -6px -6px 0;
		height: 46px;
		box-sizing: border-box;
		padding: 6px 4px;
		border-left: var(--screen-px) solid var(--base-line-secondary);
		background: linear-gradient(90deg, var(--base-cont-retrans-low) 0%, var(--base-cont-input-opac) 100%);
		backdrop-filter: blur(2px);
	}
	.editor__toolbar .editor-btn-r-stick:has(.more.hiddenBlock) {
		display: none;
	}
}

@media (max-width: 395px) {
	.commentForm__main {
		justify-content: center;
	}
	.taskView-comment_expanded .commentForm__left,
	.commentForm-edit .commentForm__left {
		width: 0;
	}
	.taskView-comment_expanded .commentForm__left .av_nm,
	.commentForm-edit .commentForm__left .av_nm {
		display: none;
	}
}

.editor__data table {
	background: var(--base-cont-mid);
	font: 13px/16px var(--font-base);
	border-radius: 8px;
	padding: 5px;
	max-width: 100%;
	box-sizing: border-box;
	margin: 5px 0 15px 0;
	overflow-x: auto;
	display: block;
	width: fit-content
}

.editor__data td, .editor__data th {
	padding: 10px 10px;
	border-left: 1px dashed var(--base-line-alt-gap-major);
	border-top: 1px dashed var(--base-line-alt-gap-major)
}

.editor__data td:first-child, .editor__data th:first-child {
	border-left: none
}

.editor__data tr:first-child td, .editor__data tr:first-child th {
	border-top: none
}

.editor__data table::-webkit-scrollbar {
	width: 8px;
	height: 8px
}

.editor__data table::-webkit-scrollbar-track {
	background-color: var(--base-cont-low)
}

.editor__data table::-webkit-scrollbar-track:hover {
	background-color: var(--base-cont-low)
}

.editor__data table::-webkit-scrollbar-thumb {
	background-color: var(--base-surf-low);
	border-width: 0
}

#editorLinkMenu .menu__group:first-child > div:not(.hiddenBlock) + div,
#editorHighlightMenu .menu__group:first-child > div:not(.hiddenBlock) + div {
	margin-top: 8px;
}
#editorLinkMenu .menu__group:first-child > div,
#editorHighlightMenu .menu__group:first-child > div {
	gap: 4px;
}
#editorHighlightMenu .menu__group:first-child > div > ws-icon,
#editorLinkMenu .menu__group:first-child > div > ws-icon {
	width: 36px;
	height: 36px;
}
@media (max-width: 480px) {
	#editorLinkMenu .menu__swipe + .menu__group > div:not(.hiddenBlock) + div,
	#editorHighlightMenu .menu__swipe + .menu__group > div:not(.hiddenBlock) + div {
		margin-top: 8px;
	}
	#editorLinkMenu .menu__swipe + .menu__group > div,
	#editorHighlightMenu .menu__swipe + .menu__group > div {
		gap: 4px;
	}
	#editorHighlightMenu .menu__swipe + .menu__group > div > ws-icon,
	#editorLinkMenu .menu__swipe + .menu__group > div > ws-icon {
		width: 36px;
		height: 36px;
	}
}
#editorLinkMenu .menu__group:last-child > ws-btn + ws-btn {
	margin-left: 4px;
}
#editorLinkMenu .menu__group .inputBlock__label > ws-btn:last-child {
	margin-left: -8px;
	margin-right: 4px;
}
#editorLinkMenu ws-btn[name*=btn-delete]:not(.hiddenBlock) + ws-icon {
	display: none;
}

#editorHighlightMenu .menu__group .colors {
	padding: 0;
	display: flex;
	gap: 2px;
}

#editorHighlightMenu .menu__group .colors div {
	flex-grow: 1;
	flex-shrink: 1;
	height: 32px;
	position: relative;
	cursor: pointer;
}
#editorHighlightMenu .menu__group .colors div i {
	position: absolute;
	width: 16px; height: 16px;
	top: calc(50% - 8px);
	left: calc(50% - 8px);
	border-radius: 100%;
	transition: all .2s linear;
	display: block;
	border: 1px solid var(--base-cont-mod-top);
	box-sizing: border-box;
}
#editorHighlightMenu .menu__group .colors div.act i,
#editorHighlightMenu .menu__group .colors div:hover i {
	width: 100%; height: 100%; top: 0; left: 0;
	border-radius: 8px;
}
#editorHighlightMenu .menu__group .colors div.act {
	border-radius: 8px;
	box-shadow: var(--shadow-brd-focus-alt-mini);
}
#editorHighlightMenu .menu__group .colors div.act:after {
	content: "";
	display: block;
	background: url(/assets/img/wysiwyg_iconset_new.svg) -220px 0;
	width: 20px; height: 20px;
	position: absolute;
	top: calc(50% - 10px);
	left: calc(50% - 10px);
}


#inlineEmojiMenu {
	/* 44px - ширина menu__item */
	/* 12px - padding-inline menu__group */
	overflow: hidden;
	.flex_row-forceScrollable {
		container-type: scroll-state;
		container-name: scroller;
		scroll-padding-inline: calc(44px + 12px);
		max-width: calc(44px * 6 + 12px * 2);
	}
	[data-container=emoji]::before,
	[data-container=emoji]::after {
		--bg: var(--menu-cont-top) calc(12px / 2), var(--trans);
		content: '';
		width: calc(44px + 12px);
		height: 100%;
		position: absolute;
		top: 0;
		pointer-events: none;
		opacity: 0;
		transition: opacity 0.2s ease;
	}
	[data-container=emoji]::before {
		background: linear-gradient(to right, var(--bg));
		left: 0;
	}
	[data-container=emoji]::after {
		background: linear-gradient(to left, var(--bg));
		right: 0;
	}

	@container scroller scroll-state(scrollable: left) {
		[data-container=emoji]::before {
			opacity: 1;
		}
	}
	@container scroller scroll-state(scrollable: right) {
		[data-container=emoji]::after {
			opacity: 1;
		}
	}
}

#editorEmojiMenu .menu__group-emoji:first-child {
	margin-top: -4px;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
}
