/**
 * Review summary — E18, both states.
 *
 * The empty card's palette is pdp-spec.md §6 verbatim: #FFF4E8 on #FCD6AC,
 * radius 16, stars stroked #B0AA97. The populated panel reuses the same
 * family so the section keeps one identity whichever state the data picks.
 * Tints stay out of theme.json (C8) — they are this region's decoration,
 * not palette colours.
 */

/* ------------------------------------------------------------------ empty */

.hermizon-review-summary.is-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--50);
	background-color: #fff4e8;
	border: var(--wp--custom--border--width) solid #fcd6ac;
	border-radius: var(--wp--custom--radius--lg);
	text-align: center;
}

.hermizon-review-summary__empty-stars {
	display: flex;
	gap: var(--wp--preset--spacing--50);
	color: #b0aa97;
}

.hermizon-review-summary__empty-stars svg {
	width: 44px;
	height: 44px;
}

.hermizon-review-summary__headline {
	margin: 0;
	font-size: var(--wp--preset--font-size--section);
	line-height: 1.3;
}

.hermizon-review-summary__cta-link {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--x-large);
	transition: color var(--wp--custom--transition--fast);
}

.hermizon-review-summary__cta-link:hover {
	color: var(--wp--preset--color--contrast);
}

/* -------------------------------------------------------------- populated */

.hermizon-review-summary:not(.is-empty) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--70);
	padding: var(--wp--preset--spacing--60);
	background-color: #fff4e8;
	border: var(--wp--custom--border--width) solid #fcd6ac;
	border-radius: var(--wp--custom--radius--lg);
}

.hermizon-review-summary__score {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-width: 148px;
}

.hermizon-review-summary__average {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}

/* Two glyph layers, the top one clipped to the average. */
.hermizon-review-summary__stars {
	position: relative;
	display: inline-block;
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 2px;
	line-height: 1;
	color: #e8dfd0;
}

.hermizon-review-summary__stars-fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	white-space: nowrap;
	color: #fcb021;
}

.hermizon-review-summary__count {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--x-small);
}

.hermizon-review-summary__bars {
	flex: 1 1 260px;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
	max-width: 520px;
}

.hermizon-review-summary__bar {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
}

.hermizon-review-summary__bar-label {
	flex: 0 0 34px;
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	text-align: end;
}

.hermizon-review-summary__bar-star {
	color: #fcb021;
}

.hermizon-review-summary__bar-track {
	flex: 1 1 auto;
	height: 8px;
	background-color: rgb(32 33 36 / 8%);
	border-radius: var(--wp--custom--radius--pill);
	overflow: hidden;
}

.hermizon-review-summary__bar-fill {
	display: block;
	height: 100%;
	background-color: #fcb021;
	border-radius: inherit;
}

.hermizon-review-summary__bar-count {
	flex: 0 0 28px;
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

.hermizon-review-summary__action {
	margin-inline-start: auto;
}

.hermizon-review-summary__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--md);
	font-family: var(--wp--preset--font-family--public-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: opacity var(--wp--custom--transition--fast);
}

.hermizon-review-summary__cta:hover {
	opacity: 0.85;
}

/* One column when the row runs out of room. */
@media (max-width: 781px) {
	.hermizon-review-summary:not(.is-empty) {
		flex-direction: column;
		align-items: stretch;
	}

	.hermizon-review-summary__action {
		margin-inline-start: 0;
	}

	.hermizon-review-summary__cta {
		width: 100%;
	}

	.hermizon-review-summary__empty-stars svg {
		width: 32px;
		height: 32px;
	}
}
