/**
 * Wexofy Photo Reviews — front end. Minimal and neutral; inherits the theme fonts.
 */

.wxprev {
	--wxprev-fg: #1f2328;
	--wxprev-muted: #656b73;
	--wxprev-line: #e2e4e8;
	--wxprev-bg-soft: #f6f6f7;
	--wxprev-accent: #1f2328;
	--wxprev-star: #f5a623;
	--wxprev-verified: #1a7f37;
	--wxprev-radius: 10px;
	--wxprev-gap: 18px;

	color: #1f2328;
	font-size: 15px;
	line-height: 1.55;
}

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

/* The hidden attribute always hides, even where a class sets display. */
.wxprev [hidden],
.wxprev-lightbox[hidden] { display: none !important; }

/* Neutralise theme blockquote styles inside our components. */
.wxprev blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-style: normal;
	quotes: none;
}
.wxprev blockquote::before,
.wxprev blockquote::after { content: none; }

.wxprev-reviews { margin: 2.5rem 0; }

/* ---------- Stars ---------- */
.wxprev-stars {
	--p: 0%;
	display: inline-block;
	position: relative;
	width: 88px;
	height: 16px;
	vertical-align: middle;
	background: none;
}
.wxprev-stars::before,
.wxprev-stars__fill::before {
	content: "★★★★★";
	position: absolute;
	inset: 0;
	font-size: 16px;
	letter-spacing: 2px;
	line-height: 1;
	font-family: Arial, sans-serif;
}
.wxprev-stars::before { color: var(--wxprev-line); }
.wxprev-stars__fill {
	position: absolute;
	inset: 0;
	overflow: hidden;
	white-space: nowrap;
}
.wxprev-stars__fill::before { color: var(--wxprev-star); }

/* ---------- Summary ---------- */
.wxprev-summary {
	padding: 20px 0 24px;
	border-bottom: 1px solid var(--wxprev-line);
	color: #1f2328;
}
.wxprev-summary__title {
	text-align: center;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 1.2rem;
	color: #1f2328;
}
.wxprev-summary__inner {
	display: grid;
	grid-template-columns: minmax(150px, 220px) 1fr;
	gap: 28px;
	align-items: center;
}
/* Store-wide summary: no bottom rule, centred, fits a home page. */
.wxprev-summary--store {
	border-bottom: 0;
	padding: 0;
}
.wxprev-summary--store .wxprev-summary__inner {
	max-width: 560px;
	margin: 0 auto;
}
.wxprev-summary__score { text-align: center; }
.wxprev-summary__avg {
	display: block;
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}
.wxprev-summary__score .wxprev-stars { margin: 8px 0 4px; }
.wxprev-summary__count { display: block; color: var(--wxprev-muted); font-size: 13px; }
.wxprev-summary__recommend {
	display: inline-block;
	margin-top: 8px;
	font-size: 12px;
	color: var(--wxprev-verified);
	font-weight: 600;
}
.wxprev-summary--compact {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding: 0;
	border: 0;
	text-decoration: none;
	color: inherit;
}

.wxprev-histogram { display: grid; gap: 6px; }
.wxprev-histogram__row {
	display: grid;
	grid-template-columns: 34px 1fr 34px;
	gap: 10px;
	align-items: center;
	background: none;
	border: 0;
	padding: 2px 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
}
.wxprev-histogram__label { font-size: 13px; color: var(--wxprev-muted); text-align: right; }
.wxprev-histogram__bar {
	height: 8px;
	border-radius: 999px;
	background: var(--wxprev-bg-soft);
	overflow: hidden;
}
.wxprev-histogram__fill {
	display: block;
	height: 100%;
	background: var(--wxprev-star);
	border-radius: 999px;
}
.wxprev-histogram__n { font-size: 12px; color: var(--wxprev-muted); }
button.wxprev-histogram__row:hover .wxprev-histogram__fill { filter: brightness(0.94); }
div.wxprev-histogram__row { cursor: default; }
.wxprev-histogram__label { white-space: nowrap; }

/* ---------- Buttons ---------- */
.wxprev-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--wxprev-fg);
	background: var(--wxprev-fg);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: opacity .15s ease;
}
.wxprev-btn:hover { opacity: .85; }
.wxprev-btn--ghost {
	background: transparent;
	color: var(--wxprev-fg);
	border-color: var(--wxprev-line);
}
.wxprev-btn--primary { }

