/* Theme-neutral by design: everything inherits the surrounding text color
   and font, and every accent is exposed as a CSS custom property with a
   sensible default — a theme can override any of these without touching
   this file, just by setting the variable elsewhere. */

/* Puts the "Add a review" form above the existing reviews instead of
   WooCommerce's default order (reviews list, then form). #comments and
   #review_form_wrapper are plain siblings inside #reviews in WooCommerce's
   own review template — this has held across WC versions — so reordering
   with flexbox is enough; no need to move any DOM nodes with JS, which
   keeps whatever event listeners WooCommerce's own comment-reply script
   has already attached to the form untouched. */
#reviews {
	display: flex;
	flex-direction: column;
}

#reviews #review_form_wrapper {
	order: -1;
}

#reviews #comments {
	order: 1;
}

.epr-verified-badge {
	--epr-badge-bg: rgba(34, 197, 94, 0.12);
	--epr-badge-border: rgba(34, 197, 94, 0.4);
	--epr-badge-text: #16a34a;

	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-bottom: 0.5em;
	padding: 0.2em 0.7em;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.6;
	border-radius: 999px;
	background: var(--epr-badge-bg);
	border: 1px solid var(--epr-badge-border);
	color: var(--epr-badge-text);
}

.epr-verified-badge::before {
	content: "✓";
	font-weight: 700;
}

.epr-helpful {
	margin-top: 0.75em;
}

.epr-helpful-btn {
	--epr-btn-bg: transparent;
	--epr-btn-border: currentColor;
	--epr-btn-text: inherit;

	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.35em 0.9em;
	font: inherit;
	font-size: 0.85em;
	color: var(--epr-btn-text);
	background: var(--epr-btn-bg);
	border: 1px solid var(--epr-btn-border);
	border-radius: 6px;
	opacity: 0.75;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

.epr-helpful-btn:hover:not(:disabled) {
	opacity: 1;
	background: rgba(128, 128, 128, 0.08);
}

.epr-helpful-btn:disabled,
.epr-helpful-btn.is-voted {
	opacity: 0.55;
	cursor: default;
}

.epr-helpful-btn.is-voted::before {
	content: "✓ ";
}
