/**
 * UnfoldCRO Ecommerce Review Plugin — front-end styles.
 *
 * Minimal, editorial treatment to sit inside the Sentiments PDP: dark/grey stars
 * (no gold), boxless inputs with an underline, and a full-width reviews section
 * that echoes the site's other full-bleed bands. Two surfaces:
 *   1. .ucro-chip-holder  — compact rating placed just below the description.
 *   2. .ucro-reviews       — the section above Instagram (summary + list + form).
 */

/* Off-screen SVG gradient carrier (half stars) — never occupies layout. */
.ucro-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- Stars ------------------------------------------------------------- */
.ucro-stars { display: inline-flex; align-items: center; gap: 2px; line-height: 1; vertical-align: middle; }
.ucro-star { display: inline-flex; }
.ucro-star svg { display: block; }
.ucro-star svg path { fill: #dcdcdc; }
.ucro-star--full svg path { fill: #1a1a1a; }
.ucro-star--half svg path { fill: url(#ucro-half); }

/* The product template already outputs WooCommerce's native rating block below the
   description (hidden while a product has 0 reviews, visible once it has some). Our
   chip replaces it — it adds the empty-state CTA and a scroll-to-reviews link — so
   hide the native one to avoid a duplicate star widget. Scoped to the PDP summary's
   sibling, so star ratings on related-product cards are left untouched. */
.wp-block-woocommerce-product-summary ~ .wc-block-components-product-rating { display: none !important; }

/* ---- Compact rating below the description ------------------------------ */
.ucro-chip-holder { margin: 10px 0 2px; }
.ucro-title-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	font-size: 13px;
	letter-spacing: -0.2px;
}
.ucro-title-chip:hover { opacity: 0.7; }
.ucro-title-chip__count { color: #646464; border-bottom: 1px solid transparent; }
.ucro-title-chip:hover .ucro-title-chip__count { border-bottom-color: #bbb; }
.ucro-title-chip--empty { color: #521c1c; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Reviews section --------------------------------------------------- */
.ucro-reviews {
	width: 100%;
	background: #fff;
	padding: clamp(40px, 6vw, 88px) 0;
	margin: 0;
}
/* Drop the divider line the following section (Instagram) draws on its top edge,
   so the white reviews band flows seamlessly into it with no bottom border. */
.ucro-reviews + .wp-block-group { border-top: 0 !important; }
.ucro-reviews__inner {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 40px);
}
.ucro-reviews__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 20px;
	padding-bottom: 22px;
	margin-bottom: 26px;
	border-bottom: 1px solid #e6e2dc;
}
.ucro-reviews__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 400;
	letter-spacing: -0.02em;
}
.ucro-reviews__summary { display: inline-flex; align-items: center; gap: 10px; }
.ucro-reviews__avg { font-size: 1.15rem; font-weight: 600; }
.ucro-reviews__count { color: #646464; font-size: 0.85rem; }
.ucro-reviews__write-toggle {
	margin-left: auto;
	border: 1px solid #1a1a1a;
	background: transparent;
	color: #1a1a1a;
	padding: 9px 20px;
	font: inherit;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.ucro-reviews__write-toggle:hover { background: #1a1a1a; color: #fff; }
.ucro-reviews__write-toggle[aria-expanded="true"] { background: #1a1a1a; color: #fff; }

/* Review list */
.ucro-reviews__list { list-style: none; margin: 0; padding: 0; }
.ucro-reviews__list[hidden] { display: none; }
.ucro-review[hidden] { display: none; }
.ucro-reviews__more {
	display: block;
	margin: 26px auto 0;
	border: 1px solid #1a1a1a;
	background: transparent;
	color: #1a1a1a;
	padding: 10px 26px;
	font: inherit;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.ucro-reviews__more:hover { background: #1a1a1a; color: #fff; }
.ucro-reviews__more[hidden] { display: none; }
.ucro-review { padding: 22px 0; border-bottom: 1px solid #ececec; }
.ucro-review:last-child { border-bottom: 0; }
.ucro-review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ucro-review__author { font-weight: 600; font-size: 0.95rem; }
.ucro-review__verified {
	font-size: 0.66rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2e7d32;
	border: 1px solid #bfe0c0;
	border-radius: 2px;
	padding: 1px 6px;
}
.ucro-review__date { margin-left: auto; color: #9a9a9a; font-size: 0.8rem; }
.ucro-review .ucro-stars { margin-bottom: 8px; }
.ucro-review__body { color: #3a3a3a; line-height: 1.6; font-size: 0.95rem; }
.ucro-review__body p { margin: 0 0 0.6em; }
.ucro-review__body p:last-child { margin-bottom: 0; }
.ucro-reviews__empty { color: #7a7a7a; font-size: 0.95rem; margin: 0 0 8px; }

/* ---- Write-a-review form ---------------------------------------------- */
.ucro-review-form { margin-top: 28px; padding-top: 26px; border-top: 1px solid #e6e2dc; max-width: 560px; }
.ucro-review-form[hidden] { display: none; }
.ucro-review-form__title { margin: 0 0 14px; font-size: 1.15rem; font-weight: 500; }
.ucro-review-form__rating { display: inline-flex; gap: 4px; margin-bottom: 16px; }
.ucro-star-btn {
	border: 0;
	background: transparent;
	padding: 2px;
	cursor: pointer;
	line-height: 0;
	color: #dcdcdc;
	transition: color 0.12s;
}
.ucro-star-btn svg { display: block; fill: currentColor; }
.ucro-star-btn:hover,
.ucro-star-btn.is-hover,
.ucro-star-btn.is-on { color: #1a1a1a; }
.ucro-review-form__row { display: flex; gap: 12px; margin-bottom: 12px; }
.ucro-review-form__row input { flex: 1 1 0; min-width: 0; }
.ucro-review-form input[type="text"],
.ucro-review-form input[type="email"],
.ucro-review-form textarea {
	width: 100%;
	border: 0;
	border-bottom: 1px solid #d8d8d8;
	background: transparent;
	padding: 10px 2px;
	font: inherit;
	color: inherit;
	box-sizing: border-box;
}
.ucro-review-form textarea { resize: vertical; margin-bottom: 14px; }
.ucro-review-form input:focus,
.ucro-review-form textarea:focus { outline: 0; border-bottom-color: #1a1a1a; }
.ucro-review-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ucro-review-form__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ucro-review-form__submit {
	border: 0;
	background: #111;
	color: #fff;
	padding: 12px 26px;
	font: inherit;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.2s;
}
.ucro-review-form__submit:hover { opacity: 0.85; }
.ucro-review-form__submit[disabled] { opacity: 0.55; cursor: default; }
.ucro-review-form__status { font-size: 0.85rem; line-height: 1.4; }
.ucro-review-form__status[data-state="ok"] { color: #2e7d32; }
.ucro-review-form__status[data-state="err"] { color: #c0392b; }

@media (max-width: 560px) {
	.ucro-reviews__write-toggle { margin-left: 0; }
	.ucro-review-form__row { flex-direction: column; gap: 12px; }
}
