/**
 * Blog comments + WooCommerce product reviews — card layout, kit forms, gold stars.
 */

/* —— Shared section titles —— */
.aux-comments .comments-title,
#reviews .woocommerce-Reviews-title,
#respond .comment-reply-title,
#reply-title {
	border-bottom: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	color: var(--zitex-heading);
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 700;
	margin: 0 0 1.5rem;
	padding-bottom: 0.75rem;
	position: relative;
}

.aux-comments .comments-title::after,
#reviews .woocommerce-Reviews-title::after,
#respond .comment-reply-title::after {
	background: var(--zitex-primary);
	bottom: -1px;
	content: "";
	height: 3px;
	inset-inline-start: 0;
	position: absolute;
	width: 4rem;
}

/* —— Blog comment list —— */
.aux-comments {
	margin-bottom: 2.5rem;
}

.aux-commentlist {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 2rem;
	padding: 0;
}

.aux-commentlist > li {
	border: none !important;
	border-radius: 0;
	box-shadow: none !important;
	list-style: none;
	margin: 0;
	padding: 1.25rem 1.5rem;
}

.aux-commentlist > li:nth-child(odd) {
	background: #fff;
}

.aux-commentlist > li:nth-child(even) {
	background: color-mix(in srgb, var(--zitex-text) 7%, var(--zitex-bg));
}

.aux-commentlist.skin-arrow-links > li,
.aux-comments .aux-commentlist > li {
	border-top: none !important;
	border-bottom: none !important;
	outline: none;
}

.aux-commentlist .avatar {
	border-color: color-mix(in srgb, var(--zitex-primary) 45%, var(--zitex-bg)) !important;
}

.aux-commentlist .comment {
	overflow: hidden;
}

.aux-commentlist .avatar {
	border: 2px solid color-mix(in srgb, var(--zitex-primary) 55%, var(--zitex-bg));
	border-radius: 50%;
	float: inline-start;
	height: 56px;
	margin-inline-end: 1rem;
	width: 56px;
}

.aux-commentlist .comment .comment-author,
.aux-commentlist .comment .comment-body,
.aux-commentlist .comment .comment-reply-nav {
	margin-inline-start: 4.5rem;
}

.aux-commentlist .comment .comment-author cite,
.aux-commentlist .comment .comment-author .fn {
	color: var(--zitex-heading);
	font-size: 1rem;
	font-style: normal;
	font-weight: 700;
}

.aux-commentlist .comment .comment-author time a {
	color: color-mix(in srgb, var(--zitex-text) 75%, var(--zitex-bg));
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
}

.aux-commentlist .comment .comment-body {
	color: var(--zitex-text);
	font-size: 0.9875rem;
	line-height: 1.75;
	margin-top: 0.5rem;
}

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

.aux-commentlist .comment .comment-reply-nav {
	margin-top: 0.75rem;
}

.aux-commentlist .comment .comment-reply-nav a,
.aux-commentlist .comment .comment-edit-link {
	color: var(--zitex-secondary);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}

.aux-commentlist .comment .comment-reply-nav a:hover,
.aux-commentlist .comment .comment-edit-link:hover {
	color: var(--zitex-heading);
	text-decoration: underline;
}

.aux-commentlist .comment .comment-edit-link {
	inset-inline-end: 0;
	position: absolute;
	top: 1.25rem;
}

.aux-commentlist .children {
	border: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
}

.aux-commentlist .children > li {
	border: none !important;
	padding: 1rem 1.5rem 1rem 2.5rem;
}

.aux-commentlist .children > li:nth-child(odd) {
	background: color-mix(in srgb, var(--zitex-primary) 6%, #fff);
}

.aux-commentlist .children > li:nth-child(even) {
	background: color-mix(in srgb, var(--zitex-text) 5%, var(--zitex-bg));
}

.aux-commentlist.skin-arrow-links .children > li:first-child {
	background: none;
	padding-inline-start: 0;
}

.bypostauthor > header .fn {
	background: var(--zitex-secondary);
	border-radius: 999px;
	color: #fff;
	display: inline-block !important;
	font-size: 0.8125rem;
	padding: 0.15em 0.65em;
}

/* Comment pagination */
.aux-comments-navi {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin: 1.5rem 0;
}

.aux-comments-navi a {
	border: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	border-radius: var(--zitex-radius-button);
	color: var(--zitex-secondary);
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.45em 1em;
	text-decoration: none;
}

.aux-comments-navi a:hover {
	background: color-mix(in srgb, var(--zitex-primary) 12%, #fff);
	border-color: var(--zitex-primary);
	color: var(--zitex-heading);
}

/* —— Comment / review form panel —— */
#respond.zitex-comment-respond,
.single-product #review_form #respond {
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	border-radius: var(--zitex-radius-card);
	box-shadow: var(--zitex-shadow-card);
	margin-bottom: 2.5rem;
	margin-top: 2rem;
	max-width: 100%;
	padding: 1.5rem 1.75rem;
}

.comment + #respond,
.aux-commentlist + #respond {
	border-top: none !important;
	margin-top: 1rem;
	padding-top: 1.5rem;
}

