/* Reviews by Pelican — front-end styles for the review text block. */

.pel-review-text .pel-review-rest { display: none; }
.pel-review-text.is-expanded .pel-review-rest { display: inline; }
.pel-review-text.is-expanded .pel-review-ellipsis { display: none; }

/* 'Lines' truncation. The CSS clamp below is the no-JS fallback; on load JS
   adds pel-review-fitted and re-fits the card so the Read more control sits
   inline at the end of the last visible line (see pel-reviews.js).
   white-space:pre-line renders the review's newlines as breaks without <br>,
   so the text survives JS textContent round-trips during fitting. */
.pel-review-text .pel-review-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--pel-review-lines, 5);
	overflow: hidden;
	white-space: pre-line;
}
.pel-review-text.is-expanded .pel-review-clamp,
.pel-review-text.pel-review-fitted .pel-review-clamp {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}
.pel-review-more.pel-review-below { display: inline-block; margin-top: 0.5em; }
.pel-review-text.pel-review-fitted .pel-review-more { display: inline; margin-top: 0; }
/* JS adds pel-review-fits when nothing is actually clamped. */
.pel-review-text.pel-review-fits .pel-review-more { display: none; }

/* The revealed text fades in while the container height-transitions (JS). */
@media ( prefers-reduced-motion: no-preference ) {
	.pel-review-text.is-expanded .pel-review-rest {
		animation: pel-review-fade 0.45s ease;
	}
	@keyframes pel-review-fade {
		from { opacity: 0; }
		to   { opacity: 1; }
	}
}

/* Neutral button reset so the Read more control inherits the text style and
   the widget's Style-tab controls can restyle it from a clean slate. */
button.pel-review-more {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-decoration: underline;
}
a.pel-review-more { text-decoration: underline; }
