/* MCW Product Reviews — single product page reviews block.
 * Specificity-bumped `.mcw-pr.mcw-pr` per project convention so theme
 * comment / star styles don't bleed through. Vertical rhythm mirrors
 * the 48px section pattern used in `.mcw-pd__info`.
 */

.mcw-pr.mcw-pr {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--mcw-pr-max, 1440px);
	margin: 0 auto;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	color: #050101;
}

.mcw-pr.mcw-pr *,
.mcw-pr.mcw-pr *::before,
.mcw-pr.mcw-pr *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.mcw-pr.mcw-pr .mcw-pr__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 48px;
}

.mcw-pr.mcw-pr .mcw-pr__head-stats {
	display: flex;
	gap: 48px;
	align-items: flex-start;
}

.mcw-pr.mcw-pr .mcw-pr__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mcw-pr.mcw-pr .mcw-pr__stat--avg {
	flex-direction: row;
	align-items: center;
	/* 8px between number ↔ stars, but only 4px down to the label so it lands
	 * on the same line as the Total Reviews label (which uses the base 4px). */
	column-gap: 8px;
	row-gap: 4px;
	flex-wrap: wrap;
}

.mcw-pr.mcw-pr .mcw-pr__stat--avg .mcw-pr__stat-label {
	flex-basis: 100%;
	order: 3;
}

/* Number keeps its full 36px box so its label aligns with the Total Reviews
 * label; instead the stars drop a touch to sit on the digits' optical centre
 * (Ivy Mode sits low inside a line-height:1 box). */
.mcw-pr.mcw-pr .mcw-pr__stat--avg .mcw-pr__stars {
	transform: translateY(3px);
}

.mcw-pr.mcw-pr .mcw-pr__stat-num {
	font-family: "Ivy Mode", "Cormorant Garamond", Georgia, serif;
	font-weight: 400;
	font-size: 36px;
	line-height: 1;
	color: #050101;
}

.mcw-pr.mcw-pr .mcw-pr__stat-label {
	font-size: 14px;
	letter-spacing: 0.5px;
	color: #6b6e70;
}

/* ---------- Sort ---------- */
.mcw-pr.mcw-pr .mcw-pr__sort {
	display: inline-flex;
	align-items: center;
	gap: 0;
}

.mcw-pr.mcw-pr .mcw-pr__sort-label {
	display: none;
}

.mcw-pr.mcw-pr .mcw-pr__sort-select {
	appearance: none;
	-webkit-appearance: none;
	background: #ffffff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%23050101' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 16px center / 10px 6px;
	border: 1px solid #050101;
	border-radius: 0;
	padding: 14px 44px 14px 20px;
	font-family: inherit;
	font-size: 13px;
	letter-spacing: 0.5px;
	color: #050101;
	cursor: pointer;
	min-width: 220px;
}

.mcw-pr.mcw-pr .mcw-pr__sort-select:focus-visible {
	outline: 2px solid #050101;
	outline-offset: 2px;
}

/* ---------- Stars ---------- */
.mcw-pr.mcw-pr .mcw-pr__stars {
	display: inline-flex;
	gap: 4px;
	color: #d5d7da;
}

.mcw-pr.mcw-pr .mcw-pr__star {
	display: inline-flex;
	width: 14px;
	height: 14px;
	color: inherit;
}

.mcw-pr.mcw-pr .mcw-pr__star svg {
	display: block;
	width: 100%;
	height: 100%;
}

.mcw-pr.mcw-pr .mcw-pr__star--on {
	color: #050101;
}

/* ---------- List ---------- */
.mcw-pr.mcw-pr .mcw-pr__list {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.mcw-pr.mcw-pr .mcw-pr__empty {
	margin: 0;
	padding: 32px 0;
	text-align: center;
	font-size: 14px;
	color: #6b6e70;
}

/* ---------- Row ---------- */
.mcw-pr.mcw-pr .mcw-pr__row {
	display: grid;
	grid-template-columns: 200px 1fr 160px;
	gap: 40px;
	align-items: start;
}

.mcw-pr.mcw-pr .mcw-pr__meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
	letter-spacing: 1px;
}

.mcw-pr.mcw-pr .mcw-pr__date {
	color: #050101;
	font-weight: 500;
}

.mcw-pr.mcw-pr .mcw-pr__author {
	color: #000;
}

.mcw-pr.mcw-pr .mcw-pr__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.mcw-pr.mcw-pr .mcw-pr__title {
	margin: 0;
	font-family: "Ivy Mode", "Cormorant Garamond", Georgia, serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.2;
	color: #050101;
}

.mcw-pr.mcw-pr .mcw-pr__body {
	font-size: 14px;
	line-height: 22px;
	color: #000;
}

.mcw-pr.mcw-pr .mcw-pr__body p {
	margin: 0 0 8px;
}

.mcw-pr.mcw-pr .mcw-pr__body p:last-child {
	margin-bottom: 0;
}

.mcw-pr.mcw-pr .mcw-pr__image {
	margin-top: 8px;
	max-width: 220px;
}

.mcw-pr.mcw-pr .mcw-pr__image img {
	display: block;
	width: 100%;
	height: auto;
}

.mcw-pr.mcw-pr .mcw-pr__recommend {
	margin: 8px 0 0;
	font-size: 13px;
	color: #6b6e70;
}

