/*
 * Comments surface — mockup-v5 parity (1280 / 390).
 *
 * wpDiscuz's own frontend and combo styles are dequeued (see functions.php):
 * their teal accents, 2px heading underline, grey inputs, icon buttons and
 * 100px comment gutter are not the platform design. The markup is wpDiscuz's
 * server-rendered tree (sorting, voting, reply, report, no-JS); only the
 * presentation is ours.
 */

#comments {
	--cm-line: #e5e7eb;
	--cm-muted: #6b7280;
	--cm-ink: #15181d;
	--cm-radius: 8px;
}

#comments #wpdcom {
	display: flex;
	flex-direction: column;
	color: var(--cm-ink);
	font-size: 15px;
	line-height: 1.5;
}

#comments #wpdcom *,
#comments #wpdcom *::before,
#comments #wpdcom *::after {
	box-sizing: border-box;
}

/* --- heading + sort on one line ------------------------------------------ */
#comments #wpdcom #wpd-threads {
	display: contents;
}
#comments #wpdcom .wpd-thread-head {
	order: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: nowrap;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
}
#comments #wpdcom .wpd-thread-info {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 0;
	box-shadow: none;
	font-size: 17.5px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--cm-ink);
	white-space: nowrap;
}
#comments #wpdcom .wpdtc {
	order: 2;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}
#comments #wpdcom .wpdtc::before {
	content: "· ";
}
#comments #wpdcom .wpd-thread-filter {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: none;
}
#comments #wpdcom .wpdf-sorting {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 13px;
	white-space: nowrap;
}
#comments #wpdcom .wpdf-sorting i,
#comments #wpdcom .wpdf-sorting .fas {
	display: none;
}
#comments #wpdcom .wpdiscuz-sort-button {
	display: inline-block;
	padding: 3px 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cm-ink);
	line-height: 1.6;
	cursor: pointer;
}
#comments #wpdcom .wpdiscuz-sort-button-active {
	background: #15181d;
	color: #fff;
}
#comments #wpdcom .wpdiscuz-sort-buttons {
	display: flex !important;
	position: static;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
}
#comments #wpdcom .wpd-filter-container,
#comments #wpdcom .wpd-space {
	display: none;
}

/* --- form ---------------------------------------------------------------- */
#comments #wpdcom .wpd-form-wrap {
	order: 2;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpd-form-head {
	display: none;
}
#comments #wpdcom form.wpd_comm_form {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpd-form-row {
	display: contents;
}
#comments #wpdcom .wpd-form-col-left {
	order: 1;
	float: none;
	width: 100%;
}
#comments #wpdcom .wpd-field-comment {
	order: 2;
}
#comments #wpdcom .wpd-form-col-right {
	order: 3;
	float: none;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}
#comments #wpdcom .wpd-form-foot {
	display: contents;
	margin: 0;
}
#comments #wpdcom .wpdiscuz-textarea-wrap {
	display: block;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpdiscuz-textarea-wrap .wpd-avatar,
#comments #wpdcom .wpd-editor-char-counter,
#comments #wpdcom .wpdiscuz-textarea-foot,
#comments #wpdcom .wpdiscuz-button-actions {
	display: none;
}
#comments #wpdcom .wpd-textarea-wrap {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wc_comment,
#comments #wpdcom .wc_name,
#comments #wpdcom .wpd-field {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px;
	border: 1px solid var(--cm-line);
	border-radius: var(--cm-radius);
	background: #fff;
	box-shadow: none;
	color: var(--cm-ink);
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	height: auto;
	outline: none;
}
#comments #wpdcom .wc_comment {
	height: 90px;
	min-height: 90px;
	resize: vertical;
}
#comments #wpdcom .wc_comment:focus,
#comments #wpdcom .wc_name:focus,
#comments #wpdcom .wpd-field:focus {
	border-color: var(--accent);
	background: #fff;
	box-shadow: none;
	outline: 2px solid var(--link);
	outline-offset: 2px;
}
#comments #wpdcom .wpdiscuz-item {
	position: relative;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpd-field-icon {
	display: none;
}
#comments #wpdcom .wpdlb {
	display: none;
}
#comments #wpdcom .wpdiscuz-cfturnstile {
	width: 300px;
	min-width: 300px;
	max-width: 300px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d0d4da;
	border-radius: 6px;
	background: #fafafa;
}
#comments #wpdcom .wc-field-submit {
	display: block;
	margin: 0;
	padding: 0;
	text-align: left;
}
#comments #wpdcom .wc_comm_submit {
	display: inline-block;
	width: auto;
	padding: 10px 18px;
	border: 0;
	border-radius: var(--cm-radius);
	background-color: var(--accent);
	color: #fff;
	box-shadow: none;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
#comments #wpdcom .wc_comm_submit:hover,
#comments #wpdcom .wc_comm_submit:focus {
	background-color: var(--accent);
	color: #fff;
	box-shadow: none;
	outline: 2px solid var(--link);
	outline-offset: 2px;
}
#comments #wpdcom .cm-hint {
	order: 2;
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--cm-muted);
}
#comments #wpdcom .cm-hint a {
	color: var(--link);
	text-decoration: none;
}

