/**
 * Inoforest Post Comments
 *
 * Contents
 * 1. Variables
 * 2. Title and comment list
 * 3. Comment box: avatar, author and badge, date, text, reply link
 * 3b. List layout (Style → Comments → Layout: List)
 * 4. Comment pages and closed notice
 * 5. Reply form: box, title, notes, grid, labels, fields, consent, button
 * 6. Editor hint
 * 7. Responsive and reduced motion
 *
 * Styles WordPress's own comment classes (wp_list_comments, comment_form), always inside .inoforest-post-comments, so
 * other comment areas on the site (tour reviews, the theme's own single.php) are untouched. Colours read the Design
 * System (--inoforest-color-*) with the Travel26 design as fallback; the panel's Style controls set the --ino-pc-*
 * variables or style the parts with one class more, so they win without !important.
 */

/* 1. Variables ------------------------------------------------------------------------------------------------------- */
.inoforest-post-comments {
	--ino-pc-primary: var(--inoforest-color-primary, #0b7a75);
	--ino-pc-primary-dark: color-mix(in srgb, var(--ino-pc-primary) 75%, #000);
	--ino-pc-primary-light: color-mix(in srgb, var(--ino-pc-primary) 10%, #fff);
	--ino-pc-accent: var(--inoforest-color-accent, #ff6a3d);
	--ino-pc-heading: var(--inoforest-color-heading, #0d1b2a);
	--ino-pc-text: var(--inoforest-color-text, #5a6a79);
	--ino-pc-muted: #8b99a6;
	--ino-pc-border: var(--inoforest-color-border, #e5ebef);
	--ino-pc-soft: var(--inoforest-color-surface, #f4f8f8);
	--ino-pc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	color: var(--ino-pc-text);
}

.inoforest-post-comments[data-avatars="no"] {
	--ino-pc-avatar: 0px;
	--ino-pc-avatar-gap: 0px;
}

/* 2. Title and comment list ---------------------------------------------------------------------------------------------- */
.inoforest-post-comments .comments-title {
	margin: 0 0 30px;
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--ino-pc-heading);
}

.inoforest-post-comments .comment-list,
.inoforest-post-comments .comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.inoforest-post-comments .comment-list li {
	margin: 0;
	padding: 0;
}

.inoforest-post-comments .comment-list .children {
	margin-left: var(--ino-pc-indent, 70px);
}

/* 3. Comment box -------------------------------------------------------------------------------------------------------- */
.inoforest-post-comments .comment-body {
	position: relative;
	margin: 0 0 var(--ino-pc-spacing, 24px);
	padding: var(--ino-pc-pad-t, 26px) var(--ino-pc-pad-r, 28px) var(--ino-pc-pad-b, 24px) calc(var(--ino-pc-pad-l, 28px) + var(--ino-pc-avatar, 60px) + var(--ino-pc-avatar-gap, 22px));
	background: var(--ino-pc-comment-bg, #fff);
	border: 1px solid var(--ino-pc-border);
	border-radius: 24px;
}

.inoforest-post-comments .bypostauthor > .comment-body {
	background: var(--ino-pc-author-bg, var(--ino-pc-soft));
	border-color: transparent;
}

.inoforest-post-comments :is(.pingback, .trackback) .comment-body {
	padding-left: var(--ino-pc-pad-l, 28px);
}

.inoforest-post-comments .comment-meta {
	padding-right: 100px;
}

/* Two classes and the element out-rank Elementor's ".elementor img" reset. */
.inoforest-post-comments .comment-author img.avatar {
	position: absolute;
	top: var(--ino-pc-pad-t, 26px);
	left: var(--ino-pc-pad-l, 28px);
	width: var(--ino-pc-avatar, 60px);
	max-width: none;
	height: var(--ino-pc-avatar, 60px);
	object-fit: cover;
	border-radius: var(--ino-pc-avatar-radius, 50%);
}

.inoforest-post-comments .comment-author .fn {
	font-size: 1.05rem;
	font-style: normal;
	font-weight: 800;
	color: var(--ino-pc-heading);
}

.inoforest-post-comments .comment-author .fn a {
	color: inherit;
	text-decoration: none;
}

.inoforest-post-comments .comment-author .says {
	display: none;
}

.inoforest-post-comments .inoforest-post-comments__badge {
	display: inline-block;
	margin-left: 8px;
	padding: 3px 10px;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
	vertical-align: middle;
	color: #fff;
	background: var(--ino-pc-accent);
	border-radius: 999px;
}

.inoforest-post-comments .comment-metadata {
	margin: 0 0 10px;
	font-size: 0.85rem;
	color: var(--ino-pc-muted);
}

.inoforest-post-comments .comment-metadata a {
	color: inherit;
	text-decoration: none;
	transition: color 0.35s var(--ino-pc-ease);
}

.inoforest-post-comments .comment-metadata a:hover,
.inoforest-post-comments .comment-metadata a:focus-visible {
	color: var(--ino-pc-primary);
}

.inoforest-post-comments .comment-metadata .edit-link {
	margin-left: 8px;
}

.inoforest-post-comments .comment-awaiting-moderation {
	display: block;
	margin: 0 0 10px;
	font-size: 0.85rem;
	color: var(--ino-pc-accent);
}

.inoforest-post-comments .comment-content {
	color: var(--ino-pc-text);
}

.inoforest-post-comments .comment-content p {
	margin: 0 0 0.6rem;
}

.inoforest-post-comments .comment-body .reply {
	position: absolute;
	top: 24px;
	right: 24px;
}

.inoforest-post-comments .comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.75;
	color: var(--ino-pc-primary);
	text-decoration: none;
	background: var(--ino-pc-primary-light);
	border: 0 solid transparent;
	border-radius: 999px;
	transition: background-color 0.35s var(--ino-pc-ease), color 0.35s var(--ino-pc-ease), border-color 0.35s var(--ino-pc-ease);
}

.inoforest-post-comments .comment-reply-link::before {
	content: "";
	flex: none;
	width: 1.1em;
	height: 1.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.inoforest-post-comments .comment-reply-link:hover,
.inoforest-post-comments .comment-reply-link:focus-visible {
	color: #fff;
	background: var(--ino-pc-primary);
}

.inoforest-post-comments :is(a, button):focus-visible {
	outline: 2px solid var(--ino-pc-primary);
	outline-offset: 2px;
}

/* 3b. List layout (Food26 recipe.html): no boxes, a line between threads, the avatar beside the name, date and text,
   Reply as a link under them. Attribute selectors out-rank the Cards rules above; the Style controls still win. */
.inoforest-post-comments[data-layout="list"] .comment-list > li + li {
	margin-top: var(--ino-pc-spacing, 26px);
	padding-top: var(--ino-pc-spacing, 26px);
	border-top: 1px solid var(--ino-pc-border);
}

.inoforest-post-comments[data-layout="list"] .comment-list .children {
	margin: 22px 0 0;
	padding-inline-start: var(--ino-pc-indent, 50px);
}

.inoforest-post-comments[data-layout="list"] .comment-body {
	display: grid;
	grid-template-columns: var(--ino-pc-avatar, 56px) minmax(0, 1fr);
	gap: 4px var(--ino-pc-avatar-gap, 18px);
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.inoforest-post-comments[data-layout="list"][data-avatars="no"] .comment-body {
	grid-template-columns: minmax(0, 1fr);
	column-gap: 0;
}

.inoforest-post-comments[data-layout="list"] :is(.comment-meta, .comment-author) {
	display: contents;
}

.inoforest-post-comments[data-layout="list"] .comment-author img.avatar {
	position: static;
	grid-column: 1;
	grid-row: 1 / span 6;
	width: var(--ino-pc-avatar, 56px);
	height: var(--ino-pc-avatar, 56px);
}

.inoforest-post-comments[data-layout="list"] .comment-body > *,
.inoforest-post-comments[data-layout="list"] :is(.comment-author .fn, .comment-metadata, .comment-awaiting-moderation) {
	grid-column: -2 / -1;
}

.inoforest-post-comments[data-layout="list"] .comment-author .fn {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.inoforest-post-comments[data-layout="list"] .inoforest-post-comments__badge {
	margin: 0;
}

.inoforest-post-comments[data-layout="list"] :is(.comment-metadata, .comment-awaiting-moderation) {
	margin: 0;
}

.inoforest-post-comments[data-layout="list"] .comment-content p {
	margin: 6px 0 10px;
}

.inoforest-post-comments[data-layout="list"] .comment-body .reply {
	position: static;
}

.inoforest-post-comments[data-layout="list"] .comment-reply-link {
	padding: 0;
	background: none;
	border-radius: 0;
}

.inoforest-post-comments[data-layout="list"] .comment-reply-link:hover,
.inoforest-post-comments[data-layout="list"] .comment-reply-link:focus-visible {
	color: var(--ino-pc-primary-dark);
	background: none;
}

.inoforest-post-comments[data-layout="list"] .comment-list .comment-respond {
	margin: 22px 0 0;
}

/* 4. Comment pages and closed notice ---------------------------------------------------------------------------------------- */
.inoforest-post-comments .comment-navigation {
	margin: 0 0 24px;
}

.inoforest-post-comments .comment-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	font-weight: 700;
}

.inoforest-post-comments .comment-navigation a {
	color: var(--ino-pc-primary);
	text-decoration: none;
}

/* Comments closed (blog-details.html?closed): the comments stay, this notice replaces the form. */
.inoforest-post-comments .no-comments {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 6px 0 24px;
	padding: 20px 26px;
	font-weight: 600;
	color: var(--ino-pc-heading);
	background: var(--ino-pc-soft);
	border-radius: 24px;
}

.inoforest-post-comments .no-comments::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--ino-pc-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7 5h14v12H10l-4 3v-3H3V5h1'/%3E%3Cpath d='M2 2l20 20' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7 5h14v12H10l-4 3v-3H3V5h1'/%3E%3Cpath d='M2 2l20 20' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 5. Reply form ------------------------------------------------------------------------------------------------------------ */
.inoforest-post-comments .comment-respond {
	margin-top: var(--ino-pc-form-space, 50px);
	padding: 44px;
	background: var(--ino-pc-form-bg, var(--ino-pc-soft));
	border-radius: 24px;
}

.inoforest-post-comments .comment-list .comment-respond {
	margin: 0 0 var(--ino-pc-spacing, 24px);
}

.inoforest-post-comments .comments-area > .comment-respond:first-child {
	margin-top: 0;
}

.inoforest-post-comments .comment-reply-title {
	margin: 0 0 10px;
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--ino-pc-heading);
}

.inoforest-post-comments .comment-reply-title small {
	margin-left: 10px;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0;
}

.inoforest-post-comments .comment-reply-title small a {
	color: var(--ino-pc-accent);
	text-decoration: none;
}

.inoforest-post-comments :is(.comment-notes, .logged-in-as) {
	font-size: 0.925rem;
}

.inoforest-post-comments .logged-in-as a {
	color: var(--ino-pc-primary);
	text-decoration: none;
}

.inoforest-post-comments .comment-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: var(--ino-pc-field-gap, 20px);
}

.inoforest-post-comments[data-columns="2"] .comment-form {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inoforest-post-comments .comment-form > * {
	grid-column: 1 / -1;
	margin: 0 0 var(--ino-pc-field-gap, 20px);
}

.inoforest-post-comments[data-columns="2"] .comment-form > :is(.comment-form-author, .comment-form-email) {
	grid-column: auto;
}

.inoforest-post-comments .comment-form label {
	display: block;
	margin: 0 0 8px;
	font-size: 0.925rem;
	font-weight: 700;
	color: var(--ino-pc-heading);
}

.inoforest-post-comments .required {
	color: var(--ino-pc-accent);
}

.inoforest-post-comments .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: var(--ino-pc-field-height, 56px);
	margin: 0;
	padding: 14px 20px;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: var(--ino-pc-heading);
	background: #fff;
	border: 1px solid var(--ino-pc-border);
	border-radius: 10px;
	outline: 0;
	box-shadow: none;
	transition: border-color 0.35s var(--ino-pc-ease), box-shadow 0.35s var(--ino-pc-ease);
}

/* Seven lines, as in the design (WordPress prints rows="8"); the Comment box height control sets a fixed height. */
.inoforest-post-comments .comment-form textarea {
	height: var(--ino-pc-textarea-height, calc(7lh + 30px));
	min-height: 100px;
	resize: vertical;
}

.inoforest-post-comments .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea):focus {
	border-color: var(--ino-pc-primary);
	box-shadow: 0 0 0 4px var(--ino-pc-focus-ring, var(--ino-pc-primary-light));
}

.inoforest-post-comments .comment-form :is(input, textarea)::placeholder {
	color: var(--ino-pc-muted);
	opacity: 1;
}

.inoforest-post-comments .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.inoforest-post-comments .comment-form-cookies-consent input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 5px 0 0;
	accent-color: var(--ino-pc-primary);
}

.inoforest-post-comments .comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 500;
	color: var(--ino-pc-text);
}

.inoforest-post-comments .comment-form .form-submit {
	margin-bottom: 0;
}

.inoforest-post-comments .form-submit .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	margin: 0;
	padding: 14px 30px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
	background: var(--ino-pc-primary);
	border: 2px solid var(--ino-pc-primary);
	border-radius: 999px;
	transition: background-color 0.35s var(--ino-pc-ease), border-color 0.35s var(--ino-pc-ease), color 0.35s var(--ino-pc-ease), transform 0.35s var(--ino-pc-ease), box-shadow 0.35s var(--ino-pc-ease);
}

.inoforest-post-comments .form-submit .submit :is(svg, i) {
	flex: none;
	width: 1.15em;
	height: 1.15em;
	font-size: 1.15em;
	fill: currentColor;
}

.inoforest-post-comments .form-submit .submit:hover,
.inoforest-post-comments .form-submit .submit:focus-visible {
	color: #fff;
	background: var(--ino-pc-primary-dark);
	border-color: var(--ino-pc-primary-dark);
	box-shadow: 0 12px 24px -10px var(--ino-pc-primary-dark);
	transform: translateY(-2px);
}

/* 6. Editor hint ------------------------------------------------------------------------------------------------------------ */
.inoforest-post-comments__hint {
	margin: 0 0 16px;
	padding: 12px 16px;
	font-size: 0.875rem;
	text-align: center;
	border: 1px dashed var(--inoforest-color-border, #e5ebef);
	border-radius: 12px;
}

/* 7. Responsive and reduced motion -------------------------------------------------------------------------------------------- */
@media (max-width: 991px) {
	.inoforest-post-comments .comment-list .children {
		margin-left: var(--ino-pc-indent, 36px);
	}
}

@media (max-width: 767px) {
	/* The Travel26 design's 15 px base font on phones (cards). */
	.inoforest-post-comments:not([data-layout="list"]) {
		font-size: 15px;
		--ino-pc-pad-t: 20px;
		--ino-pc-pad-r: 20px;
		--ino-pc-pad-b: 20px;
		--ino-pc-pad-l: 20px;
		--ino-pc-avatar: 50px;
		--ino-pc-avatar-gap: 16px;
	}

	.inoforest-post-comments[data-avatars="no"] {
		--ino-pc-avatar: 0px;
		--ino-pc-avatar-gap: 0px;
	}

	.inoforest-post-comments .comment-list .children {
		margin-left: var(--ino-pc-indent, 16px);
	}

	.inoforest-post-comments[data-layout="list"] .comment-list .children {
		margin-left: 0;
		padding-inline-start: var(--ino-pc-indent, 20px);
	}

	.inoforest-post-comments .comment-meta {
		padding-right: 0;
	}

	.inoforest-post-comments .comment-body .reply {
		position: static;
		margin-top: 10px;
	}

	.inoforest-post-comments .comment-respond {
		padding: 28px 22px;
	}

	.inoforest-post-comments[data-columns="2"] .comment-form {
		grid-template-columns: minmax(0, 1fr);
	}

	.inoforest-post-comments[data-columns="2"] .comment-form > :is(.comment-form-author, .comment-form-email) {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.inoforest-post-comments .form-submit .submit,
	.inoforest-post-comments .comment-reply-link,
	.inoforest-post-comments .comment-metadata a {
		transition: none;
	}

	.inoforest-post-comments .form-submit .submit:hover,
	.inoforest-post-comments .form-submit .submit:focus-visible {
		transform: none;
	}
}
