/**
 * Comments
 * Reply form (.mtp-comment-form), submit button, and the comments list
 * (numbered top-level comments with un-numbered nested replies).
 */

/* ---------- Comment form ---------- */
.mtp-comment-form-wrapper {
	max-width: 800px;
	margin: 60px auto;
	padding: 40px 20px 0;
	border-top: 1px dashed var(--brand-border);
}

.mtp-comment-form {
	background: var(--brand-white);
	padding: clamp(1.25rem, 4vw, 1.75rem);
	border: 1px solid var(--brand-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

.mtp-comment-form h3 {
	text-align: center;
	margin-bottom: 30px;
	font-size: 1.75rem;
	color: var(--brand-black);
}

.mtp-comment-form p {
	margin-bottom: 20px;
}

.mtp-comment-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--brand-text);
}

.mtp-comment-form .required {
	color: #d32f2f;
}

.mtp-comment-form input[type="text"],
.mtp-comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--brand-border);
	border-radius: var(--radius-sm);
	font-family: var(--font-sans);
	font-size: 1rem;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mtp-comment-form input[type="text"]:focus,
.mtp-comment-form textarea:focus {
	outline: none;
	border-color: var(--brand-purple);
	box-shadow: 0 0 0 3px rgba(112, 92, 200, 0.32);
}

.mtp-comment-form textarea {
	resize: vertical;
	min-height: 120px;
}

.mtp-comment-form input[type="text"]::placeholder,
.mtp-comment-form textarea::placeholder {
	color: var(--brand-text-muted);
	opacity: 0.85;
}

.mtp-submit-button {
	display: block;
	margin: 10px 0 0;
	padding: 14px 32px;
	background-color: var(--brand-black);
	color: var(--brand-white);
	border: 2px solid var(--brand-black);
	border-radius: var(--radius-full);
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: none;
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease,
		box-shadow 0.3s ease,
		transform 0.1s ease;
}

.mtp-submit-button:hover {
	background-color: var(--brand-black);
	border-color: var(--brand-lime);
	box-shadow: 0 0 0 1px var(--brand-lime);
	transform: translateY(-1px);
}

.mtp-submit-button:active {
	transform: translateY(0);
}

.mtp-comment-form .cancel-comment-reply-link {
	display: block;
	text-align: center;
	margin-top: 15px;
	color: var(--brand-text-muted);
	text-decoration: none;
	font-size: 0.9rem;
}

.mtp-comment-form .cancel-comment-reply-link:hover {
	color: var(--brand-purple);
	text-decoration: underline;
}

/* ---------- Comments list ---------- */
.mtp-comments-section {
	max-width: 800px;
	margin: 60px auto;
	padding: 0 20px;
}

#comments {
	max-width: 800px;
	margin: 60px auto;
	padding: 0 20px;
}

#comments-title {
	text-align: center;
	margin-bottom: 40px;
	font-size: 1.75rem;
	color: var(--brand-black);
}

.commentlist {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: comment-counter;
}

.commentlist > li {
	position: relative;
	margin-bottom: 32px;
	padding-bottom: 32px;
	border-bottom: 2px solid var(--brand-border);
	counter-increment: comment-counter;
}

.commentlist > li:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Indent nested/reply comments and remove their numbering. */
.commentlist .children,
.commentlist .children ol,
.commentlist ol.children {
	margin-left: 0;
	margin-top: 24px;
	padding-left: 40px;
	list-style: none;
	counter-reset: none;
	border-left: 2px solid var(--brand-border);
}

.commentlist .children li,
.commentlist .children ol li {
	margin-left: 0;
	padding-left: 0;
	margin-bottom: 24px;
	padding-bottom: 24px;
	list-style: none;
	counter-increment: none;
}

.commentlist .children li:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.commentlist .children li::before,
.commentlist .children ol li::before {
	content: none;
}

.comment-body {
	padding: 0;
}

.comment-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 0.9rem;
}

.comment-author {
	font-style: normal;
	font-weight: 600;
	color: var(--brand-black);
}

.comment-author a {
	color: var(--brand-black);
	text-decoration: none;
}

.comment-author a:hover {
	color: var(--brand-purple);
}

.comment-separator {
	margin: 0 4px;
	color: var(--brand-text-muted);
	opacity: 0.75;
}

.comment-date {
	color: var(--brand-text-muted);
	text-decoration: none;
}

.comment-date:hover {
	color: var(--brand-purple);
}

.comment-content {
	margin-bottom: 12px;
	color: var(--brand-text);
	line-height: 1.6;
}

.comment-content p {
	margin-bottom: 12px;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.comment-reply {
	margin-top: 8px;
}

.comment-reply a {
	color: var(--brand-purple);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
}

.comment-reply a:hover {
	text-decoration: underline;
}
