.wrci-reviews {
	--wrci-accent: #caa057;
	--wrci-text: #2b2b2b;
	--wrci-muted: #767676;
	--wrci-border: #e5e5e5;
	--wrci-track: #ececeb;
	max-width: 1500px;
	margin: 48px auto;
	padding: 0 16px;
	color: var(--wrci-text);
	font-size: 15px;
	line-height: 1.6;
	box-sizing: border-box;
}

.wrci-reviews *,
.wrci-reviews *::before,
.wrci-reviews *::after {
	box-sizing: inherit;
}

.wrci-reviews-title {
	text-align: center;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 28px;
}

/* Summary */
.wrci-summary {
	display: flex;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
	background: #fff;
	border: 1px solid var(--wrci-border);
	border-radius: 12px;
	padding: 28px 32px;
	margin-bottom: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.wrci-summary-score {
	flex: 0 0 auto;
	text-align: center;
	min-width: 110px;
	padding-right: 32px;
	border-right: 1px solid var(--wrci-border);
}

.wrci-score-number {
	font-size: 44px;
	font-weight: 800;
	line-height: 1;
	color: var(--wrci-accent);
}

.wrci-score-max {
	font-size: 18px;
	font-weight: 400;
	color: var(--wrci-muted);
}

.wrci-score-total {
	margin-top: 6px;
	font-size: 13px;
	color: var(--wrci-muted);
	white-space: nowrap;
}

.wrci-summary-bars {
	flex: 1 1 320px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wrci-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wrci-bar-label {
	flex: 0 0 34px;
	font-size: 13px;
	color: var(--wrci-text);
	display: flex;
	align-items: center;
	gap: 2px;
}

.wrci-bar-star {
	color: var(--wrci-accent);
}

.wrci-bar-track {
	flex: 1 1 auto;
	height: 8px;
	border-radius: 4px;
	background: var(--wrci-track);
	overflow: hidden;
}

.wrci-bar-fill {
	display: block;
	height: 100%;
	background: var(--wrci-accent);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.wrci-bar-count {
	flex: 0 0 90px;
	text-align: right;
	font-size: 13px;
	color: var(--wrci-muted);
}

/* Two-column layout: summary + review list on the left, write-a-review form on the right */
.wrci-reviews-columns {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 48px;
	align-items: start;
}

.wrci-reviews-col-right {
	position: sticky;
	top: 24px;
}

.wrci-review-list-wrap.wrci-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Review list */
.wrci-review-list {
	margin-bottom: 24px;
}

.wrci-pagination {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 24px 0 8px;
}

.wrci-page-btn {
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--wrci-border);
	background: #fff;
	color: var(--wrci-text);
	border-radius: 17px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wrci-page-btn:hover:not(:disabled) {
	border-color: var(--wrci-accent);
	color: var(--wrci-accent);
}

.wrci-page-btn.wrci-page-active {
	background: var(--wrci-accent);
	border-color: var(--wrci-accent);
	color: #fff;
	font-weight: 700;
}

.wrci-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.wrci-page-ellipsis {
	padding: 0 4px;
	color: var(--wrci-muted);
	font-size: 13px;
}

.wrci-no-reviews {
	background: #f7f7f6;
	border-radius: 6px;
	padding: 36px 20px;
	text-align: center;
	color: var(--wrci-muted);
}

.wrci-no-reviews p {
	margin: 0 0 6px;
}

.wrci-review-item {
	display: flex;
	gap: 16px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--wrci-border);
	border-radius: 10px;
	margin-bottom: 14px;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.wrci-review-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	border-color: #d8d8d8;
}

.wrci-review-item:last-child {
	margin-bottom: 0;
}

.wrci-review-avatar {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--wrci-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wrci-accent) 20%, transparent);
}

.wrci-review-body {
	flex: 1 1 auto;
	min-width: 0;
}

.wrci-review-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 4px;
}

.wrci-review-name {
	font-weight: 700;
}

.wrci-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	font-weight: 600;
	color: #2a8a4a;
	background: #e8f6ec;
	border-radius: 20px;
	padding: 3px 9px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.wrci-verified-badge::before {
	content: "\2713";
	font-size: 11px;
}

.wrci-review-date {
	margin-left: auto;
	font-size: 12px;
	color: var(--wrci-muted);
}

.wrci-stars {
	display: inline-block;
	font-size: 15px;
	letter-spacing: 1px;
	margin-bottom: 6px;
}

.wrci-star-filled {
	color: var(--wrci-accent);
}

.wrci-star-empty {
	color: var(--wrci-track);
}

.wrci-review-title {
	margin: 4px 0;
	font-size: 15px;
	font-weight: 700;
}

.wrci-review-text {
	margin: 4px 0 8px;
	color: var(--wrci-text);
	word-wrap: break-word;
}

