/* Front-page reader comments: form card + paginated list.
   Scoped to .cpt-comments so it cannot leak into article comments. */

.cpt-comments .section-head {
	margin-bottom: 30px;
}

.cpt-comment-form-card,
.cpt-comment-list-wrap {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}

.cpt-comment-form-card {
	padding: 28px 30px 26px;
	border: 1px solid #e5e9f0;
	border-radius: 16px;
	background: #fff;
}

.cpt-comments .cpt-form-title {
	margin: 0 0 6px;
	color: #111827;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.2px;
	line-height: 1.3;
}

.cpt-comments .cpt-form-note {
	margin: 0 0 18px;
	color: #7a8699;
	font-size: 13px;
	line-height: 1.5;
}

/* Fields: two-column grid so name and email always share a row */
.cpt-comments .cpt-comment-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 16px;
	align-items: start;
}

.cpt-comments .cpt-comment-form > p {
	margin: 0 0 14px;
}

.cpt-comments .cpt-comment-form .comment-form-comment,
.cpt-comments .cpt-comment-form .comment-form-cookies-consent,
.cpt-comments .cpt-comment-form .form-submit,
.cpt-comments .cpt-comment-form .logged-in-as {
	grid-column: 1 / -1;
}

.cpt-comments .cpt-comment-form label {
	display: block;
	margin-bottom: 6px;
	color: #46536a;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.cpt-comments .cpt-comment-form input[type="text"],
.cpt-comments .cpt-comment-form input[type="email"],
.cpt-comments .cpt-comment-form input[type="url"],
.cpt-comments .cpt-comment-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: 1px solid #dfe5ee;
	border-radius: 10px;
	background: #fff;
	color: #172033;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.cpt-comments .cpt-comment-form textarea {
	min-height: 112px;
	resize: vertical;
}

.cpt-comments .cpt-comment-form input:focus,
.cpt-comments .cpt-comment-form textarea:focus {
	border-color: #1769e0;
	box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
	outline: none;
}

/* Submit */
.cpt-comments .cpt-comment-form .form-submit {
	margin: 4px 0 0;
}

.cpt-comments .cpt-comment-submit {
	padding: 11px 24px;
	border: 0;
	border-radius: 10px;
	background: #1769e0;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 140ms ease, transform 140ms ease;
}

.cpt-comments .cpt-comment-submit:hover {
	background: #1259c4;
}

.cpt-comments .cpt-comment-submit:active {
	transform: translateY(1px);
}

/* Cookie consent line */
.cpt-comments .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 2px 0 10px;
}

.cpt-comments .comment-form-cookies-consent input {
	margin-top: 3px;
}

.cpt-comments .comment-form-cookies-consent label {
	margin: 0;
	color: #7a8699;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}

.cpt-comments .logged-in-as {
	margin: 0 0 14px;
	color: #7a8699;
	font-size: 13px;
}

.cpt-comments .logged-in-as a {
	color: #1769e0;
}

/* Notice after a successful post */
.cpt-comments .cpt-comment-notice {
	max-width: 780px;
	margin: 0 auto 18px;
	padding: 12px 16px;
	border: 1px solid #cfe0f8;
	border-radius: 12px;
	background: #f1f7ff;
	color: #12539f;
	font-size: 14px;
	line-height: 1.5;
}

/* List */
.cpt-comment-list-wrap {
	margin-top: 38px;
}

.cpt-comments .cpt-comment-count {
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #e9edf3;
	color: #7a8699;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cpt-comments .cpt-comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpt-comments .cpt-comment {
	padding: 22px 0;
	border-bottom: 1px solid #edf0f4;
}

.cpt-comments .cpt-comment-main {
	display: flex;
	gap: 14px;
}

/* Replies sit in a nested list with a rail, so the thread reads as a thread */
.cpt-comments .cpt-comment-children {
	margin: 16px 0 2px 58px;
	padding: 0 0 0 18px;
	list-style: none;
	border-left: 2px solid #e3eaf5;
}

.cpt-comments .cpt-comment-children .cpt-comment {
	padding: 14px 0;
	border-bottom: 1px solid #f1f4f8;
}

.cpt-comments .cpt-comment-children .cpt-comment:last-child {
	padding-bottom: 2px;
	border-bottom: 0;
}

.cpt-comments .cpt-comment-children .cpt-comment-avatar {
	width: 32px;
	height: 32px;
	font-size: 13px;
	background: #f1f6fd;
}

.cpt-comments .cpt-comment-children .cpt-comment-children {
	margin-left: 30px;
	padding-left: 14px;
}

.cpt-comments .cpt-comment-replyto {
	color: #6b7a90;
	font-size: 12px;
	font-weight: 500;
	padding: 2px 8px;
	border-radius: 6px;
	background: #f2f6fb;
}

.cpt-comments .cpt-replyto-short {
	display: none;
}

.cpt-comments .cpt-comment-reply {
	margin-left: 4px;
	color: #1769e0;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
}

.cpt-comments .cpt-comment-reply:hover {
	text-decoration: underline;
}

/* "Replying to X" strip above the form */
.cpt-comments .cpt-comment-replybanner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
	padding: 9px 12px;
	border-radius: 10px;
	background: #f1f7ff;
	color: #3d4a5f;
	font-size: 13px;
}

