/**
 * Post-specific styles — only enqueued on single blog posts.
 */

/* ------------------------------------------------------------------ */
/* Greenshift auto-list (table of contents) — legacy block markup     */
/* ------------------------------------------------------------------ */
.gs-autolist {
	border-radius: 0.75rem;
	border: 1px solid var(--color-base-200);
	background: var(--color-base-50);
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.gs-autolist::before {
	content: 'Table of Contents';
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-base-400);
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--color-base-200);
}

.gs-autolist-item {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.375rem 0;
}

.gs-autolist-item.gs_sub_heading {
	padding-left: 1.25rem;
}

.gs-autolist-number {
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--color-base-400);
	min-width: 1.5rem;
}

.gs-autolist-title {
	font-size: 0.875rem;
	line-height: 1.5;
}

.gs-autolist-title a {
	color: var(--color-base-700);
	text-decoration: none;
	transition: color 0.15s;
}

.gs-autolist-title a:hover {
	color: var(--color-base-950);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Comments                                                            */
/* ------------------------------------------------------------------ */

/* Section title */
.comments-title {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-base-400);
	margin-bottom: 1.5rem;
}

/* Comment list */
.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Individual comment card */
.comment-list .comment {
	padding: 0;
	border-bottom: none;
}

.comment-list .comment > .comment-body {
	border-radius: 0.75rem;
	border: 1px solid var(--color-base-200);
	background: var(--color-background);
	padding: 1.25rem;
}

/* Replies (threaded) */
.comment-list .children {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	position: relative;
}

.comment-list .children::before {
	content: '';
	position: absolute;
	left: -0.75rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--color-base-100);
	border-radius: 1px;
}

/* Comment header */
.comment-body .comment-meta {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin-bottom: 0.75rem;
}

.comment-body .avatar {
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	flex-shrink: 0;
	ring: 1px;
	ring-color: var(--color-base-200);
}

.comment-body .comment-author {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	min-width: 0;
}

.comment-body .comment-author .fn {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-base-950);
}

.comment-body .comment-author .fn a {
	color: inherit;
	text-decoration: none;
}

.comment-body .comment-author .says {
	display: none;
}

.comment-body .comment-metadata {
	margin-left: auto;
	flex-shrink: 0;
}

.comment-body .comment-metadata a {
	font-size: 0.6875rem;
	color: var(--color-base-400);
	text-decoration: none;
	white-space: nowrap;
}

.comment-body .comment-metadata a:hover {
	color: var(--color-base-600);
}

/* Comment content */
.comment-body .comment-content {
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--color-base-600);
}

.comment-body .comment-content p {
	margin: 0 0 0.5rem;
}

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

/* Awaiting moderation notice */
.comment-body .comment-awaiting-moderation,
.comment-body .comment-content em:only-child {
	display: block;
	margin-top: 0.5rem;
	padding: 0.5rem 0.75rem;
	font-size: 0.75rem;
	font-style: normal;
	color: var(--color-base-500);
	background: var(--color-base-50);
	border: 1px solid var(--color-base-200);
	border-radius: 0.375rem;
}

/* Reply link */
.comment-body .reply {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--color-base-100);
}

.comment-body .reply a {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--color-base-400);
	text-decoration: none;
	transition: color 0.15s;
}

.comment-body .reply a:hover {
	color: var(--color-base-950);
}

/* No comments */
.no-comments {
	font-size: 0.875rem;
	color: var(--color-base-400);
}

/* ------------------------------------------------------------------ */
/* Comment form                                                        */
/* ------------------------------------------------------------------ */
#respond {
	margin-top: 2rem;
	border-radius: 0.75rem;
	border: 1px solid var(--color-base-200);
	background: var(--color-base-50);
	padding: 1.5rem;
}

#respond .comment-reply-title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-base-950);
	margin-bottom: 0.125rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

/* Cancel reply link */
#respond .comment-reply-title small {
	font-size: 0.75rem;
	font-weight: 500;
}

#respond .comment-reply-title small a {
	color: var(--color-base-400);
	text-decoration: none;
	padding: 0.25rem 0.625rem;
	border-radius: 9999px;
	border: 1px solid var(--color-base-200);
	background: var(--color-background);
	transition: border-color 0.15s, color 0.15s;
}

#respond .comment-reply-title small a:hover {
	color: var(--color-base-700);
	border-color: var(--color-base-300);
}

#respond .comment-notes {
	font-size: 0.8125rem;
	color: var(--color-base-400);
	margin-bottom: 1.25rem;
}

#respond .comment-form-comment,
#respond .comment-form-author,
#respond .comment-form-email,
#respond .comment-form-url {
	margin-bottom: 0.875rem;
}

#respond label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--color-base-700);
	margin-bottom: 0.375rem;
}

#respond .required {
	color: var(--color-destructive);
	font-weight: 600;
}

#respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
	display: block;
	width: 100%;
	padding: 0.625rem 0.75rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--color-base-950);
	background: var(--color-background);
	border: 1px solid var(--color-base-200);
	border-radius: 0.5rem;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
}

#respond textarea:focus,
#respond input[type="text"]:focus,
#respond input[type="email"]:focus,
#respond input[type="url"]:focus {
	border-color: var(--color-base-950);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

#respond textarea {
	min-height: 7rem;
	resize: vertical;
}

/* Author/email/url fields in a grid on desktop */
#respond .comment-form-author,
#respond .comment-form-email,
#respond .comment-form-url {
	display: flex;
	flex-direction: column;
}

@media (min-width: 640px) {
	#respond .comment-form-cookies-consent {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	}
}

#respond .form-submit {
	margin-top: 1rem;
}

#respond .form-submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	background: var(--color-base-950);
	border: none;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: background-color 0.15s;
}

#respond .form-submit input[type="submit"]:hover {
	background: var(--color-base-800);
}

/* Logged-in notice */
#respond .logged-in-as {
	font-size: 0.8125rem;
	color: var(--color-base-400);
	margin-bottom: 1rem;
}

#respond .logged-in-as a {
	color: var(--color-base-600);
	text-decoration: none;
	font-weight: 500;
}

#respond .logged-in-as a:hover {
	color: var(--color-base-950);
}
