/* Profile Reviews for HivePress: front-end layout.
 *
 * Only the pieces this plugin adds are styled here. The reviews themselves use HivePress Reviews'
 * own markup and stylesheet, so they look as they do on a Listing page on every theme. Sizes
 * follow core's rem scale (0.5 / 1 / 2 rem) and type is in percentages, so everything scales with
 * the theme (resources/hivepress-ui.md, "Native look and feel").
 */

/* Folded batches. Each batch holds its own grid, and core pulls a grid's last row up by its item
 * margin (.hp-grid:last-child { margin-bottom: -2rem }), so the gap between two batches has to be
 * put back. It is PADDING on purpose: that -2rem margin collapses through the batch into anything
 * after it, so a 2rem top margin here cancels it to zero and the rows touch (measured: 0px). Padding
 * does not collapse, so the rows sit 2rem apart, the same as inside one grid. Hidden batches have no
 * box, so they add nothing. */
.hppr-reviews__batch + .hppr-reviews__batch {
	padding-top: 2rem;
}

.hppr-reviews__batch:focus {
	outline: none;
}

/* The "Show more reviews" button, in core's pagination box as HivePress Reviews' own "Load More"
 * is. Themes give .hp-pagination a display value, which would beat the browser's [hidden] rule, so
 * the hidden state is restated for this box (resources/wordpress-php-notes.md, "An author display
 * rule beats the hidden attribute"). The gap above it is padding, not margin, for the same
 * collapsing reason as the batches. */
.hppr-reviews__more {
	padding-top: 2rem;
	text-align: center;
}

.hppr-reviews__more[hidden] {
	display: none;
}

/* The section heading with the average rating beside it. It wraps under the word on a narrow
 * screen rather than squeezing it. */
.hppr-section__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.hppr-section__title .hppr-rating {
	font-size: 62%;
	font-weight: 400;
}

/* The average rating at the top of the client's "Reviews from Vendors" section. */
.hppr-client-summary {
	margin-bottom: 2rem;
}

/* Edit, Delete and Reply under a client review: core's icon links in a wrapping row. */
.hppr-review__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin-top: 1rem;
}

.hppr-review__actions:empty,
.hppr-review__actions[hidden] {
	display: none;
}

/* A client's rating on a Booking or Order page, shown only to the Vendor. */
.hppr-client-rating {
	flex-wrap: wrap;
}

.hppr-client-rating__label {
	margin-right: 0.5rem;
}