#commentform.zitex-comment-form,
#commentform.comment-form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

#commentform.zitex-comment-form .comment-notes,
#commentform.zitex-comment-form .logged-in-as {
	color: color-mix(in srgb, var(--zitex-text) 75%, var(--zitex-bg));
	font-size: 0.875rem;
	margin: 0;
}

#commentform.zitex-comment-form .comment-form-author,
#commentform.zitex-comment-form .comment-form-email,
#commentform.zitex-comment-form .comment-form-url {
	margin: 0;
}

@media (min-width: 640px) {
	#commentform.zitex-comment-form .comment-form-author,
	#commentform.zitex-comment-form .comment-form-email {
		display: inline-block;
		vertical-align: top;
		width: calc(50% - 0.4rem);
	}

	#commentform.zitex-comment-form .comment-form-author {
		margin-inline-end: 0.75rem;
	}
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea,
#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
	background: var(--zitex-bg);
	border: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	border-radius: var(--zitex-radius-button);
	color: var(--zitex-text);
	font-size: 1rem;
	line-height: 1.5;
	min-height: var(--zitex-btn-min-height);
	padding: 0.65em 0.85em;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

#commentform textarea,
#review_form textarea {
	min-height: 8rem;
	resize: vertical;
}

#commentform input:focus,
#commentform textarea:focus,
#review_form input:focus,
#review_form textarea:focus {
	background: #fff;
	border-color: var(--zitex-secondary);
	box-shadow: 0 0 0 2px rgba(61, 73, 56, 0.15);
	outline: none;
}

#commentform .aux-form-cookies-consent,
#commentform .comment-form-cookies-consent {
	align-items: flex-start;
	display: flex;
	gap: 0.5rem;
	margin: 0.25rem 0 0;
}

#commentform .aux-form-cookies-consent label {
	color: var(--zitex-text);
	font-size: 0.875rem;
	line-height: 1.5;
}

#commentform .form-submit {
	margin: 0.5rem 0 0;
}

#commentform .form-submit .submit.zitex-btn,
#review_form .form-submit input[type="submit"].zitex-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--zitex-btn-min-height);
	padding: 0.65em 1.35em;
	background-color: var(--zitex-primary) !important;
	border: 1px solid var(--zitex-primary) !important;
	border-radius: var(--zitex-radius-button);
	color: var(--zitex-heading) !important;
	font-weight: 600;
	cursor: pointer;
	width: auto;
}

#commentform .form-submit .submit.zitex-btn:hover,
#review_form .form-submit input[type="submit"].zitex-btn:hover {
	background-color: color-mix(in srgb, var(--zitex-primary) 86%, var(--zitex-heading)) !important;
	border-color: color-mix(in srgb, var(--zitex-primary) 86%, var(--zitex-heading)) !important;
}

#cancel-comment-reply-link {
	color: var(--zitex-secondary);
	font-size: 0.875rem;
	font-weight: 600;
	inset-inline-end: 1.75rem;
	position: absolute;
	top: 1.5rem;
	text-decoration: none;
}

#cancel-comment-reply-link:hover {
	color: var(--zitex-heading);
	text-decoration: underline;
}

.nocomments {
	background: color-mix(in srgb, var(--zitex-text) 8%, var(--zitex-bg));
	border: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	border-radius: var(--zitex-radius-button);
	color: var(--zitex-text);
	font-style: normal;
	padding: 1rem 1.25rem;
}

/* —— Star ratings (Woo + Phlox) —— */
.star-rating,
.aux-rating-box.aux-star-rating,
.woocommerce .star-rating {
	color: color-mix(in srgb, var(--zitex-text) 35%, var(--zitex-bg));
	font-size: 1.05rem;
	line-height: 1;
}

.star-rating::before,
.aux-rating-box.aux-star-rating::before,
.woocommerce .star-rating::before {
	color: color-mix(in srgb, var(--zitex-text) 35%, var(--zitex-bg));
}

.star-rating span::before,
.aux-rating-box.aux-star-rating .aux-star-rating-avg::before,
.woocommerce .star-rating span::before {
	color: var(--zitex-primary);
}