/* ---------- Write a review ---------- */
.wxprev-write { margin: 22px 0; }
.wxprev-form-wrap { margin-top: 18px; }

.wxprev-form {
	background: var(--wxprev-bg-soft);
	border: 1px solid var(--wxprev-line);
	border-radius: var(--wxprev-radius);
	padding: 20px;
	display: grid;
	gap: 16px;
}
.wxprev-form__row { margin: 0; display: grid; gap: 6px; }
.wxprev-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wxprev-form__label { font-weight: 600; font-size: 13px; }
.wxprev-form__hint { font-size: 12px; color: var(--wxprev-muted); }
.wxprev-req { color: #c0392b; }

.wxprev-form input[type="text"],
.wxprev-form input[type="email"],
.wxprev-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wxprev-line);
	border-radius: 8px;
	background: #fff;
	color: #1f2328;
	font: inherit;
}
.wxprev-form textarea { resize: vertical; min-height: 96px; }

.wxprev-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.wxprev-stars-input__star { cursor: pointer; font-size: 28px; color: var(--wxprev-line); line-height: 1; }
.wxprev-stars-input__star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wxprev-stars-input__star:hover,
.wxprev-stars-input__star:hover ~ .wxprev-stars-input__star,
.wxprev-stars-input__star.is-on,
.wxprev-stars-input__star.is-on ~ .wxprev-stars-input__star { color: var(--wxprev-star); }
.wxprev-stars-input__star input:focus-visible + span { outline: 2px solid var(--wxprev-star); outline-offset: 2px; }

.wxprev-form__media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wxprev-uploader__drop {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	border: 1px dashed var(--wxprev-line);
	border-radius: 8px;
	font-size: 13px;
	color: var(--wxprev-muted);
	cursor: pointer;
	text-align: center;
}
.wxprev-uploader__drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wxprev-uploader__preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wxprev-uploader__item {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--wxprev-line);
}
.wxprev-uploader__item img,
.wxprev-uploader__item video { width: 100%; height: 100%; object-fit: cover; }
.wxprev-uploader__remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 0;
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.wxprev-form__consent label { display: flex; gap: 8px; font-size: 13px; color: var(--wxprev-muted); align-items: flex-start; }
.wxprev-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.wxprev-form__error { color: #c0392b; font-size: 13px; margin: 0; }

/* ---------- Toolbar ---------- */
.wxprev-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: center;
	margin: 22px 0 8px;
}
.wxprev-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.wxprev-chip {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--wxprev-line);
	background: transparent;
	color: var(--wxprev-fg);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.wxprev-chip.is-active { background: var(--wxprev-fg); color: #fff; border-color: var(--wxprev-fg); }
.wxprev-chip__n { color: var(--wxprev-muted); }
.wxprev-chip.is-active .wxprev-chip__n { color: inherit; opacity: .7; }
.wxprev-sort__select {
	padding: 7px 10px;
	border-radius: 8px;
	border: 1px solid var(--wxprev-line);
	background: transparent;
	color: var(--wxprev-fg);
	font: inherit;
	font-size: 13px;
}

/* ---------- List ---------- */
.wxprev-list { display: grid; gap: 4px; }
.wxprev-list.is-loading { opacity: .5; pointer-events: none; }
.wxprev-review { padding: 20px 0; border-bottom: 1px solid var(--wxprev-line); }
.wxprev-review__head { display: flex; gap: 12px; align-items: flex-start; }
.wxprev-review__avatar { border-radius: 50%; flex: 0 0 auto; }
.wxprev-review__meta { display: grid; gap: 3px; }
.wxprev-review__author { font-weight: 600; }
.wxprev-review__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--wxprev-verified);
	font-weight: 600;
}
.wxprev-review__stars { display: flex; align-items: center; gap: 10px; }
.wxprev-review__stars time { font-size: 12px; color: var(--wxprev-muted); }
.wxprev-review__body { margin: 10px 0 0; }
.wxprev-review__body p { margin: 0 0 .5em; }

.wxprev-review__media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wxprev-review__thumb {
	width: 76px;
	height: 76px;
	border: 0;
	padding: 0;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: var(--wxprev-bg-soft);
	position: relative;
}
.wxprev-review__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wxprev-review__thumb--video { display: flex; align-items: center; justify-content: center; }
.wxprev-review__play { font-size: 22px; color: var(--wxprev-fg); }