.cpt-comments .cpt-comment-replybanner strong {
	color: #111827;
}

.cpt-comments .cpt-comment-replybanner a {
	color: #1769e0;
	font-weight: 600;
	text-decoration: none;
}

/* Core's "Cancel reply" only makes sense with the JS form mover, which this
   template does not use; the banner above the form carries the cancel link. */
.cpt-comments #cancel-comment-reply-link {
	display: none;
}

.cpt-comments .cpt-comment-avatar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #eaf2ff;
	color: #1769e0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.cpt-comments .cpt-comment-body {
	flex: 1;
	min-width: 0;
}

.cpt-comments .cpt-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 6px;
}

.cpt-comments .cpt-comment-author {
	color: #111827;
	font-size: 14.5px;
	font-weight: 700;
}

.cpt-comments .cpt-comment-date {
	color: #9aa5b5;
	font-size: 12.5px;
}

.cpt-comments .cpt-comment-text {
	color: #3d4a5f;
	font-size: 15px;
	line-height: 1.66;
	overflow-wrap: anywhere;
}

.cpt-comments .cpt-comment-text p {
	margin: 0 0 10px;
}

.cpt-comments .cpt-comment-text p:last-child {
	margin-bottom: 0;
}

.cpt-comments .cpt-comment-empty {
	margin: 0;
	padding: 24px 0;
	color: #7a8699;
	font-size: 15px;
}

/* Pagination */
.cpt-comments .cpt-comments-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 26px;
}

.cpt-comments .cpt-comments-pager a {
	padding: 8px 16px;
	border: 1px solid #dbe3ee;
	border-radius: 999px;
	background: #fff;
	color: #1c4f9c;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 140ms ease, background 140ms ease;
}

.cpt-comments .cpt-comments-pager a:hover,
.cpt-comments .cpt-comments-pager a:focus-visible {
	border-color: #bcd2f3;
	background: #f2f7ff;
	color: #1769e0;
}

.cpt-comments .cpt-pager-status {
	color: #7a8699;
	font-size: 13px;
}

@media (max-width: 640px) {
	.cpt-comment-form-card {
		padding: 22px 18px 20px;
		border-radius: 14px;
	}

	.cpt-comments .cpt-comment-form {
		grid-template-columns: 1fr;
	}

	.cpt-comments .cpt-comment {
		padding: 18px 0;
	}

	.cpt-comments .cpt-comment-main {
		gap: 12px;
	}

	.cpt-comments .cpt-comment-meta {
		gap: 8px;
	}

	.cpt-comments .cpt-replyto-long {
		display: none;
	}

	.cpt-comments .cpt-replyto-short {
		display: inline;
	}

	.cpt-comments .cpt-comment-replyto {
		padding: 2px 6px;
		font-size: 11.5px;
	}

	.cpt-comments .cpt-comment-children {
		margin-left: 24px;
		padding-left: 12px;
	}

	.cpt-comments .cpt-comment-children .cpt-comment-children {
		margin-left: 10px;
		padding-left: 10px;
	}

	.cpt-comments .cpt-comment-avatar {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.cpt-comments .cpt-comment-text {
		font-size: 14.5px;
	}

	.cpt-comments .cpt-comments-pager {
		gap: 10px;
	}
}