.wrci-review-photos {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 10px 0;
}

.wrci-review-photos a {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wrci-review-photos a:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.wrci-review-photos img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border: 1px solid var(--wrci-border);
	display: block;
}

.wrci-review-reply {
	margin-top: 12px;
	margin-left: 4px;
	padding: 10px 14px;
	background: #f7f7f6;
	border-left: 3px solid var(--wrci-accent);
	border-radius: 4px;
	font-size: 13.5px;
}

.wrci-review-reply p {
	margin: 4px 0 0;
}

/* Write a review */
.wrci-write-review {
	background: #fff;
	border: 1px solid var(--wrci-border);
	border-radius: 12px;
	padding: 28px 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.wrci-write-review h3 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--wrci-border);
}

.wrci-write-review-product {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding: 10px;
	background: #f7f7f6;
	border-radius: 8px;
}

.wrci-write-review-product img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	background: #fff;
	flex-shrink: 0;
}

.wrci-write-review-product span {
	font-weight: 600;
	font-size: 14px;
}

.wrci-field {
	margin-bottom: 16px;
}

.wrci-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
}

.wrci-field input[type="text"],
.wrci-field input[type="email"],
.wrci-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--wrci-border);
	border-radius: 5px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: var(--wrci-text);
}

.wrci-field textarea {
	resize: vertical;
	min-height: 90px;
}

.wrci-field input:focus,
.wrci-field textarea:focus {
	outline: none;
	border-color: var(--wrci-accent);
}

.wrci-field-row {
	display: flex;
	gap: 12px;
}

.wrci-field-row .wrci-field {
	flex: 1 1 0;
}

.wrci-star-input {
	display: flex;
	gap: 4px;
}

.wrci-star-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	color: var(--wrci-track);
	padding: 2px;
	transition: color 0.1s ease, transform 0.1s ease;
}

.wrci-star-btn:hover {
	transform: scale(1.12);
}

.wrci-star-btn.wrci-star-active {
	color: var(--wrci-accent);
}

.wrci-photo-upload {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wrci-photo-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border: 1.5px dashed var(--wrci-border);
	border-radius: 8px;
	background: #fafafa;
	padding: 20px 10px;
	cursor: pointer;
	color: var(--wrci-muted);
	font-size: 13px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wrci-photo-dropzone:hover {
	border-color: var(--wrci-accent);
	background: color-mix(in srgb, var(--wrci-accent) 6%, #fff);
}

.wrci-upload-icon {
	font-size: 20px;
	color: var(--wrci-accent);
}

.wrci-photo-count {
	font-size: 11px;
	color: var(--wrci-muted);
}

.wrci-photo-previews {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wrci-photo-preview {
	position: relative;
	width: 56px;
	height: 56px;
}

.wrci-photo-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--wrci-border);
}

.wrci-photo-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #c0392b;
	color: #fff;
	border: none;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

.wrci-submit-btn {
	width: 100%;
	background: var(--wrci-accent);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.wrci-submit-btn:hover {
	opacity: 0.92;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--wrci-accent) 40%, transparent);
	transform: translateY(-1px);
}

.wrci-submit-btn:active {
	transform: translateY(0);
}

.wrci-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wrci-form-message {
	margin-top: 12px;
	font-size: 13.5px;
	font-weight: 600;
	display: none;
}

.wrci-form-message.wrci-message-success {
	display: block;
	color: #2a8a4a;
}

.wrci-form-message.wrci-message-error {
	display: block;
	color: #c0392b;
}

.wrci-login-required {
	background: #fff;
	border: 1px solid var(--wrci-border);
	border-radius: 6px;
	padding: 16px;
	text-align: center;
}

.wrci-login-required a {
	color: var(--wrci-accent);
	font-weight: 600;
}

/* Compact [wrci_rating] widget */
.wrci-mini-rating {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	line-height: 1;
	margin: 6px 0;
}

.wrci-mini-rating .wrci-stars {
	margin-bottom: 0;
	font-size: 18px;
}

.wrci-mini-rating-count {
	color: var(--wrci-muted);
	font-size: 15px;
	white-space: nowrap;
}

/* Responsive */
@media (max-width: 900px) {
	.wrci-reviews-columns {
		grid-template-columns: 1fr;
	}

	.wrci-reviews-col-right {
		position: static;
	}
}

@media (max-width: 640px) {
	.wrci-summary {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 22px;
	}

	.wrci-summary-score {
		border-right: none;
		border-bottom: 1px solid var(--wrci-border);
		padding-right: 0;
		padding-bottom: 16px;
	}

	.wrci-summary-bars {
		width: 100%;
	}

	.wrci-review-item {
		padding: 16px;
	}

	.wrci-field-row {
		flex-direction: column;
		gap: 0;
	}

	.wrci-write-review {
		padding: 20px 16px;
	}
}