/* --- thread -------------------------------------------------------------- */
#comments #wpdcom .wpd-thread-list {
	order: 3;
	margin: 0;
	padding: 0;
	border: 0;
}
#comments #wpdcom .wpd-comment {
	margin: 0;
	padding: 12px 0;
	border: 0;
	border-top: 1px solid var(--cm-line);
	background: none;
}
#comments #wpdcom .wpd-comment-wrap {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
}
#comments #wpdcom .wpd-comment-left {
	flex: none;
	width: 32px;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpd-avatar {
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
}
#comments #wpdcom .wpd-avatar img {
	display: none;
}
#comments #wpdcom .ava {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	border-radius: 50%;
	background: #eef0f3;
	color: #6b7280;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	flex: none;
}
#comments #wpdcom .ava.a1 { background: #0b5cff; color: #fff; }
#comments #wpdcom .ava.a2 { background: #e4002b; color: #fff; }
#comments #wpdcom .ava.a3 { background: #0f7a4a; color: #fff; }
#comments #wpdcom .ava.a4 { background: #8b5cf6; color: #fff; }
#comments #wpdcom .ava.a5 { background: #b45309; color: #fff; }
#comments #wpdcom .ava.ava-empty { background: #eef0f3; color: #6b7280; }
#comments #wpdcom .wpd-comment-right {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}
#comments #wpdcom .wpd-comment-header {
	display: flex;
	align-items: baseline;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0 0 2px;
	padding: 0;
	border: 0;
}
#comments #wpdcom .wpd-comment-author {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	color: var(--cm-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}
#comments #wpdcom .wpd-comment-author a {
	color: var(--cm-ink);
	text-decoration: none;
}
#comments #wpdcom .wpd-comment-date {
	display: inline-flex;
	align-items: center;
	margin: 0 0 0 6px;
	padding: 0;
	color: var(--cm-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
}
#comments #wpdcom .wpd-comment-date i {
	display: none;
}
#comments #wpdcom .wpd-comment-text {
	margin: 4px 0;
	padding: 0;
	color: var(--cm-ink);
	font-size: 15px;
	line-height: 1.5;
}
#comments #wpdcom .wpd-comment-text p {
	margin: 4px 0;
	color: var(--cm-ink);
	font-size: 15px;
	line-height: 1.5;
}
#comments #wpdcom .wpd-comment-footer {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 12px;
	margin: 4px 0 0;
	padding: 0;
	border: 0;
	color: var(--cm-muted);
	font-size: 12px;
	line-height: 1.4;
}
#comments #wpdcom .wpd-comment-footer .wpd-space {
	display: none;
}
#comments #wpdcom .wpd-vote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
}
#comments #wpdcom .wpd-vote-up,
#comments #wpdcom .wpd-vote-down {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	margin: 0;
	padding: 0;
	color: var(--cm-muted);
	cursor: pointer;
}
#comments #wpdcom .wpd-vote svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}
#comments #wpdcom .wpd-vote-result {
	display: inline-block;
	margin: 0;
	padding: 0;
	color: var(--cm-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}
#comments #wpdcom .wpd-vote-result.wpd-up,
#comments #wpdcom .wpd-vote-result.wpd-down {
	color: var(--cm-ink);
}
#comments #wpdcom .wpd-reply-button {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cm-muted);
	font-size: 12px;
	line-height: 1.4;
	cursor: pointer;
}
#comments #wpdcom .wpd-reply-button svg {
	display: none;
}
#comments #wpdcom .cm-report {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cm-muted);
	font-family: inherit;
	font-size: 12px;
	line-height: 1.4;
	cursor: pointer;
}
#comments #wpdcom .cm-report:focus,
#comments #wpdcom .cm-report:focus-visible,
#comments #wpdcom .wpd-reply-button:focus-visible,
#comments #wpdcom .wpdiscuz-sort-button:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}
#comments #wpdcom .wpd-reply-to,
#comments #wpdcom .wpd-comment-label,
#comments #wpdcom .wpd-comment-subheader,
#comments #wpdcom .wpd-comment-status,
#comments #wpdcom .wpd-follow-link {
	display: none;
}
#comments #wpdcom .badge-guest {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 5px;
	border-radius: 4px;
	background: #eef0f3;
	color: var(--cm-muted);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
}
#comments #wpdcom .vf {
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-left: 4px;
	border-radius: 50%;
	vertical-align: 0;
	font-size: 11px;
	flex: none;
}
#comments #wpdcom .wpd-comment.wpd-reply {
	margin-left: 42px;
	padding-left: 0;
	border-left: 0;
}
@media (max-width: 600px) {
	#comments #wpdcom .wpd-comment.wpd-reply {
		margin-left: 24px;
	}
	#comments #wpdcom .wpd-thread-head {
		gap: 8px;
	}
	#comments #wpdcom .wpdf-sorting {
		font-size: 12px;
	}
}

#comments #wpdcom .cm-more {
	order: 4;
	align-self: flex-start;
	display: inline-flex;
	margin-top: 8px;
}
#comments #wpdcom .wpd-thread-list.cm-clamped > .wpd-comment:nth-child(n + 6) {
	display: none;
}
#comments #wpdcom .cm-verify {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--cm-muted);
}
#comments #wpdcom .cm-verify a {
	color: var(--link);
	text-decoration: none;
}

/* «Insert» — разметка wpDiscuz; его style.css тема не подключает (functions.php:159). */
#wpd-editor-source-code-wrapper,#wpd-editor-source-code-wrapper-bg{display:none!important}
