/*
 * Форма комментария в стиле v2 (шаблон wxxx).
 * FontAwesome подключается из базового шаблона компонента — иконки тулбара wysiwyg.
 */

@font-face {
  font-family: 'FontAwesome';
  src: url('/local/components/prmedia/tc.form/templates/.default/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),
    url('/local/components/prmedia/tc.form/templates/.default/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),
    url('/local/components/prmedia/tc.form/templates/.default/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

/* блок формы */
.wxxx-comments .ptc-form_v2 {
	width: 100%;
}

.wxxx-comments .ptc-form-placeholder {
	display: none;
}

.wxxx-comments .ptc-form_v2.ptc-form_placeholder .ptc-form-placeholder {
	display: block;
}

.wxxx-comments .ptc-form-placeholder-btn {
	display: block;
	width: 100%;
	margin: 0 0 4px;
	padding: 12px 16px;
	border: 1px solid var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px;
	background: #fafbfc;
	color: var(--wxxx-cm-text-light, #9aa0a6);
	font-size: 15px;
	text-align: left;
	cursor: pointer;
	outline: none;
	transition: border-color .15s, color .15s;
}

.wxxx-comments .ptc-form-placeholder-btn:hover {
	border-color: var(--wxxx-red, #900909);
	color: var(--wxxx-cm-text, #18191a);
}

.wxxx-comments .ptc-form-container {
	opacity: 1;
	transition: opacity .3s;
	height: auto;
}

.wxxx-comments .ptc-form_v2.ptc-form_placeholder .ptc-form-container {
	opacity: 0;
	max-height: 0;
	transition: all 0s;
	height: 0;
	overflow: hidden;
}

.wxxx-comments .ptc-form-form_v2 {
	position: relative;
}

.wxxx-comments .ptc-form-form_v2.ptc-form_preload::before {
	content: "";
	position: absolute;
	z-index: 15;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, .75);
}

.wxxx-comments .ptc-form-form_v2.ptc-form_preload::after {
	content: "";
	position: absolute;
	z-index: 16;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	border: 3px solid var(--wxxx-cm-line, #e4e7ea);
	border-top-color: var(--wxxx-red, #900909);
	border-radius: 50%;
	animation: wxxx-cm-spin .7s linear infinite;
}

@keyframes wxxx-cm-spin {
	to { transform: rotate(360deg); }
}

.wxxx-comments .ptc-form-form_v2 .ptc-form-row {
	margin: 0 0 10px;
}

.wxxx-comments .ptc-form-form_v2 .ptc-form-row_name {
	margin-bottom: 8px;
}

/* имя анонима */
.wxxx-comments .ptc-form-input {
	display: inline-block;
	vertical-align: middle;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px;
	color: var(--wxxx-cm-text, #18191a);
	font-size: 15px;
	outline: none;
	transition: border-color .15s;
	box-sizing: border-box;
}

.wxxx-comments .ptc-form-input:focus {
	border-color: #b9bfc6;
}

.wxxx-comments .ptc-form-input_error,
.wxxx-comments .ptc-form-input_error + .wysiwyg-editor {
	border-color: var(--wxxx-red, #900909) !important;
}

.wxxx-comments .ptc-form-input_text {
	max-width: 320px;
}

.wxxx-comments .ptc-form-input_error-block {
	color: var(--wxxx-red, #900909);
	padding-top: 8px;
	display: none;
}

/* переключение режимов добавления/редактирования */
.wxxx-comments .ptc-form-form_v2 .ptc-form-form_edit-field {
	display: none;
}

.wxxx-comments .ptc-item_edit .ptc-form-form_add-field {
	display: none;
}

.wxxx-comments .ptc-item_edit .ptc-form-form_edit-field {
	display: inline-block;
}

/* кнопки */
.wxxx-comments .ptc-form-row_actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wxxx-comments .ptc-form-submit {
	margin: 4px 0 0;
	padding: 10px 26px;
	font-size: 14px;
	transition: opacity .15s;
}

.wxxx-comments .ptc-form-submit:disabled {
	opacity: .5;
}

.wxxx-comments .ptc-form-skip {
	padding: 0;
	color: #6f757c;
	background: none;
	border: none;
	border-bottom: 1px dotted #6f757c;
	font-size: 14px;
	cursor: pointer;
	outline: none;
}

.wxxx-comments .ptc-form-skip:hover {
	color: var(--wxxx-cm-text, #18191a);
}

/* приглашение войти (гость на страницах без анонимных комментариев) */
.wxxx-comments .wxxx-cm-login {
	margin: 4px 0 8px;
	padding: 16px;
	border: 1px dashed var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px;
	background: #fafbfc;
	color: var(--wxxx-cm-text-light, #9aa0a6);
	text-align: center;
}

.wxxx-comments .wxxx-cm-login .icon {
	margin-right: 6px;
	color: #c3c8ce;
}

.wxxx-comments .wxxx-cm-login a {
	color: var(--wxxx-red, #900909);
	font-weight: 700;
}

.wxxx-comments .wxxx-cm-login a:hover {
	text-decoration: underline;
}

/* wysiwyg-редактор */
.wxxx-comments .wysiwyg-container {
	overflow: visible;
	color: var(--wxxx-cm-text, #18191a);
	background: #fff;
	border: 1px solid var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px;
}

.wxxx-comments .wysiwyg-textarea {
	display: block;
	width: 100%;
	height: 1.5em;
	padding: 0;
	resize: none;
}

.wxxx-comments .wysiwyg-wrapper {
	position: relative;
}

.wxxx-comments .wysiwyg-editor {
	position: relative;
	min-height: 96px;
	max-height: 220px;
	line-height: 1.5;
	padding: 12px;
	overflow: auto;
	outline: none;
	color: var(--wxxx-cm-text, #18191a);
	font-size: 15px;
	border: 1px solid transparent;
	border-radius: 0 0 8px 8px;
	word-wrap: break-word;
}

.wxxx-comments .wysiwyg-editor img {
	max-width: 100%;
	vertical-align: top;
}

.wxxx-comments .wysiwyg-toolbar {
	overflow: hidden;
	white-space: nowrap;
	padding: 0;
	background: #fafbfc;
	border-bottom: 1px solid var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px 8px 0 0;
}

.wxxx-comments .wysiwyg-toolbar a {
	vertical-align: top;
}

.wxxx-comments .wysiwyg-placeholder {
	position: absolute;
	top: 8px;
	left: 10px;
	opacity: .54;
}

.wxxx-comments .wysiwyg-popup {
	position: absolute;
	z-index: 9999;
	color: var(--wxxx-cm-text, #18191a);
	background: #fff;
	left: -50%;
	white-space: nowrap;
	border: 1px solid var(--wxxx-cm-line, #e4e7ea);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(24, 25, 26, .12);
	user-select: none;
}

.wxxx-comments .wysiwyg-popup.wysiwyg-popuphover {
	margin-top: 9px;
}

.wxxx-comments .wysiwyg-popup.wysiwyg-popuphover:after {
	position: absolute;
	left: 50%;
	bottom: 100%;
	border: solid transparent;
	content: '';
	width: 0;
	height: 0;
	margin-left: -8px;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-bottom: 8px solid var(--wxxx-cm-line, #e4e7ea);
}

.wxxx-comments .wysiwyg-toolbar-icon {
	display: inline-block;
	margin: 0;
	padding: 8px 10px;
	color: #8a9098;
	text-decoration: none;
	vertical-align: top;
	cursor: pointer;
	user-select: none;
	font: 16px FontAwesome;
	transition: color .15s, background .15s;
}

.wxxx-comments .wysiwyg-toolbar-icon:hover {
	color: var(--wxxx-cm-text, #18191a);
	background: #eef0f3;
	text-decoration: none;
}

.wxxx-comments .wysiwyg-toolbar-form {
	padding: 10px;
	white-space: nowrap;
}

.wxxx-comments .wysiwyg-toolbar-form .wysiwyg-toolbar-icon {
	margin-left: 5px;
	border-radius: 5px;
}

.wxxx-comments .wysiwyg-toolbar-color {
	width: 12px;
	height: 12px;
	cursor: pointer;
}

.wxxx-comments .wysiwyg-input {
	display: inline-block;
	color: var(--wxxx-cm-text, #18191a);
	background: #fff;
	border: 1px solid var(--wxxx-cm-line, #e4e7ea);
	width: 20em;
	height: 20px;
	padding: 5px 6px;
	border-radius: 4px;
	outline: none;
}

.wxxx-comments .wysiwyg-input.wysiwyg-inputtextarea {
	width: 100%;
	height: 5em;
	box-sizing: border-box;
	resize: none;
}

.wxxx-comments .wysiwyg-browse {
	position: relative;
	left: 0;
	top: 0;
	height: 3em;
	line-height: 3em;
	color: #6f757c;
	border: 2px dashed var(--wxxx-cm-line, #e4e7ea);
	background-color: #fafbfc;
	padding: 10px;
	text-align: center;
	font-weight: 700;
	margin-bottom: 10px;
	cursor: pointer;
}

.wxxx-comments .wysiwyg-browse:hover,
.wxxx-comments .wysiwyg-browse:active,
.wxxx-comments .wysiwyg-browse:focus {
	color: var(--wxxx-cm-text, #18191a);
}

.wxxx-comments .wysiwyg-embedcode {
	margin-bottom: 10px;
}

.wxxx-comments .prmedia-tc-form-wysiwyg-smilies {
	max-width: 300px;
	white-space: normal;
}

.wxxx-comments .prmedia-tc-form-wysiwyg-smilies img {
	margin: 5px;
	cursor: pointer;
}
