/**
 * Kedaranchal â€” product reviews tab (summary, cards, star form).
 */

.kr-reviews {
	margin: 0;
}

.kr-pdp-page .kr-single-rating .kr-rating[data-product-id] {
	cursor: pointer;
}

.kr-pdp-page .kr-single-rating .kr-rating[data-product-id]:hover {
	opacity: 0.9;
}

.kr-reviews-already-reviewed {
	margin: 0;
	padding: 16px 18px;
	border-radius: var(--kr-radius, 12px);
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	font-size: 0.9375rem;
	font-weight: 600;
}

.kr-review-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.kr-reviews__layout {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

/* Summary sidebar — Flipkart style */
.kr-reviews-summary {
	padding: 20px 18px;
	border-radius: var(--kr-radius, 12px);
	border: 1px solid #e0e0e0;
	background: #fff;
	box-shadow: none;
	position: sticky;
	top: calc(var(--kr-filter-sticky-top, 88px) + 12px);
}

.kr-reviews-summary__score {
	text-align: center;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f0f0f0;
}

.kr-reviews-summary__number {
	display: block;
	font-size: 2.75rem;
	font-weight: 700;
	line-height: 1;
	color: var(--kr-text, #1a1a1a);
	margin-bottom: 8px;
}

.kr-reviews-summary__stars .star-rating {
	margin: 0 auto 8px;
	font-size: 1rem;
}

.kr-reviews-summary__count {
	margin: 0;
	font-size: 0.875rem;
	color: var(--kr-text-muted, #6b7280);
	font-weight: 600;
	text-transform: capitalize;
}

.kr-reviews-summary__bars {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kr-reviews-summary__bar-row {
	margin: 0;
	padding: 0;
}

.kr-reviews-summary__bar-btn {
	display: grid;
	grid-template-columns: 40px 1fr 28px;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 6px 4px;
	border: none;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	font: inherit;
	text-align: left;
	transition: background 0.15s ease;
}

.kr-reviews-summary__bar-btn:hover:not(:disabled) {
	background: #fff7f0;
}

.kr-reviews-summary__bar-btn.is-active {
	background: #fff4eb;
	box-shadow: inset 0 0 0 1px rgba(255, 119, 34, 0.35);
}

.kr-reviews-summary__bar-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.kr-reviews-summary__bar-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--kr-text-mid, #4a4a4a);
	white-space: nowrap;
}

.kr-reviews-summary__bar-track {
	display: block;
	height: 6px;
	border-radius: 999px;
	background: #f0f0f0;
	overflow: hidden;
}

.kr-reviews-summary__bar-fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: #388e3c;
}

.kr-reviews-summary__bar-count {
	text-align: right;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-reviews-summary__clear {
	display: block;
	width: 100%;
	margin: 0 0 10px;
	padding: 8px 10px;
	border: 1px dashed #ffd0b0;
	border-radius: 8px;
	background: #fffaf5;
	color: var(--kr-saffron, #ff7722);
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}

.kr-reviews-summary__write-btn {
	width: 100%;
	padding: 12px 16px;
	border: none;
	border-radius: var(--kr-btn-radius, 6px);
	background: var(--kr-saffron, #ff7722);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: capitalize;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 4px 12px rgba(255, 119, 34, 0.28);
}

.kr-reviews-summary__write-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(255, 119, 34, 0.34);
}

/* Toolbar */
.kr-reviews-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f0f0;
}

.kr-reviews-toolbar__title {
	margin: 0 0 4px;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
	text-transform: capitalize;
}

.kr-reviews-toolbar__meta {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--kr-text-muted, #6b7280);
	font-weight: 600;
}

.kr-reviews-toolbar__filter {
	display: inline-block;
	margin-top: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #fff4eb;
	color: var(--kr-saffron, #ff7722);
	font-size: 0.75rem;
	font-weight: 700;
}

.kr-reviews-toolbar__sort select {
	min-width: 160px;
	padding: 9px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--kr-text, #1a1a1a);
	cursor: pointer;
}

/* Review list */
.kr-reviews__list-wrap {
	margin-bottom: 24px;
	position: relative;
	min-height: 80px;
}

.kr-reviews__list-wrap.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.kr-reviews-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.kr-reviews-list .kr-review-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kr-review-card {
	padding: 16px 18px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
}

.kr-review-card__head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 10px 12px;
	align-items: start;
	margin-bottom: 10px;
}

.kr-review-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 8px;
	border-radius: 4px;
	background: #388e3c;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
}

.kr-review-card__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	color: #616161;
	font-size: 0.875rem;
	font-weight: 700;
	flex-shrink: 0;
}

.kr-review-card__meta {
	min-width: 0;
}

.kr-review-card__author {
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
	line-height: 1.3;
	text-transform: capitalize;
}

.kr-review-card__verified {
	display: inline-block;
	margin-top: 3px;
	padding: 2px 7px;
	border-radius: 3px;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.kr-review-card__date,
.kr-review-card__pending {
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	color: #878787;
	font-style: normal;
	font-weight: 500;
}

.kr-review-card__body {
	font-size: 0.875rem;
	line-height: 1.6;
	color: #212121;
}

.kr-review-card__body p {
	margin: 0;
}

.kr-review-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}

.kr-review-card__helpful-label {
	font-size: 0.75rem;
	color: #878787;
	font-weight: 500;
}

.kr-review-card__helpful-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	background: #fff;
	color: #212121;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.kr-review-card__helpful-btn:hover {
	border-color: var(--kr-saffron, #ff7722);
	color: var(--kr-saffron, #ff7722);
}

.kr-review-card__helpful-btn.is-voted {
	border-color: #c8e6c9;
	background: #e8f5e9;
	color: #2e7d32;
	cursor: default;
}

.kr-review-card__helpful-count:not(:empty)::before {
	content: '(';
}

.kr-review-card__helpful-count:not(:empty)::after {
	content: ')';
}

.kr-review-card__helpful-meta {
	width: 100%;
	font-size: 0.75rem;
	color: #878787;
}

.kr-reviews-empty {
	text-align: center;
	padding: 36px 24px;
	border: 1.5px dashed var(--kr-border, #e8e4df);
	border-radius: var(--kr-radius, 12px);
	background: #fafafa;
}

.kr-reviews-empty__clear {
	margin-top: 14px;
	padding: 8px 14px;
	border: 1px solid var(--kr-saffron, #ff7722);
	border-radius: 8px;
	background: #fff;
	color: var(--kr-saffron, #ff7722);
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}

.kr-reviews-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #fff;
	color: var(--kr-saffron, #ff7722);
}

.kr-reviews-empty__title {
	margin: 0 0 6px;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-reviews-empty__text {
	margin: 0;
	font-size: 0.875rem;
	color: var(--kr-text-muted, #6b7280);
}

/* Review form */
.kr-review-form-wrap {
	margin-top: 8px;
}

.kr-review-form-card {
	padding: 22px 24px;
	border: 1px solid var(--kr-border-light, #f0ece4);
	border-radius: var(--kr-radius, 12px);
	background: #fff;
	box-shadow: var(--kr-shadow-sm, 0 2px 12px rgba(0, 0, 0, 0.04));
}

.kr-review-form__title {
	margin: 0 0 6px;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-review-form__subtitle {
	margin: 0 0 18px;
	font-size: 0.875rem;
	color: var(--kr-text-muted, #6b7280);
}

.kr-review-form__login,
.kr-review-form__privacy {
	margin: 0 0 14px;
	font-size: 0.8125rem;
	color: var(--kr-text-muted, #6b7280);
}

.kr-review-form__login a {
	color: var(--kr-saffron, #ff7722);
	font-weight: 600;
	text-decoration: none;
}

.kr-review-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kr-review-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.kr-review-form__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-review-form__field.kr-float-ready > label {
	margin-bottom: 0;
}

.kr-review-form__field label .required {
	color: #dc2626;
}

.kr-review-form__field input[type="text"],
.kr-review-form__field input[type="email"],
.kr-review-form__field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--kr-border, #e8e4df);
	border-radius: var(--kr-radius, 12px);
	background: #fff;
	font-size: 0.9375rem;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kr-review-form__field textarea {
	min-height: 120px;
	resize: vertical;
}

.kr-review-form__field input:focus,
.kr-review-form__field textarea:focus {
	outline: none;
	border-color: var(--kr-saffron, #ff7722);
	box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.12);
}

/* Star input */
.kr-star-input {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.kr-star-input__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: transparent;
	color: #d1d5db;
	cursor: pointer;
	transition: color 0.15s ease, transform 0.15s ease;
}

.kr-star-input__btn:hover,
.kr-star-input__btn.is-hover,
.kr-star-input__btn.is-selected {
	color: var(--kr-saffron, #ff7722);
	transform: scale(1.05);
}

.kr-star-input__hint {
	margin: 6px 0 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--kr-saffron, #ff7722);
	min-height: 1.2em;
}

.kr-star-input__hint:empty {
	display: none;
}

.kr-review-form__submit {
	align-self: flex-start;
	min-width: 160px;
	padding: 12px 22px !important;
	border: none !important;
	border-radius: var(--kr-btn-radius, 6px) !important;
	background: var(--kr-saffron, #ff7722) !important;
	color: #fff !important;
	font-size: 0.9375rem !important;
	font-weight: 700 !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(255, 119, 34, 0.3);
}

.kr-review-form__submit:hover {
	background: #e86a18 !important;
}

.kr-review-form__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.kr-review-notice {
	margin-bottom: 14px;
	padding: 12px 14px;
	border-radius: var(--kr-radius, 12px);
	font-size: 0.875rem;
	font-weight: 600;
}

.kr-review-notice--success {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.kr-review-notice--error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.kr-review-notice p {
	margin: 0;
}

.kr-reviews-verified-only {
	padding: 16px 18px;
	border-radius: var(--kr-radius, 12px);
	background: var(--kr-cream, #faf8f4);
	border: 1px solid var(--kr-border-light, #f0ece4);
	font-size: 0.875rem;
	color: var(--kr-text-muted, #6b7280);
}

/* Hide default WC review chrome inside tab */
.kr-pdp-tabs__panel .woocommerce-Reviews-title,
.kr-pdp-tabs__panel #comments > h2 {
	display: none !important;
}

.kr-pdp-tabs__panel .woocommerce-noreviews,
.kr-reviews .comment-form-rating select,
.kr-reviews p.stars,
.kr-reviews #xs-review-box,
.kr-reviews .public-xs-review-box {
	display: none !important;
}

@media (max-width: 991px) {
	.kr-reviews__layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.kr-reviews-summary {
		position: static;
	}

	.kr-reviews-toolbar {
		align-items: stretch;
	}

	.kr-reviews-toolbar__sort {
		width: 100%;
	}

	.kr-reviews-toolbar__sort select {
		width: 100%;
	}
}

@media (max-width: 576px) {
	.kr-review-form__row {
		grid-template-columns: 1fr;
	}

	.kr-review-card__head {
		grid-template-columns: auto 1fr;
	}

	.kr-review-card__avatar {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}
}
