/**
 * Product reviews tab count — match header wishlist/cart `.count-badge`.
 * Works for both Foundation tabs (desktop) and accordion (mobile / laptop).
 */
.nova-woocommerce-tabs a[href="#panel_reviews"] {
	overflow: visible;
}

.nova-woocommerce-tabs a[href="#panel_reviews"] > span {
	position: relative;
	display: inline-flex;
	align-items: center;
	/* Room for the absolute badge at the inline end of the label. */
	padding-inline-end: 1.375rem;
}

.nova-woocommerce-tabs a[href="#panel_reviews"] .count-badge.js-count-reviews {
	position: absolute;
	top: -0.6875rem;
	inset-inline-end: 0;
	width: 1.25rem;
	height: 1.25rem;
	line-height: 1.25rem;
	border-radius: 50%;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 500;
	color: #fff;
	background-color: var(--site-accent-color);
	pointer-events: none;
	z-index: 1;
}

/* Empty-state / guest chrome — form fields are enough. */
.nova-woocommerce-tabs .woocommerce-Reviews .woocommerce-noreviews,
.nova-woocommerce-tabs .woocommerce-Reviews #reply-title.comment-reply-title,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-rating > label,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-notes,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-author,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-email,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-cookies-consent,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-comment > label,
.nova-woocommerce-tabs .woocommerce-Reviews .woocommerce-review__awaiting-approval,
.nova-woocommerce-tabs .woocommerce-Reviews .woocommerce-Reviews-title {
	display: none !important;
}

/* Guest login prompt sits where the review form was. */
.nova-woocommerce-tabs .woocommerce-Reviews .must-log-in {
	margin: 0;
}

