/* Форма комментария в стиле макета Animedia */
.amd-comm-composer {
	--amd-comm-red: #d72d46;
	--amd-comm-ink: #292d35;
	--amd-comm-muted: #8b909c;
	--amd-comm-line: #e5e6eb;
	--amd-comm-card: #fff;
	--amd-comm-bar: #fdfdfe;
	--amd-comm-hover: #f0f1f4;
	--amd-comm-active: #fbe9ec;
	--amd-comm-hint: #989ca6;
	--amd-comm-count: #a0a4af;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
}
.amd-comm-eyebrow {
	font-size: 11px;
	font-weight: 750;
	letter-spacing: 2px;
	color: var(--amd-comm-red);
	margin: 0 0 18px;
}
.amd-comm-heading {
	margin: 0 0 18px;
}
.amd-comm-heading .amd-heading__text p {
	display: none !important;
}
.amd-comm-heading > svg {
	display: none !important;
}
.amd-comm-rules {
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: 0 !important;
	color: var(--tt-accent, var(--amd-comm-red)) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: inherit !important;
	vertical-align: baseline;
	cursor: pointer;
	text-decoration: underline !important;
	text-underline-offset: 2px;
}
.amd-comm-rules:hover {
	opacity: .85;
	background: none !important;
	color: var(--tt-accent, var(--amd-comm-red)) !important;
	box-shadow: none !important;
}
.amd-comm-card {
	background: var(--amd-comm-card);
	border: 1px solid #dddfe6;
	border-radius: 17px;
	box-shadow: 0 8px 24px rgba(35, 41, 66, 0.03);
	overflow: hidden;
	transition: border-color .2s, box-shadow .2s;
}
.amd-comm-card:focus-within {
	border-color: #d99aa4;
	box-shadow: 0 0 0 4px rgba(215, 45, 70, 0.05);
}
.amd-comm-toolbar {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-bottom: 1px solid var(--amd-comm-line);
	background: var(--amd-comm-bar);
	flex-wrap: wrap;
}
.amd-comm-tool {
	border: 0;
	background: transparent;
	color: #555b67;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 38px;
	height: 40px;
	padding: 0 11px;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
}
.amd-comm-tool:hover {
	background: var(--amd-comm-hover);
}
.amd-comm-tool.is-on,
.amd-comm-tool[aria-pressed="true"] {
	background: var(--amd-comm-active);
	color: var(--amd-comm-red);
}
.amd-comm-tool--letter {
	font-family: Georgia, serif;
	font-size: 20px;
}
.amd-comm-sep {
	height: 22px;
	width: 1px;
	background: var(--amd-comm-line);
	margin: 0 8px;
}
.amd-comm-tool svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}
.amd-comm-writing {
	position: relative;
	min-height: 200px;
}
.amd-comm-mascot {
	pointer-events: none;
	position: absolute;
	bottom: 12px;
	right: 24px;
	color: #d3d5dc;
	width: 90px;
	height: 60px;
	z-index: 2;
	transition: opacity .2s;
}
.amd-comm-writing.is-filled .amd-comm-mascot {
	opacity: 0;
}
.amd-comm-footer {
	padding: 10px;
	border-top: 1px solid #eff0f3;
	display: flex;
	justify-content: space-between;
	gap: 15px;
	align-items: center;
	flex-wrap: wrap;
	background: var(--amd-comm-card);
}
.amd-comm-hint {
	font-size: 12px;
	color: var(--amd-comm-hint);
}
.amd-comm-hint strong {
	font-weight: 500;
	color: #69707c;
}
.amd-comm-actions {
	display: flex;
	gap: 15px;
	align-items: center;
	margin-left: auto;
}
.amd-comm-count {
	color: var(--amd-comm-count);
	font-size: 12px;
	white-space: nowrap;
}
.amd-comm-send {
	display: inline-flex !important;
	align-items: center;
	gap: 9px;
	background: var(--amd-comm-red) !important;
	color: #fff !important;
	border: 0 !important;
	padding: 11px 23px !important;
	border-radius: 10px !important;
	font-weight: 650 !important;
	font-size: 14px !important;
	box-shadow: 0 4px 9px rgba(215, 45, 70, 0.11) !important;
	cursor: pointer;
	width: auto !important;
}
.amd-comm-send:hover {
	background: #c3233b !important;
	color: #fff !important;
}
.amd-comm-send svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.amd-comm-below {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.amd-comm-composer .add-comments-form__rules-link.amd-comm-rules {
	color: var(--tt-accent, var(--amd-comm-red));
	text-decoration: underline;
	font-size: 13px;
}
.amd-comm-composer .add-comments-form__rules-link.amd-comm-rules:hover {
	color: var(--tt-accent, var(--amd-comm-red));
}
.amd-comm-composer .form__row {
	margin: 0;
}
.amd-comm-composer .form__row--without-label {
	padding: 0;
}
.amd-comm-composer .form__content.form__textarea-inside {
	padding: 0;
	margin: 0;
}
.amd-comm-composer .form__textarea-inside,
.amd-comm-composer .wseditor,
.amd-comm-composer .dlecomments-editor {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
.amd-comm-composer .tox-tinymce {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}
.amd-comm-composer .tox-editor-header {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
.amd-comm-composer .tox-statusbar,
.amd-comm-composer .tox-promotion,
.amd-comm-composer .tox-throbber {
	display: none !important;
}
.amd-comm-composer .tox-edit-area,
.amd-comm-composer .tox-edit-area__iframe {
	background: transparent !important;
}
.amd-comm-composer .tox-edit-area__iframe {
	min-height: 200px;
	height: 200px;
}
.amd-comm-composer .form__row--protect {
	padding: 14px 20px 0;
}
.amd-comm-composer .add-comments-form__guest-fields {
	padding: 0 20px 16px;
	margin-top: 12px;
}
.amd-comm-composer .add-comments-form__input,
.amd-comm-composer .form__input {
	border-radius: 10px !important;
	box-shadow: inset 0 0 0 1px var(--amd-comm-line) !important;
	background: #fff !important;
}

/* TinyMCE / цитата / спойлер — окна в стиле макета */
body .tox.tox-tinymce-aux .tox-dialog,
.tox-silver-sink .tox-dialog {
	border-radius: 15px !important;
	border: 1px solid var(--amd-comm-line, #e5e6eb) !important;
	box-shadow: 0 12px 35px rgba(49, 54, 70, 0.12) !important;
	overflow: hidden;
}
body .tox-dialog:has(.tox-dialog__body-iframe),
.tox-silver-sink .tox-dialog:has(.tox-dialog__body-iframe) {
	position: relative !important;
	width: 460px !important;
	max-width: 460px !important;
	height: 380px !important;
	max-height: 380px !important;
}
body .tox .tox-dialog__header {
	padding: 16px 18px 10px !important;
	background: #fff !important;
	border-bottom: 0 !important;
}
body .tox .tox-dialog__title {
	font-size: 16px !important;
	font-weight: 650 !important;
	color: #292d35 !important;
}
body .tox .tox-dialog__body-content {
	padding: 8px 18px 16px !important;
}
body .tox .tox-dialog__footer {
	background: #fdfdfe !important;
	border-top: 1px solid #eff0f3 !important;
	padding: 12px 16px !important;
}
body .tox .tox-button {
	background: #d72d46 !important;
	border: 0 !important;
	border-radius: 10px !important;
	font-weight: 650 !important;
	box-shadow: 0 4px 9px rgba(215, 45, 70, 0.14) !important;
}
body .tox .tox-button:hover {
	background: #c3233b !important;
}
body .tox .tox-button--secondary {
	background: #f0f1f4 !important;
	color: #555b67 !important;
	box-shadow: none !important;
}
body .tox .tox-textarea,
body .tox .tox-textfield {
	border-radius: 10px !important;
	border: 1px solid #e5e6eb !important;
	min-height: 120px;
}
body .tox .tox-dialog-wrap__backdrop {
	background: rgba(28, 32, 42, 0.28) !important;
}

/* Тёмная тема */
body.dt-is-active .amd-comm-composer {
	--amd-comm-ink: #e8eaef;
	--amd-comm-muted: #9aa1ae;
	--amd-comm-line: #2c3342;
	--amd-comm-card: #1c212b;
	--amd-comm-bar: #181d26;
	--amd-comm-hover: #2a3140;
	--amd-comm-active: #3a2430;
	--amd-comm-hint: #8b93a3;
	--amd-comm-count: #8b93a3;
}
body.dt-is-active .amd-comm-heading > svg {
	display: none !important;
}
body.dt-is-active .amd-comm-rules {
	border: 0;
	color: var(--tt-accent);
	background: none;
}
body.dt-is-active .amd-comm-card {
	border-color: #323a4a;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
body.dt-is-active .amd-comm-card:focus-within {
	border-color: #a05060;
	box-shadow: 0 0 0 4px rgba(215, 45, 70, 0.12);
}
body.dt-is-active .amd-comm-tool {
	color: #c5cad4;
}
body.dt-is-active .amd-comm-mascot {
	color: #3a4254;
}
body.dt-is-active .amd-comm-footer {
	border-top-color: #2c3342;
}
body.dt-is-active .amd-comm-hint strong {
	color: #c5cad4;
}
body.dt-is-active .amd-comm-composer .add-comments-form__input,
body.dt-is-active .amd-comm-composer .form__input {
	background: #151922 !important;
	box-shadow: inset 0 0 0 1px #323a4a !important;
	color: #e8eaef !important;
}
body.dt-is-active .tox .tox-dialog {
	background: #1c212b !important;
	border-color: #323a4a !important;
}
body.dt-is-active .tox .tox-dialog__header,
body.dt-is-active .tox .tox-dialog__body,
body.dt-is-active .tox .tox-dialog__body-content {
	background: #1c212b !important;
}
body.dt-is-active .tox .tox-dialog__title {
	color: #eef0f5 !important;
}
body.dt-is-active .tox .tox-dialog__footer {
	background: #181d26 !important;
	border-top-color: #2c3342 !important;
}
body.dt-is-active .tox .tox-textarea,
body.dt-is-active .tox .tox-textfield {
	background: #151922 !important;
	border-color: #323a4a !important;
	color: #e8eaef !important;
}
body.dt-is-active .tox .tox-label,
body.dt-is-active .tox .tox-dialog__body-content {
	color: #c5cad4 !important;
}
body.dt-is-active .tox .tox-button--secondary {
	background: #2a3140 !important;
	color: #e8eaef !important;
}

@media (max-width: 600px) {
	.amd-comm-heading h2 { font-size: 22px; }
	.amd-comm-heading p { font-size: 12px; }
	.amd-comm-heading { gap: 12px; }
	.amd-comm-toolbar { gap: 1px; padding: 9px; }
	.amd-comm-tool { padding: 0 8px; font-size: 12px; gap: 6px; }
	.amd-comm-tool span { display: none; }
	.amd-comm-tool--letter span { display: inline; }
	.amd-comm-sep { margin: 0 3px; }
	.amd-comm-footer { padding: 13px; }
	.amd-comm-actions { width: 100%; justify-content: space-between; }
}
