/**
 * Reviews grid — Lance Desk Elementor widget.
 */

.nm-reviews {
	--nm-reviews-cols: 4;
	--nm-reviews-gap-x: 20px;
	--nm-reviews-gap-y: 24px;

	display: grid;
	grid-template-columns: repeat(var(--nm-reviews-cols), minmax(0, 1fr));
	column-gap: var(--nm-reviews-gap-x);
	row-gap: var(--nm-reviews-gap-y);
	align-items: stretch;
	box-sizing: border-box;
}

.nm-review-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	box-sizing: border-box;
}

.nm-review-card__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1 1 auto;
	height: 100%;
	box-sizing: border-box;
	padding: 18px;
	background-color: transparent;
	border-style: solid;
	border-color: var(--nm-review-border, #d4af37);
	border-width: 1px;
	border-radius: 22px;
	text-align: center;
	color: inherit;
}

.nm-review-card__media {
	display: block;
	width: 100%;
	margin: 0 0 14px;
	overflow: hidden;
	border-radius: 14px;
	line-height: 0;
}

.nm-review-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: center;
}

.nm-review-card__stars {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 0 0 12px;
	line-height: 0;
}

.nm-review-card__star {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	line-height: 0;
	color: var(--nm-review-star, #d4af37);
}

.nm-review-card__star-base,
.nm-review-card__star-fill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.nm-review-card__star-base {
	opacity: 0.28;
}

.nm-review-card__star-fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	width: var(--nm-star-fill, 100%);
}

.nm-review-card__star svg,
.nm-review-card__star img,
.nm-review-card__star i {
	display: block;
	width: 100%;
	height: 100%;
	font-size: inherit;
	line-height: 1;
	object-fit: contain;
}

.nm-review-card__star svg {
	fill: currentColor;
}

.nm-review-card__text {
	flex: 1 1 auto;
	margin: 0 0 14px;
	color: var(--nm-review-text, #ffffff);
}

.nm-review-card__text p {
	margin: 0 0 0.6em;
}

.nm-review-card__text p:last-child {
	margin-bottom: 0;
}

.nm-review-card__author {
	margin: auto 0 0;
	color: var(--nm-review-author, #d4af37);
	font-weight: 600;
	line-height: 1.3;
}

.nm-review-card__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 24px;
	text-align: center;
	opacity: 0.7;
}

/* Admin list drag hint */
.wp-list-table .nm-reviews-sortable-placeholder {
	height: 48px;
	background: rgba(212, 175, 55, 0.12);
	visibility: visible !important;
}

body.post-type-nm_review .wp-list-table tbody tr {
	cursor: move;
}

.nm-admin-rating {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
