/* ============================================================
   评论：列表 + 发表表单（配合 comments.php）
   —— 只在详情页加载（functions.php 的 mb_scripts 里按 is_single() 入队）
   颜色全部走主题变量，白/暗主题自动跟随
   ============================================================ */

.mb-comments { margin-top: 14px; }

.mb-cm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}
.mb-cm-head-t {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
}
.mb-cm-count {
	display: inline-block;
	min-width: 20px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.7;
	text-align: center;
}
.mb-cm-closed { font-size: 12px; color: #8c8f94; }
.mb-cm-empty { margin: 10px 0 4px; font-size: 13px; }

/* ---------- 列表 ---------- */
.mb-cm-list { list-style: none; margin: 0; padding: 0; }
.mb-cm-list .children {
	list-style: none;
	margin: 10px 0 0;
	padding: 0 0 0 24px;
	border-left: 2px solid var(--brand-soft);
}
.mb-cm-item {
	display: flex;
	gap: 10px;
	padding: 13px 0;
	border-top: 1px solid var(--bg-soft);
}
.mb-cm-list > .mb-cm-item:first-child { border-top: 0; }
.mb-cm-av { flex: none; }
.mb-cm-av img { border-radius: 50%; display: block; }
.mb-cm-bd { flex: 1; min-width: 0; }
.mb-cm-top {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}
.mb-cm-name { font-size: 13.5px; font-weight: 600; }
.mb-cm-time { font-size: 12px; color: #8c8f94; }
.mb-cm-wait {
	font-size: 11px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #fff4e5;
	color: #b26a00;
}
.mb-cm-text {
	font-size: 14px;
	line-height: 1.7;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.mb-cm-text p { margin: 0 0 6px; }
.mb-cm-text p:last-child { margin-bottom: 0; }
.mb-cm-act { margin-top: 4px; }
.mb-cm-act .comment-reply-link {
	font-size: 12.5px;
	color: var(--brand);
	text-decoration: none;
}
.mb-cm-act .comment-reply-link:hover { text-decoration: underline; }
.mb-cm-page { margin: 12px 0 4px; font-size: 13px; }
.mb-cm-page a,
.mb-cm-page span.current {
	display: inline-block;
	margin: 0 4px 6px 0;
	padding: 4px 10px;
	border-radius: 8px;
	border: 1px solid var(--brand-line);
	background: var(--brand-soft);
	color: var(--brand);
	text-decoration: none;
}
.mb-cm-page span.current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 发表评论 ---------- */
.mb-comments .comment-respond { margin-top: 12px; }
.mb-comments .comment-reply-title {
	display: block;
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 600;
}
.mb-comments .comment-reply-title small { font-size: 12px; font-weight: 400; margin-left: 8px; }
.mb-comments .comment-form { margin: 0; }
.mb-comments .mb-cm-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0 0 12px;
}
.mb-comments .mb-cm-field label { font-size: 12.5px; color: #6b7280; }
.mb-comments .mb-cm-field .req { color: var(--danger); }
.mb-comments .mb-cm-hint { font-size: 11.5px; color: #9aa1ab; }
.mb-comments .mb-cm-field input[type="text"],
.mb-comments .mb-cm-field input[type="email"],
.mb-comments .mb-cm-field input[type="url"],
.mb-comments .mb-cm-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--brand-line, #d7e2f5);
	border-radius: 12px;
	background: var(--bg-card);
	color: inherit;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	transition: border-color .15s, box-shadow .15s;
}
.mb-comments .mb-cm-field input:focus,
.mb-comments .mb-cm-field textarea:focus {
	outline: 0;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-soft);
}
.mb-comments .mb-cm-field textarea { resize: vertical; min-height: 96px; }
.mb-comments .form-submit { margin: 0; }
.mb-comments .mb-cm-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 22px;
	border: 0;
	border-radius: 12px;
	background: var(--brand);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: opacity .15s, transform .1s;
}
.mb-comments .mb-cm-submit:hover { opacity: .92; }
.mb-comments .mb-cm-submit:active { transform: scale(.98); }
.mb-comments .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}
.mb-comments .comment-form-cookies-consent label { font-size: 12.5px; color: #6b7280; }
.mb-comments .logged-in-as,
.mb-comments .must-log-in { font-size: 13px; color: #6b7280; margin: 0 0 12px; }

@media (min-width: 720px) {
	.mb-comments .comment-form-author,
	.mb-comments .comment-form-email,
	.mb-comments .comment-form-url {
		display: inline-flex;
		width: calc(33.33% - 8px);
		margin-right: 12px;
		vertical-align: top;
	}
	.mb-comments .comment-form-url { margin-right: 0; }
}
