/* EB Customer Reviews Pro - Frontend CSS System */

:root {
	--ebcr-primary-color: #2563eb;
	--ebcr-primary-hover: #1d4ed8;
	--ebcr-star-color: #2563eb;
	--ebcr-star-empty: #e2e8f0;
	--ebcr-bg-card: #ffffff;
	--ebcr-text-primary: #0f172a;
	--ebcr-text-secondary: #334155;
	--ebcr-text-muted: #64748b;
	--ebcr-border-color: #e2e8f0;
	--ebcr-badge-bg: #eff6ff;
	--ebcr-badge-color: #1d4ed8;
	--ebcr-btn-pink: #3b82f6;
	--ebcr-btn-pink-hover: #2563eb;
	--ebcr-teal: #00897b;
	--ebcr-teal-light: #e0f2f1;
	--ebcr-radius: 12px;
	--ebcr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--ebcr-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Review Badge Bar ─────────────────────────────────────── */
.ebcr-badge-bar {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	background: #ffffff;
	border: 1px solid #b2dfdb;
	border-radius: 40px;
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	color: var(--ebcr-text-secondary);
	box-shadow: 0 2px 8px rgba(0, 137, 123, 0.08);
	width: auto;
}

.ebcr-badge-score-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ebcr-teal);
}

.ebcr-badge-check {
	display: inline-flex;
	align-items: center;
	color: var(--ebcr-teal);
	flex-shrink: 0;
}

.ebcr-badge-avg {
	font-size: 17px;
	font-weight: 800;
	color: var(--ebcr-teal);
	line-height: 1;
}

.ebcr-badge-stars {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	color: var(--ebcr-teal);
	font-size: 17px;
	line-height: 1;
}

.ebcr-badge-star--full {
	color: var(--ebcr-teal);
}

.ebcr-badge-star--half {
	color: var(--ebcr-teal);
	opacity: 0.6;
}

.ebcr-badge-star--empty {
	color: #b2dfdb;
}

.ebcr-badge-divider {
	color: #b2dfdb;
	font-weight: 300;
	font-size: 16px;
	line-height: 1;
	user-select: none;
}

.ebcr-badge-text {
	font-size: 13.5px;
	color: #546e7a;
	white-space: nowrap;
}

.ebcr-badge-text strong {
	color: var(--ebcr-text-primary);
	font-weight: 700;
}

.ebcr-badge-verified {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ebcr-teal);
}

.ebcr-badge-verified-icon {
	color: var(--ebcr-teal);
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.ebcr-badge-bar {
		flex-direction: column;
		align-items: flex-start;
		border-radius: 12px;
		gap: 8px;
	}

	.ebcr-badge-divider {
		display: none;
	}

	.ebcr-badge-text {
		white-space: normal;
	}
}

/* ───────────────────────────────────────────────────────── */


/* Ensure clean white background and high text contrast */
.ebcr-reviews-wrapper,
.ebcr-summary-card,
.ebcr-review-card,
.ebcr-form-card-wrap,
.ebcr-no-reviews {
	background-color: #ffffff !important;
	color: #334155 !important;
}

/* ── Rating Summary Card — 3-column layout ─────────────── */
.ebcr-summary-card {
	background: var(--ebcr-bg-card);
	border: 1px solid var(--ebcr-border-color);
	border-radius: var(--ebcr-radius);
	padding: 28px 32px;
	box-shadow: var(--ebcr-shadow);
	display: grid;
	grid-template-columns: auto 1px auto 1px auto;
	gap: 0 0;
	align-items: center;
	margin-bottom: 32px;
}

/* Vertical divider lines */
.ebcr-summary-divider {
	width: 1px;
	height: 80px;
	background: var(--ebcr-border-color);
	mx: 24px;
	margin: 0 28px;
	align-self: center;
}

/* Col 1: Score + Stars + Count */
.ebcr-summary-overview {
	text-align: left;
	padding-right: 8px;
}

.ebcr-summary-stars {
	color: var(--ebcr-star-color);
	font-size: 28px;
	margin: 0 0 6px 0;
	letter-spacing: 1px;
}

.ebcr-summary-score {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 6px;
}

.ebcr-score-num {
	font-size: 20px;
	font-weight: 700;
	color: var(--ebcr-text-primary);
}

.ebcr-score-out-of {
	font-size: 14px;
	color: var(--ebcr-text-muted);
	font-weight: 400;
}

.ebcr-summary-count {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	color: var(--ebcr-text-secondary);
	margin: 0;
}

.ebcr-summary-check {
	flex-shrink: 0;
	vertical-align: middle;
}

/* Col 2: Bar Breakdown */
.ebcr-summary-breakdown {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 0 8px;
}

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

