/* Customer-facing review look — compact cards. Colors come from the theme's
 * own tokens (and WooCommerce's existing review border), so light/dark mode
 * follow the site toggle. Flex + logical properties keep it RTL/LTR safe.
 * Card height is always content-driven: no height / min-height anywhere. */

/* ---------- Shared pieces ---------- */

/* Row 1: name + badge + stars, packed together. When there isn't
 * room (phones), the stars drop to their own line. */
.vantex-review__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 2px 10px;
	margin: 0;
}
.vantex-review__head .vantex-review__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 8px;
	margin: 0;
	line-height: 1.4;
}
.vantex-review__head .woocommerce-review__author {
	font-size: 0.9375rem;
	line-height: 1.4;
}
.vantex-review__head .star-rating {
	float: none;
	flex: none;
	margin: 0;
}

.vantex-review__verified {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	padding: 0 0.55em;
	border-radius: 999px;
	font-size: 0.75rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.5;
	color: var(--wp--preset--color--primary, #0066ff);
	background: rgba(var(--forte-accent-rgb, 0, 102, 255), 0.1);
	white-space: nowrap;
}

.vantex-review__product-line {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.3;
}
.vantex-review__product {
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--light-silver, #5b5f68);
}
.vantex-review__product:hover,
.vantex-review__product:focus-visible {
	color: var(--wp--preset--color--primary, #0066ff);
	text-decoration: underline;
}

/* Date: small and lighter, under the text. */
.vantex-review__date-line {
	margin: 4px 0 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--wp--preset--color--light-silver, #5b5f68);
	opacity: 0.8;
}

/* ---------- Product page (WooCommerce classic review list) ----------
 * The card is the whole row: avatar + content inside one bordered box
 * (same border as before), instead of a tall box with the avatar outside.
 * Selectors carry WooCommerce's own prefix so they win over its defaults. */

.woocommerce #reviews .woocommerce-Reviews-title {
	margin: 0 0 12px;
	/* !important: the site's Additional CSS forces every h2 to a large size on phones. */
	font-size: 1rem !important;
	font-weight: 700;
	line-height: 1.4 !important;
}

.woocommerce #reviews #comments ol.commentlist li.review {
	margin: 0 0 12px;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment_container {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	border: 1px solid #e1dde7;
	border-radius: 4px;
}
.woocommerce #reviews #comments ol.commentlist li.review img.avatar {
	position: static;
	float: none;
	flex: none;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	object-fit: cover;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment-text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment-text p {
	margin: 0;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment-text .description {
	margin: 2px 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment-text .vantex-review__date-line {
	margin-top: 4px;
}
.woocommerce #reviews #comments ol.commentlist li.review .comment-text .vantex-review__product-line {
	margin-top: 2px;
}

/* ---------- Showcase section ---------- */

.vantex-reviews-section { margin-block: 2rem; }
.vantex-reviews-section__title { margin: 0 0 1rem; }

.vantex-reviews-grid {
	display: grid;
	align-items: start;
	gap: 12px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}
@media (min-width: 1024px) {
	.vantex-reviews-grid { grid-template-columns: repeat(var(--vantex-review-cols, 3), minmax(0, 1fr)); }
}

.vantex-review-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	border: 1px solid var(--wp--preset--color--border-glow, #e2e4e8);
	border-radius: 16px;
	background: var(--wp--preset--color--surface, #fff);
	min-width: 0;
	overflow-wrap: anywhere;
}
.vantex-review-card__avatar {
	flex: none;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}
.vantex-review-card__body {
	flex: 1 1 auto;
	min-width: 0;
}
.vantex-review-card__text {
	margin: 2px 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
}
.vantex-review-card__text p { margin: 0 0 0.4em; }
.vantex-review-card__text > :last-child { margin-bottom: 0; }

@media (max-width: 480px) {
	.vantex-review-card,
	.woocommerce #reviews #comments ol.commentlist li.review .comment_container {
		padding: 16px;
		gap: 10px;
	}
}

.vantex-reviews-pagination { display: flex; justify-content: center; margin-top: 1.25rem; }
.vantex-reviews-pagination .page-numbers {
	display: inline-block;
	min-width: 2.25rem;
	padding: 0.4rem 0.6rem;
	margin: 0 0.15rem;
	text-align: center;
	text-decoration: none;
	border: 1px solid var(--wp--preset--color--border-glow, #e2e4e8);
	border-radius: 10px;
}
.vantex-reviews-pagination .page-numbers.current {
	background: var(--wp--preset--color--primary, #0066ff);
	border-color: transparent;
	color: #fff;
}
.vantex-reviews-empty { color: var(--wp--preset--color--light-silver, #5b5f68); }

/* Stars for the showcase. WooCommerce's own star CSS only loads on WooCommerce
 * pages, so the section carries a self-contained version (works on any page).
 * The grey stars are in normal flow so the box is exactly as wide as the
 * glyphs; the gold span overlays them at the rating's percentage width. */
.vantex-review-card .star-rating,
.vantex-hr__card .star-rating {
	position: relative;
	display: block;
	width: max-content;
	font-size: 1rem;
	line-height: 1.2;
	letter-spacing: 0.05em;
	direction: ltr;
}
.vantex-review-card .star-rating::before,
.vantex-hr__card .star-rating::before {
	content: "\2605\2605\2605\2605\2605";
	display: block;
	white-space: nowrap;
	color: var(--wp--preset--color--border-glow, #e2e4e8);
}
.vantex-review-card .star-rating > span,
.vantex-hr__card .star-rating > span {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	height: 100%;
	overflow: hidden;
	padding-top: 2em; /* pushes the screen-reader text out of view */
	box-sizing: border-box;
}
.vantex-review-card .star-rating > span::before,
.vantex-hr__card .star-rating > span::before {
	content: "\2605\2605\2605\2605\2605";
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	white-space: nowrap;
	color: #f5a623;
}