#review_form #respond .comment-form-rating label {
	color: var(--zitex-heading);
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

#review_form .stars {
	margin-bottom: 0.5rem;
}

#review_form .stars a {
	border: 1px solid color-mix(in srgb, var(--zitex-text) 22%, var(--zitex-bg));
	border-radius: var(--zitex-radius-button);
	color: var(--zitex-primary);
	display: inline-block;
	font-size: 0;
	height: 2.25rem;
	line-height: 2.25rem;
	margin-inline-end: 0.25rem;
	text-align: center;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
	width: 2.25rem;
}

#review_form .stars a::before {
	font-size: 1.1rem;
}

#review_form .stars a:hover,
#review_form .stars a.active {
	background: color-mix(in srgb, var(--zitex-primary) 15%, #fff);
	border-color: var(--zitex-primary);
}

/* —— WooCommerce reviews list —— */
.single-product #reviews,
.single-product .woocommerce-Reviews {
	margin-top: 2rem;
}

.single-product .aux-reviews-number {
	background: var(--zitex-primary);
	color: var(--zitex-heading);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	margin-inline-start: 0.35rem;
	min-width: 1.5rem;
	padding: 0.1em 0.45em;
	vertical-align: middle;
}

.single-product .woocommerce-Reviews .commentlist {
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 1.5rem 0 2rem;
	padding: 0;
}

.single-product .woocommerce-Reviews .commentlist .comment {
	margin: 0;
}

.single-product .woocommerce-Reviews .commentlist > li {
	border: none !important;
	margin: 0;
	padding: 0;
}

.single-product .woocommerce-Reviews .comment_container {
	border: none !important;
	border-radius: 0;
	box-shadow: none !important;
	display: flex;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
}

.single-product .woocommerce-Reviews .commentlist > li:nth-child(odd) .comment_container {
	background: #fff;
}

.single-product .woocommerce-Reviews .commentlist > li:nth-child(even) .comment_container {
	background: color-mix(in srgb, var(--zitex-text) 7%, var(--zitex-bg));
}

.single-product .woocommerce-Reviews .avatar {
	border: 2px solid color-mix(in srgb, var(--zitex-primary) 55%, var(--zitex-bg));
	border-radius: 50%;
	flex-shrink: 0;
	float: none;
	height: 52px;
	margin: 0;
	width: 52px;
}

.single-product .woocommerce-Reviews .comment-text {
	flex: 1;
	margin: 0;
	min-width: 0;
	position: relative;
}

.single-product .woocommerce-Reviews .comment-text .meta {
	color: color-mix(in srgb, var(--zitex-text) 75%, var(--zitex-bg));
	font-size: 0.8125rem;
	margin-bottom: 0.5rem;
}

.single-product .woocommerce-Reviews .comment-text .meta strong {
	color: var(--zitex-heading);
	font-size: 1rem;
	font-weight: 700;
}

.single-product .woocommerce-Reviews .comment-text .description {
	color: var(--zitex-text);
	line-height: 1.75;
}

.single-product .woocommerce-Reviews .comment-text .description p:last-child {
	margin-bottom: 0;
}

.single-product .woocommerce-Reviews .comment-text .aux-star-rating,
.single-product .woocommerce-Reviews .comment-text .star-rating {
	inset-inline-end: 0;
	margin-bottom: 0.35rem;
	position: absolute;
	top: 0;
	width: fit-content;
}

.single-product .woocommerce-Reviews .comment-text .meta + .description {
	margin-top: 0.25rem;
	padding-top: 2rem;
}

.woocommerce-review-link {
	color: var(--zitex-secondary);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce-review-link:hover {
	color: var(--zitex-heading);
}

/* Mobile */
@media (max-width: 767px) {
	.aux-commentlist .comment .comment-author,
	.aux-commentlist .comment .comment-body,
	.aux-commentlist .comment .comment-reply-nav {
		margin-inline-start: 0;
		margin-top: 0.75rem;
	}

	.aux-commentlist .avatar {
		float: none;
	}

	.single-product .woocommerce-Reviews .comment_container {
		flex-direction: column;
	}

	.single-product .woocommerce-Reviews .comment-text .aux-star-rating,
	.single-product .woocommerce-Reviews .comment-text .star-rating {
		position: static;
	}
}

@media (max-width: 479px) {
	#commentform input[type="text"],
	#commentform input[type="email"],
	#commentform input[type="url"] {
		width: 100%;
	}

	#respond.zitex-comment-respond,
	.single-product #review_form #respond {
		padding: 1.25rem;
	}
}