.ebcr-bar-stars {
	display: inline-flex;
	gap: 1px;
	flex-shrink: 0;
}

.ebcr-bar-star {
	font-size: 24px;
	line-height: 1;
}

.ebcr-bar-star.on {
	color: var(--ebcr-star-color);
}

.ebcr-bar-star.off {
	color: var(--ebcr-star-empty);
}

.ebcr-progress-track {
	flex: 1;
	height: 10px;
	background: #e5e7eb;
	border-radius: 5px;
	overflow: hidden;
	min-width: 100px;
}

.ebcr-progress-fill {
	height: 100%;
	background: #3b82f6;
	border-radius: 5px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ebcr-bar-val {
	width: 20px;
	font-size: 24px;
	color: var(--ebcr-text-secondary);
	text-align: right;
	flex-shrink: 0;
	font-weight: 500;
}

/* Col 3: Write a Review Button */
.ebcr-summary-action {
	padding-left: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ebcr-btn-write-review {
	background: #2563eb !important;
	color: #ffffff !important;
	border: 2px solid #2563eb !important;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--ebcr-transition);
	white-space: nowrap;
	letter-spacing: 0.3px;
}

.ebcr-btn-write-review:hover {
	background: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* Responsive: stack on mobile */
@media (max-width: 700px) {
	.ebcr-summary-card {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 20px;
	}

	.ebcr-summary-divider {
		width: 100%;
		height: 1px;
		margin: 0;
	}

	.ebcr-summary-action {
		padding-left: 0;
		justify-content: flex-start;
	}

	.ebcr-btn-write-review {
		width: 100%;
	}
}

/* ──────────────────────────────────────────────────────── */

/* ── Filter Bar ─────────────────────────────────────────── */
.ebcr-filter-bar {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ebcr-border-color);
	flex-wrap: wrap;
}

.ebcr-filter-group {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0;
}

.ebcr-filter-group label {
	display: none !important;
}

.ebcr-filter-group select {
	display: inline-block !important;
	padding: 6px 28px 6px 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #3b82f6 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer;
	appearance: none !important;
	-webkit-appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 6px center !important;
	box-shadow: none !important;
	outline: none !important;
	height: auto !important;
}

.ebcr-filter-group select:focus {
	outline: none;
	box-shadow: none;
}

/* ──────────────────────────────────────────────────────── */

.ebcr-no-reviews {
	text-align: center;
	padding: 36px 20px;
	background: var(--ebcr-bg-card);
	border: 1px dashed var(--ebcr-border-color);
	border-radius: var(--ebcr-radius);
	color: var(--ebcr-text-secondary);
	margin: 20px 0;
}

.ebcr-no-reviews p {
	margin: 0 0 16px 0;
	font-size: 15px;
	font-weight: 500;
}

.ebcr-btn-reset-filter {
	background: #ffffff;
	color: #3b82f6;
	border: 2px solid #3b82f6;
	border-radius: 8px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--ebcr-transition);
}

.ebcr-btn-reset-filter:hover {
	background: #3b82f6;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Layouts: List, Grid, Masonry */
.ebcr-reviews-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ebcr-layout-grid .ebcr-reviews-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

.ebcr-layout-masonry .ebcr-reviews-container {
	columns: 3 280px;
	column-gap: 24px;
}

.ebcr-layout-masonry .ebcr-review-card {
	break-inside: avoid;
	margin-bottom: 24px;
}

/* ── Review Card ───────────────────────────────────────── */
.ebcr-review-card {
	background: var(--ebcr-bg-card);
	border: none;
	border-bottom: 1px solid var(--ebcr-border-color);
	border-radius: 0;
	padding: 20px 0;
	transition: var(--ebcr-transition);
}

.ebcr-review-card:first-child {
	padding-top: 4px;
}

.ebcr-review-card:hover {
	background: #fafbff;
}

.ebcr-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
	margin-top: 10px;
}

.ebcr-reviewer-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ebcr-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--ebcr-border-color);
	flex-shrink: 0;
}

/* Blue person icon for anonymous users */
.ebcr-avatar-icon {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ebcr-name {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #3b82f6;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.ebcr-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--ebcr-badge-bg);
	color: var(--ebcr-badge-color);
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 600;
}

.ebcr-sub-info {
	margin: 2px 0 0 0;
	font-size: 12px;
	color: var(--ebcr-text-secondary);
}

.ebcr-card-submeta {
	font-size: 12px;
	color: var(--ebcr-text-muted);
	display: flex;
	gap: 10px;
	margin-top: 2px;
}

.ebcr-stars-rating {
	color: var(--ebcr-star-color);
	font-size: 20px;
	letter-spacing: 2px;
	margin-bottom: 4px;
	display: block;
}

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

.ebcr-star.active {
	color: var(--ebcr-star-color);
}

.ebcr-review-title {
	margin: 8px 0 6px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--ebcr-text-primary);
}

