/**
 * Slavic Labs styling for the review list. Not upstream Customer Reviews code: this file is a fork
 * addition loaded after `frontend.css`, so the vendored stylesheet stays byte-comparable.
 *
 * Measured from the owner's Figma product page; see docs/design-system.md in the hub. Values are
 * exposed as custom properties with the measured fallback, so a theme can retheme the block once.
 */

.woocommerce #reviews,
.cr-all-reviews,
.cr-reviews-grid,
.cr-reviews-slider {
	--sr-ink: var(--slavic-ink, #04384d);
	--sr-info: var(--slavic-info, #f2fbff);
	--sr-line: var(--slavic-line, #cfcfcf);
	--sr-muted: var(--slavic-muted, #888888);
	--sr-page: var(--slavic-page, #ffffff);
	--sr-font: var(--slavic-font-body, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
	--sr-display: var(--slavic-font-display, "Nata Sans", var(--sr-font));
	--sr-radius: var(--slavic-radius-small, 10px);
	--sr-radius-pill: var(--slavic-radius-pill, 27px);
	--sr-radius-media: var(--slavic-radius-exception, 7px);
	font-family: var(--sr-font);
	color: var(--sr-ink);
}

.woocommerce #reviews h2,
.cr-all-reviews h2 {
	font-family: var(--sr-display);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sr-ink);
}

/* One review, as a card ----------------------------------------------------- */

.woocommerce #reviews .commentlist,
.cr-all-reviews .commentlist {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce #reviews .commentlist > li,
.cr-all-reviews .commentlist > li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.woocommerce #reviews .commentlist > li .comment_container,
.cr-all-reviews .commentlist > li .comment_container {
	display: flex;
	gap: 13px;
	box-sizing: border-box;
	padding: 30px;
	border: 0.5px solid var(--sr-line);
	border-radius: var(--sr-radius);
	background: var(--sr-page);
}

.woocommerce #reviews .commentlist .comment-text,
.cr-all-reviews .commentlist .comment-text {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	border: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.woocommerce #reviews .comment_container img.avatar,
.cr-all-reviews .comment_container img.avatar {
	position: static;
	width: 53px;
	height: 53px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
}

.woocommerce #reviews .comment-text .meta,
.cr-all-reviews .comment-text .meta {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	line-height: 20px;
}

.woocommerce-review__author {
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	color: var(--sr-ink);
}

.woocommerce-review__published-date {
	font-size: 14px;
	font-weight: 300;
	line-height: 20px;
	color: var(--sr-muted);
}

.woocommerce-review__verified {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 300;
	font-style: normal;
	line-height: 20px;
	color: var(--sr-ink);
}

.woocommerce-review__verified::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid currentColor;
	background-image: linear-gradient(45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%),
		linear-gradient(-45deg, transparent 52%, currentColor 52%, currentColor 62%, transparent 62%);
	background-size: 7px 7px, 5px 5px;
	background-position: 5px 6px, 3px 7px;
	background-repeat: no-repeat;
}

/* The reviewer's order sequence, a Slavic Labs addition. */
.slavic-reviews-order-badge {
	align-self: flex-start;
	padding: 4px 12px;
	border-radius: var(--sr-radius-pill);
	background: var(--sr-info);
	font-size: 12px;
	font-weight: 400;
	line-height: 15px;
	color: var(--sr-ink);
}

.crstar-rating-svg,
.cr-rating-product-name {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--sr-ink);
}

.woocommerce #reviews .description,
.cr-all-reviews .description {
	font-size: 14px;
	font-weight: 300;
	line-height: 21px;
	color: var(--sr-ink);
}

/* Attached media ------------------------------------------------------------ */

/* Class names below were verified against the markup this fork actually prints, not inferred from
   the design: images and videos share `.cr-comment-images.cr-comment-videos`, the sort control is the
   `select` itself, votes are wrapped in `.cr-vote`, and the only "show more" control is
   `.cr-show-more-button`. An earlier revision of this file styled invented names and did nothing. */

.cr-comment-images {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cr-comment-images img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: var(--sr-radius-media);
}

/* Controls: sorting, voting, pagination ------------------------------------- */

select.cr-ajax-reviews-sort {
	padding: 0 22px;
	min-height: 42px;
	border: 0.5px solid var(--sr-ink);
	border-radius: var(--sr-radius-pill);
	background: var(--sr-page);
	font-family: var(--sr-font);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.28px;
	color: var(--sr-ink);
}

.cr-vote {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--sr-ink);
}

.cr-show-more-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 22px;
	border: 0.5px solid var(--sr-ink);
	border-radius: var(--sr-radius-pill);
	background: var(--sr-page);
	font-family: var(--sr-font);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.24px;
	text-transform: uppercase;
	color: var(--sr-ink);
	cursor: pointer;
}

/*
 * "No review matches your filters", on a product page.
 *
 * The server returns this as the list's only item when a sort or filter matches nothing, because the
 * paragraph the scripts hide and show is printed by the all-reviews block and has never existed on a
 * product page -- choosing a filter with no matches left a blank space under the count. It is an `li`
 * because the container is an `ol`, so the bullet and the comment spacing both have to be undone.
 */
/*
 * The two-id prefix is upstream's, not a flourish: `frontend.css:1479` sets
 * `#reviews.cr-reviews-ajax-reviews #comments.cr-reviews-ajax-comments .cr-ajax-reviews-list li
 * { padding: 0 }`, which outranks any single-class rule however late it loads. The bare selector is
 * kept beside it for a storefront that renders this list outside those two ids. Reported from the
 * live site by the front session on 2026-10-21.
 */
#reviews.cr-reviews-ajax-reviews #comments.cr-reviews-ajax-comments .cr-ajax-reviews-list > .cr-search-no-reviews,
.cr-ajax-reviews-list > .cr-search-no-reviews {
	display: block;
	list-style: none;
	margin: 0;
	padding: 28px 0;
	border: 0;
	text-align: center;
	font-family: var(--sr-font);
	font-size: 14px;
	color: var(--sr-muted);
}

@media (max-width: 600px) {
	.woocommerce #reviews .commentlist > li .comment_container,
	.cr-all-reviews .commentlist > li .comment_container {
		padding: 20px;
	}
}
