/* 全站评论模块 */
.yw-single .yw-comments,
.yw-archive .yw-comments {
	margin-top: 28px;
}

.yw-comments {
	background: var(--yw-surface);
	border: 1px solid var(--yw-border);
	border-radius: var(--yw-radius);
	padding: 22px 20px 24px;
	box-shadow: var(--yw-shadow);
}

.yw-comments--embedded {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

.yw-comments__head {
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--yw-border);
}

.yw-comments__title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--yw-text);
}

.yw-comments__empty,
.yw-comments__closed {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #f8fafc;
	color: var(--yw-muted);
	font-size: 14px;
}

.yw-comments__list-wrap + .yw-comment-respond,
.yw-comments__empty + .yw-comment-respond {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--yw-border);
}

.yw-comments__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.yw-comments__list .children {
	list-style: none;
	margin: 12px 0 0;
	padding: 0 0 0 18px;
	border-left: 2px solid #eef2f8;
	display: grid;
	gap: 12px;
}

.yw-comment__card {
	padding: 14px 14px 12px;
	border: 1px solid #eef2f8;
	border-radius: 14px;
	background: #fff;
}

.yw-comment__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.yw-comment__avatar-img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: block;
}

.yw-comment__meta {
	min-width: 0;
}

.yw-comment__author {
	display: block;
	font-style: normal;
	font-size: 14px;
	font-weight: 700;
	color: var(--yw-text);
}

.yw-comment__date {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #94a3b8;
}

.yw-comment__awaiting {
	margin: 0 0 8px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fffbeb;
	color: #b45309;
	font-size: 13px;
}

.yw-comment__content {
	font-size: 14px;
	line-height: 1.65;
	color: #334155;
}

.yw-comment__content p {
	margin: 0 0 8px;
}

.yw-comment__content p:last-child {
	margin-bottom: 0;
}

.yw-comment__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.yw-comment__reply,
.yw-comment__edit a {
	font-size: 13px;
	font-weight: 600;
	color: var(--yw-primary);
	text-decoration: none;
}

.yw-comment__reply:hover,
.yw-comment__edit a:hover {
	text-decoration: underline;
}

.yw-comments .comment-navigation {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	font-size: 13px;
}

.yw-comments .comment-navigation a {
	color: var(--yw-primary);
	text-decoration: none;
	font-weight: 600;
}

.yw-comments .comment-navigation a:hover {
	text-decoration: underline;
}

/* 评论表单 */
.yw-comment-respond {
	margin: 0;
}

.yw-comment-respond .comment-reply-title {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 800;
	color: var(--yw-text);
}

.yw-comment-respond .comment-reply-title small {
	margin-left: 8px;
	font-size: 13px;
	font-weight: 600;
}

.yw-comment-respond .comment-reply-title small a {
	color: var(--yw-muted);
	text-decoration: none;
}

.yw-comment-respond .comment-reply-title small a:hover {
	color: var(--yw-primary);
	text-decoration: underline;
}

.yw-comment-form {
	display: grid;
	gap: 14px;
}

.yw-comment-form__logged-in {
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #f8fafc;
	font-size: 13px;
	color: #64748b;
}

.yw-comment-form__logged-in a {
	color: var(--yw-primary);
	text-decoration: none;
	font-weight: 600;
}

.yw-comment-form__logged-in a:hover {
	text-decoration: underline;
}

.yw-comment-form__field {
	margin: 0;
}

.yw-comment-form__label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #475569;
}

.yw-comment-form__label .required {
	color: #ef4444;
}

.yw-comment-form__input,
.yw-comment-form__textarea {
	width: 100%;
	border: 1px solid var(--yw-border);
	border-radius: 12px;
	padding: 11px 14px;
	font: inherit;
	color: var(--yw-text);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yw-comment-form__textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.55;
}

.yw-comment-form__input:focus,
.yw-comment-form__textarea:focus {
	outline: none;
	border-color: var(--yw-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.yw-comment-form__input::placeholder,
.yw-comment-form__textarea::placeholder {
	color: #94a3b8;
}

.yw-comment-form__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.yw-comment-form__submit {
	min-width: 120px;
}

@media (min-width: 640px) {
	.yw-comment-form--guest {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 639px) {
	.yw-comments {
		padding: 18px 16px 20px;
	}
}