.ebcr-content-text {
	font-size: 14px;
	line-height: 1.6;
	color: var(--ebcr-text-secondary);
	margin: 0;
}

.ebcr-product-tag {
	margin-top: 12px;
	font-size: 12px;
	color: var(--ebcr-text-muted);
	background: rgba(0, 0, 0, 0.02);
	padding: 6px 10px;
	border-radius: 6px;
}

.ebcr-admin-reply-box {
	margin-top: 14px;
	background: rgba(37, 99, 235, 0.04);
	border-left: 3px solid var(--ebcr-primary-color);
	padding: 12px;
	border-radius: 0 8px 8px 0;
}

.ebcr-reply-header {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	margin-bottom: 4px;
	color: var(--ebcr-text-primary);
}

.ebcr-reply-header small {
	color: var(--ebcr-text-muted);
}

.ebcr-admin-reply-box p {
	margin: 0;
	font-size: 13px;
	color: var(--ebcr-text-secondary);
}

.ebcr-card-footer {
	margin-top: 14px;
	display: flex;
	justify-content: flex-end;
}

.ebcr-btn-helpful {
	background: #ffffff !important;
	border: 1.5px solid #3b82f6 !important;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	color: #3b82f6 !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: var(--ebcr-transition);
}

.ebcr-btn-helpful:hover {
	background: #3b82f6 !important;
	color: #ffffff !important;
}

/* Pagination */
.ebcr-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin-top: 32px;
}

.ebcr-pagination button {
	padding: 8px 16px;
	border: 2px solid #3b82f6;
	border-radius: 8px;
	background: #ffffff;
	color: #3b82f6;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--ebcr-transition);
}

.ebcr-pagination button:hover:not(:disabled) {
	background: #3b82f6;
	color: #ffffff;
	border-color: #3b82f6;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.ebcr-pagination button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ebcr-page-info {
	font-size: 14px;
	color: var(--ebcr-text-secondary);
}

/* Frontend Form Card */
.ebcr-form-card-wrap {
	background: var(--ebcr-bg-card);
	border: 1px solid var(--ebcr-border-color);
	border-radius: var(--ebcr-radius);
	padding: 28px;
	box-shadow: var(--ebcr-shadow);
	margin-bottom: 32px;
}

.ebcr-form-heading {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 20px;
	color: var(--ebcr-text-primary);
}

.ebcr-field-group {
	margin-bottom: 18px;
}

.ebcr-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--ebcr-text-primary);
	margin-bottom: 6px;
}

.ebcr-input,
.ebcr-textarea,
.ebcr-file-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--ebcr-border-color);
	border-radius: 8px;
	background: var(--ebcr-bg-card);
	color: var(--ebcr-text-primary);
	font-size: 14px;
	box-sizing: border-box;
}

.ebcr-input:focus,
.ebcr-textarea:focus {
	outline: none;
	border-color: var(--ebcr-primary-color);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ebcr-form-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.ebcr-form-grid-2 {
		grid-template-columns: 1fr;
	}
}

.ebcr-star-picker {
	font-size: 28px;
	color: var(--ebcr-star-empty);
	cursor: pointer;
	display: inline-flex;
	gap: 4px;
}

.ebcr-star-choice {
	transition: transform 0.15s ease;
}

.ebcr-star-choice:hover,
.ebcr-star-choice.active {
	color: var(--ebcr-star-color);
}

.ebcr-btn-submit {
	background: #ffffff;
	color: #3b82f6 !important;
	border: 2px solid #3b82f6 !important;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--ebcr-transition);
	letter-spacing: 0.3px;
}

.ebcr-btn-submit:hover {
	background: #3b82f6 !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.ebcr-form-response-msg {
	padding: 12px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 14px;
}

.ebcr-form-response-msg.success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.ebcr-form-response-msg.error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Carousel */
.ebcr-carousel-wrap {
	position: relative;
	overflow: hidden;
}

.ebcr-carousel-track {
	display: flex;
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	gap: 20px;
	will-change: transform;
}

.ebcr-carousel-slide {
	flex: 0 0 calc(33.333% - 14px);
}

@media (max-width: 900px) {
	.ebcr-carousel-slide {
		flex: 0 0 calc(50% - 10px);
	}
}

@media (max-width: 600px) {
	.ebcr-carousel-slide {
		flex: 0 0 100%;
	}
}

.ebcr-carousel-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}

.ebcr-carousel-controls button {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #3b82f6;
	background: #ffffff;
	color: #3b82f6;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: var(--ebcr-transition);
}

.ebcr-carousel-controls button:hover {
	background: #3b82f6;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
	transform: scale(1.08);
}