/* ---------- Votes ---------- */
.mcw-pr.mcw-pr .mcw-pr__votes {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.mcw-pr.mcw-pr .mcw-pr__vote {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: #fafafa;
	color: #050101;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mcw-pr.mcw-pr .mcw-pr__vote:hover,
.mcw-pr.mcw-pr .mcw-pr__vote:focus-visible {
	background: #efefef;
	outline: none;
}

.mcw-pr.mcw-pr .mcw-pr__vote.is-voted {
	background: #050101;
	color: #ffffff;
}

/* Guests / busy: non-interactive, no hover feedback. */
.mcw-pr.mcw-pr .mcw-pr__vote[disabled] {
	cursor: not-allowed;
}

.mcw-pr.mcw-pr .mcw-pr__vote[disabled]:hover,
.mcw-pr.mcw-pr .mcw-pr__vote[disabled]:focus-visible {
	background: #fafafa;
}

.mcw-pr.mcw-pr .mcw-pr__vote-icon {
	display: inline-flex;
	width: 18px;
	height: 16px;
	color: inherit;
}

.mcw-pr.mcw-pr .mcw-pr__vote-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* ---------- Show More ---------- */
.mcw-pr.mcw-pr .mcw-pr__more-wrap {
	margin-top: 56px;
}

/* Outlined button with the project's signature circle-expand fill on hover
 * (ported from .mcw-button__cta). Label is wrapped in a <span> so it can rise. */
.mcw-pr.mcw-pr .mcw-pr__more {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 36px;
	background: #ffffff;
	color: #050101;
	border: 1px solid #050101;
	border-radius: 0;
	overflow: hidden;
	isolation: isolate;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: capitalize;
	transition: color 0.2s ease 0.4s;
}

.mcw-pr.mcw-pr .mcw-pr__more::before,
.mcw-pr.mcw-pr .mcw-pr__more::after {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	content: "";
	pointer-events: none;
	z-index: 1;
}

/* Circle that scales up from the bottom. */
.mcw-pr.mcw-pr .mcw-pr__more::before {
	background: #050101;
	width: 120%;
	height: 0;
	padding-bottom: 120%;
	top: -110%;
	left: -10%;
	border-radius: 50%;
	transform: translate3d(0, 68%, 0) scale3d(0, 0, 0);
}

.mcw-pr.mcw-pr .mcw-pr__more:hover::before,
.mcw-pr.mcw-pr .mcw-pr__more:focus-visible::before {
	transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
	transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
}

/* Plane that fills the rest once the circle lands. */
.mcw-pr.mcw-pr .mcw-pr__more::after {
	background: #050101;
	transform: translate3d(0, -100%, 0);
	transition: transform 0.4s cubic-bezier(0.1, 0, 0.3, 1);
}

.mcw-pr.mcw-pr .mcw-pr__more:hover::after,
.mcw-pr.mcw-pr .mcw-pr__more:focus-visible::after {
	transform: translate3d(0, 0, 0);
	transition-duration: 0.05s;
	transition-delay: 0.4s;
	transition-timing-function: linear;
}

/* Label sits above the fill; on hover it rises out and a fresh copy drops in
 * (matches .mcw-button__cta). Animation only applies while hovered, so it
 * resets to the visible base state on mouse-leave. */
.mcw-pr.mcw-pr .mcw-pr__more > span {
	display: block;
	position: relative;
	z-index: 10;
}

.mcw-pr.mcw-pr .mcw-pr__more:hover > span,
.mcw-pr.mcw-pr .mcw-pr__more:focus-visible > span {
	animation: mcw-pr-up 0.3s forwards, mcw-pr-down 0.3s forwards 0.3s;
}

.mcw-pr.mcw-pr .mcw-pr__more:hover,
.mcw-pr.mcw-pr .mcw-pr__more:focus-visible {
	color: #ffffff;
	outline: none;
	transition: color 0.2s ease 0.3s;
}

@keyframes mcw-pr-up {
	to {
		transform: translate3d(0, -105%, 0) scale3d(1, 2, 1);
		opacity: 0;
	}
}

@keyframes mcw-pr-down {
	from {
		transform: translate3d(0, 100%, 0) scale3d(1, 2, 1);
		opacity: 0;
	}
	to {
		transform: translate3d(0, 0, 0);
		opacity: 1;
	}
}

.mcw-pr.mcw-pr .mcw-pr__more.is-loading {
	opacity: 0.6;
	cursor: wait;
}

/* ---------- Comment-form extras (logged-in + login CTA) ---------- */
.mcw-pr.mcw-pr-form .comment-form-mcw-title input,
.mcw-pr.mcw-pr-form .comment-form-mcw-image input[type="file"] {
	display: block;
	width: 100%;
	max-width: 480px;
}

.mcw-pr.mcw-pr-form .comment-form-mcw-recommend label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* ---------- Responsive: Tablet / Mobile (≤1024) ----------
 * Figma tablet + mobile both stack the 3-column row into one column —
 * meta (date over author) → stars → title → body → image → recommend →
 * votes — which is already the DOM order, so collapsing the grid to a
 * single column is enough. The header stacks its stats above the sort
 * control, and the Show More button goes full width. */
@media (max-width: 1024px) {
	.mcw-pr.mcw-pr .mcw-pr__head {
		flex-direction: column;
		gap: 24px;
		margin-bottom: 32px;
	}

	.mcw-pr.mcw-pr .mcw-pr__head-stats {
		gap: 32px;
	}

	.mcw-pr.mcw-pr .mcw-pr__sort-select {
		width: 100%;
		min-width: 0;
	}

	.mcw-pr.mcw-pr .mcw-pr__list {
		gap: 40px;
	}

	.mcw-pr.mcw-pr .mcw-pr__row {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	/* Votes sit under the content, left-aligned, once stacked. */
	.mcw-pr.mcw-pr .mcw-pr__votes {
		justify-content: flex-start;
	}

	.mcw-pr.mcw-pr .mcw-pr__more-wrap {
		margin-top: 40px;
	}

	.mcw-pr.mcw-pr .mcw-pr__more {
		width: 100%;
	}
}