.wxprev-review__reply {
	margin: 12px 0 0;
	padding: 12px 14px;
	background: var(--wxprev-bg-soft);
	border-radius: 8px;
	border-left: 3px solid var(--wxprev-line);
}
.wxprev-review__reply strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--wxprev-muted); margin-bottom: 4px; }
.wxprev-review__reply p { margin: 0; }

.wxprev-review__foot { margin-top: 12px; }
.wxprev-helpful {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--wxprev-line);
	border-radius: 999px;
	background: transparent;
	color: var(--wxprev-muted);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.wxprev-helpful:hover:not(:disabled) { color: var(--wxprev-fg); border-color: var(--wxprev-fg); }
.wxprev-helpful.is-voted { color: var(--wxprev-verified); border-color: var(--wxprev-verified); cursor: default; }

.wxprev-list__more { text-align: center; margin: 22px 0; }
.wxprev-empty, .wxprev-list__empty { color: var(--wxprev-muted); padding: 24px 0; }

/* ---------- Lightbox ---------- */
.wxprev-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0,0,0,.9);
	display: none;
	align-items: center;
	justify-content: center;
}
.wxprev-lightbox:not([hidden]) { display: flex; }
.wxprev-lightbox__stage { max-width: 92vw; max-height: 88vh; }
.wxprev-lightbox__stage img,
.wxprev-lightbox__stage video { max-width: 92vw; max-height: 88vh; display: block; }
.wxprev-lightbox__close,
.wxprev-lightbox__nav {
	position: absolute;
	background: rgba(255,255,255,.12);
	color: #fff;
	border: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
}
.wxprev-lightbox__close { top: 20px; right: 20px; }
.wxprev-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.wxprev-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Notices ---------- */
.wxprev-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 14px;
}
.wxprev-notice--success { background: #edf7ed; color: #1a7f37; }
.wxprev-notice--error { background: #fdecea; color: #b3261e; }

/* ---------- My account table ---------- */
.wxprev-account__table .wxprev-stars { width: 88px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	.wxprev-summary { grid-template-columns: 1fr; gap: 18px; }
	.wxprev-form__grid,
	.wxprev-form__media { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.wxprev-toolbar { flex-direction: column; align-items: stretch; }
}

/* =========================================================================
   Star rating override (when "Star rating display" is on in the settings).
   Active only with the body.wxprev-override-stars class. Uses the plain
   Unicode star, independent of the theme or the WooCommerce star font.
   ========================================================================= */
body.wxprev-override-stars .star-rating,
.wxprev-override-stars .star-rating {
	display: inline-block;
	position: relative;
	line-height: 1;
	font-size: 1.05em;
	letter-spacing: 2px;
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
	font-weight: 400;
	vertical-align: middle;
	overflow: visible;
	width: auto;
	height: auto;
	color: transparent;
}
body.wxprev-override-stars .star-rating::before,
.wxprev-override-stars .star-rating::before {
	content: "\2605\2605\2605\2605\2605";
	color: #dcdcdc;
	position: static;
	float: none;
	display: block;
	white-space: nowrap;
	letter-spacing: inherit;
}
body.wxprev-override-stars .star-rating > span,
.wxprev-override-stars .star-rating > span {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	padding: 0;
	font-weight: 400;
}
body.wxprev-override-stars .star-rating > span::before,
.wxprev-override-stars .star-rating > span::before {
	content: "\2605\2605\2605\2605\2605";
	color: #f5a623;
	position: absolute;
	top: 0;
	left: 0;
	letter-spacing: inherit;
}
body.wxprev-override-stars .star-rating > span > *,
body.wxprev-override-stars .star-rating strong,
.wxprev-override-stars .star-rating > span > *,
.wxprev-override-stars .star-rating strong {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
body.wxprev-override-stars .woocommerce-product-rating,
.wxprev-override-stars .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
body.wxprev-override-stars .woocommerce-review-link,
.wxprev-override-stars .woocommerce-review-link {
	font-size: .9em;
	color: #6b7280;
	text-decoration: none;
}
body.wxprev-override-stars .woocommerce-review-link:hover,
.wxprev-override-stars .woocommerce-review-link:hover { text-decoration: underline; }