/* Submit same width as the comment textarea. */
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .comment-form-comment,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .comment-form-comment textarea,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input#submit,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input[type="submit"],
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit {
	margin-top: 0.25rem;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input#submit,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input[type="submit"],
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"],
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .comment-form-comment textarea {
	display: block;
	position: relative;
	border-radius: 8px !important;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .comment-form-comment textarea.jaj-comment-invalid {
	border-color: #c62828 !important;
	outline: none !important;
	box-shadow: 0 0 0 1px #c62828 !important;
}

/* Review submit: 3-dot loader (same motion as cart / edit-account). */
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit.jaj-btn-loading,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"].jaj-btn-loading,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input#submit.jaj-btn-loading,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit input[type="submit"].jaj-btn-loading {
	pointer-events: none !important;
	cursor: wait !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
	text-shadow: none !important;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit.jaj-btn-loading .jj-btn-label,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"].jaj-btn-loading .jj-btn-label {
	visibility: hidden !important;
	opacity: 0 !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit .jj-btn-loader,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"] .jj-btn-loader,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit .jj-btn-loader {
	display: none;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 18px;
	z-index: 2;
	pointer-events: none;
	writing-mode: horizontal-tb;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit.jaj-btn-loading .jj-btn-loader,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"].jaj-btn-loading .jj-btn-loader,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit.jaj-btn-loading .jj-btn-loader {
	display: flex;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit .jj-btn-loader span,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"] .jj-btn-loader span,
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit .jj-btn-loader span {
	display: block;
	width: 7px;
	height: 7px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #fff;
	animation: jajReviewSubmitDotWiggle 0.9s ease-in-out infinite;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit .jj-btn-loader span:nth-child(2),
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"] .jj-btn-loader span:nth-child(2),
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit .jj-btn-loader span:nth-child(2) {
	animation-delay: 0.15s;
}

.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button#submit .jj-btn-loader span:nth-child(3),
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit button[type="submit"] .jj-btn-loader span:nth-child(3),
.nova-woocommerce-tabs .woocommerce-Reviews #review_form .form-submit .jj-btn-loader span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes jajReviewSubmitDotWiggle {
	0%, 100% { transform: translateY(0); opacity: 0.45; }
	50% { transform: translateY(-3px); opacity: 1; }
}

/* Hide legacy WooCommerce star UI if anything still renders it. */
.nova-woocommerce-tabs .woocommerce-Reviews p.stars,
.nova-woocommerce-tabs .woocommerce-Reviews .comment-form-rating > select#rating {
	display: none !important;
}

/**
 * 1–10 drag rating bar
 */
.jaj-rating-slider {
	margin: 0 0 1.25rem;
}

.jaj-rating-slider__head {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.25rem;
	margin-bottom: 0.75rem;
}

.jaj-rating-slider__value {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	color: var(--site-accent-color, #2e5aa7);
	font-variant-numeric: tabular-nums;
}

.jaj-rating-slider__scale {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--site-text-color, #666);
	opacity: 0.7;
}

.jaj-rating-slider__track-wrap {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	/* Keep 1→10 left-to-right for natural drag, even on RTL pages. */
	direction: ltr;
}

.jaj-rating-slider__end {
	flex: 0 0 auto;
	min-width: 1.25rem;
	text-align: center;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--site-heading-color, #222);
	font-variant-numeric: tabular-nums;
}

.jaj-rating-slider__input {
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 auto;
	width: 100%;
	height: 0.5rem;
	margin: 0;
	border-radius: 999px;
	background: linear-gradient(
		to right,
		var(--site-accent-color, #2e5aa7) 0%,
		var(--site-accent-color, #2e5aa7) var(--jaj-rating-pct, 44.44%),
		#e6e8ec var(--jaj-rating-pct, 44.44%),
		#e6e8ec 100%
	);
	outline: none;
	cursor: pointer;
}

.jaj-rating-slider__input:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-accent-color, #2e5aa7) 25%, transparent);
}

.jaj-rating-slider__input::-webkit-slider-runnable-track {
	height: 0.5rem;
	border-radius: 999px;
	background: transparent;
}

.jaj-rating-slider__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: -0.375rem;
	border-radius: 50%;
	border: 2px solid #fff;
	background: var(--site-accent-color, #2e5aa7);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: grab;
}

.jaj-rating-slider__input:active::-webkit-slider-thumb {
	cursor: grabbing;
}

.jaj-rating-slider__input::-moz-range-track {
	height: 0.5rem;
	border-radius: 999px;
	background: transparent;
}

.jaj-rating-slider__input::-moz-range-thumb {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--site-accent-color, #2e5aa7);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: grab;
}

/**
 * Each review in a bordered card.
 */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist > li.review,
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist > li.comment {
	position: relative;
	border: 1px solid #2e5aa7;
	border-radius: 8px;
	padding: 10px;
	margin: 0 0 0.875rem;
	box-sizing: border-box;
	list-style: none;
}

.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist > li.review:last-child,
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist > li.comment:last-child {
	margin-bottom: 0;
}

/* Drop theme gray divider inside each review card. */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container {
	border-top: none !important;
	padding-top: 0;
	padding-bottom: 0;
}

/**
 * Review list: score pill instead of stars.
 * 1–3 red · 4–5 orange · 6–7 yellow · 8–10 green
 */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .star-rating {
	display: none !important;
}

.jaj-review-score-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	vertical-align: middle;
}

/* Pills (physical left) + meta (physical right); comment body below with divider. */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text {
	display: grid;
	/* LTR grid so column 1 is always the physical left. */
	direction: ltr;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	align-items: start;
	column-gap: 0.75rem;
	row-gap: 0;
	float: none !important;
	width: 100% !important;
	max-width: 100%;
	margin-top: 0;
	box-sizing: border-box;
}

.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text .jaj-review-pills,
.rtl .nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text .jaj-review-pills {
	position: static;
	left: auto;
	top: auto;
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	float: none;
	margin: 0;
	z-index: 1;
	direction: ltr;
}

/* Score / buyer labels stay Persian RTL inside the LTR stack. */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text .jaj-review-score-pill,
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text .jaj-review-buyer-pill {
	direction: rtl;
	unicode-bidi: isolate;
	text-align: center;
}

.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text > p.meta {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	align-self: start;
	margin: 0;
	direction: rtl;
	text-align: end;
	unicode-bidi: isolate;
}

.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .comment_container .comment-text .description {
	grid-column: 1 / -1;
	grid-row: 2;
	margin-top: 5px;
	margin-bottom: 0;
	padding-top: 10px;
	border-top: 1px solid #e0e0e0;
	direction: rtl;
	text-align: right;
	unicode-bidi: isolate;
}

.jaj-review-buyer-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.jaj-review-buyer-pill--yes {
	background-color: #c7f9cc;
	color: #1e5c2a;
}

.jaj-review-buyer-pill--no {
	background-color: #d9d9d9;
	color: #4a4a4a;
}

/* Prefer our buyer pill over WooCommerce “verified owner” text. */
.nova-woocommerce-tabs .woocommerce-Reviews #comments .commentlist .review .woocommerce-review__verified {
	display: none !important;
}

.jaj-review-score-pill--red {
	background-color: #e56b6f;
	color: #6b1f22;
}

.jaj-review-score-pill--orange {
	background-color: #eaac8b;
	color: #6b3d28;
}

.jaj-review-score-pill--yellow {
	background-color: #f4d58d;
	color: #6b5418;
}

.jaj-review-score-pill--green {
	background-color: #c7f9cc;
	color: #1e5c2a;
}

/**
 * Single product summary: buyer-only average score pill (replaces stars).
 */
.woocommerce .product .woocommerce-product-rating.jaj-product-rating,
.elementor-kitify-wooproduct-rating .woocommerce-product-rating.jaj-product-rating {
	display: flex;
	align-items: center;
	margin: 0 0 0.5rem;
	line-height: 1;
}

.woocommerce .product .woocommerce-product-rating.jaj-product-rating .jaj-review-score-pill,
.elementor-kitify-wooproduct-rating .woocommerce-product-rating.jaj-product-rating .jaj-review-score-pill {
	direction: rtl;
	unicode-bidi: isolate;
	float: none;
	margin: 0;
}

/* Shop / category cards: pill on the first title line, 5px from the left edge. */
ul.products .product .product-item__description--info .info-left {
	position: relative;
}

ul.products .product .product-item__description--info .info-left:has(.jaj-product-rating--loop) a.title .woocommerce-loop-product__title {
	/* Keep title on the right; leave room so it does not run under the pill. */
	padding-left: 4.75rem;
	box-sizing: border-box;
}

ul.products .product .jaj-product-rating--loop,
ul.products .product .star-rating-wrap.jaj-product-rating--loop {
	position: absolute;
	left: 5px;
	top: 0;
	display: flex;
	align-items: center;
	margin: 0;
	line-height: 1;
	z-index: 1;
	/* Match first title line height. */
	min-height: 1.375em;
}

ul.products .product .jaj-product-rating--loop .jaj-review-score-pill {
	direction: rtl;
	unicode-bidi: isolate;
	float: none;
	margin: 0;
}

/* Collapse empty Kitify rating widget when no buyer scores. */
.elementor-widget.elementor-kitify-wooproduct-rating:not(:has(.jaj-product-rating)) {
	display: none !important;
}


