.mbos-customer-reviews {
	--mbos-customer-reviews-brand: #1d4f91;

	box-sizing: border-box;
	color: #172033;
	font-family: inherit;
	letter-spacing: 0;
	margin: 28px 0;
	width: 100%;
}

.mbos-customer-reviews *,
.mbos-customer-reviews *::before,
.mbos-customer-reviews *::after {
	box-sizing: border-box;
}

.mbos-customer-reviews__header {
	align-items: flex-end;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.mbos-customer-reviews__header h2 {
	font-size: clamp(1.45rem, 1.2rem + 0.6vw, 2rem);
	line-height: 1.15;
	margin: 0;
}

.mbos-customer-reviews__summary {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.mbos-customer-reviews__header .mbos-customer-reviews__summary {
	justify-content: flex-end;
	margin-bottom: 0;
}

.mbos-customer-reviews__summary-pill {
	align-items: center;
	background: #ffffff;
	border: 1px solid color-mix(in srgb, var(--mbos-customer-reviews-brand) 18%, rgba(15, 23, 42, 0.14));
	border-radius: 999px;
	color: #172033;
	display: inline-flex;
	gap: 8px;
	min-height: 34px;
	padding: 6px 12px;
	text-decoration: none;
}

.mbos-customer-reviews__summary-pill span {
	color: var(--mbos-customer-reviews-brand);
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
}

.mbos-customer-reviews__summary-pill strong {
	font-size: 0.9rem;
	font-weight: 800;
}

a.mbos-customer-reviews__summary-pill:hover {
	border-color: var(--mbos-customer-reviews-brand);
	color: var(--mbos-customer-reviews-brand);
}

.mbos-customer-reviews__grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.mbos-customer-reviews__list {
	display: grid;
	gap: 12px;
}

.mbos-customer-reviews__carousel {
	position: relative;
}

.mbos-customer-reviews__viewport {
	overflow: hidden;
	width: 100%;
}

.mbos-customer-reviews__track {
	display: flex;
	transform: translateX(0);
	transition: transform 220ms ease;
	will-change: transform;
}

.mbos-customer-reviews__slide {
	flex: 0 0 100%;
	min-width: 100%;
	padding: 1px;
}

.mbos-customer-reviews__card {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 8px;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 100%;
	padding: 18px;
}

.mbos-customer-reviews--simple .mbos-customer-reviews__card {
	box-shadow: none;
	padding: 14px 0;
}

.mbos-customer-reviews--simple .mbos-customer-reviews__card + .mbos-customer-reviews__card {
	border-top: 0;
}

.mbos-customer-reviews__card-top {
	align-items: center;
	display: grid;
	gap: 10px;
	grid-template-columns: auto minmax(0, 1fr) auto;
}

.mbos-customer-reviews__avatar {
	border-radius: 999px;
	display: block;
	height: 42px;
	object-fit: cover;
	width: 42px;
}

.mbos-customer-reviews__avatar-wrap {
	align-items: center;
	background: var(--mbos-customer-reviews-brand);
	border-radius: 999px;
	display: inline-flex;
	flex: 0 0 42px;
	height: 42px;
	justify-content: center;
	overflow: hidden;
	position: relative;
	width: 42px;
}

.mbos-customer-reviews__avatar-wrap.has-avatar-image .mbos-customer-reviews__avatar {
	inset: 0;
	position: absolute;
	z-index: 2;
}

.mbos-customer-reviews__avatar-fallback {
	align-items: center;
	background: var(--mbos-customer-reviews-brand);
	color: #ffffff;
	display: flex;
	font-size: 1rem;
	font-weight: 900;
	height: 100%;
	justify-content: center;
	line-height: 1;
	text-transform: uppercase;
	width: 100%;
}

.mbos-customer-reviews__avatar-wrap.has-avatar-image .mbos-customer-reviews__avatar-fallback {
	opacity: 0;
}

.mbos-customer-reviews__avatar-wrap.is-avatar-fallback-only .mbos-customer-reviews__avatar-fallback,
.mbos-customer-reviews__avatar-wrap.is-avatar-failed .mbos-customer-reviews__avatar-fallback {
	opacity: 1;
}

.mbos-customer-reviews__avatar-wrap.is-avatar-failed .mbos-customer-reviews__avatar {
	display: none;
}

.mbos-customer-reviews__author {
	min-width: 0;
}

.mbos-customer-reviews__author strong,
.mbos-customer-reviews__author a {
	color: #172033;
	display: block;
	font-size: 0.98rem;
	font-weight: 850;
	line-height: 1.2;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.mbos-customer-reviews__author a:hover {
	color: var(--mbos-customer-reviews-brand);
}

.mbos-customer-reviews__author span {
	color: #64748b;
	display: block;
	font-size: 0.86rem;
	line-height: 1.35;
	margin-top: 2px;
}

.mbos-customer-reviews__source {
	align-self: start;
	background: color-mix(in srgb, var(--mbos-customer-reviews-brand) 10%, #ffffff);
	border: 1px solid color-mix(in srgb, var(--mbos-customer-reviews-brand) 22%, #ffffff);
	border-radius: 999px;
	color: var(--mbos-customer-reviews-brand);
	font-size: 0.78rem;
	font-weight: 850;
	line-height: 1;
	padding: 6px 9px;
	white-space: nowrap;
}

.mbos-customer-reviews__stars {
	color: #d98d00;
	display: flex;
	font-size: 1rem;
	gap: 2px;
	line-height: 1;
}

.mbos-customer-reviews__stars .is-empty {
	color: #cbd5e1;
}

.mbos-customer-reviews__text {
	color: #334155;
	font-size: 0.98rem;
	line-height: 1.58;
	margin: 0;
}

.mbos-customer-reviews__review-link {
	align-self: flex-start;
	color: var(--mbos-customer-reviews-brand);
	font-size: 0.9rem;
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mbos-customer-reviews__controls {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 14px;
}

.mbos-customer-reviews__control,
.mbos-customer-reviews__dot {
	appearance: none;
	cursor: pointer;
	font: inherit;
}

.mbos-customer-reviews__control {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 1.4rem;
	font-weight: 800;
	height: 38px;
	justify-content: center;
	line-height: 1;
	width: 38px;
}

.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__control,
.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__dot {
	background: #ffffff;
	border: 1px solid color-mix(in srgb, var(--mbos-customer-reviews-brand) 26%, rgba(15, 23, 42, 0.18));
	color: var(--mbos-customer-reviews-brand);
}

.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__control:hover,
.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__dot:hover,
.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__dot.is-active,
.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__dot[aria-current="true"] {
	background: var(--mbos-customer-reviews-brand);
	border-color: var(--mbos-customer-reviews-brand);
	color: #ffffff;
}

.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__control.wp-element-button {
	min-height: 38px;
	min-width: 38px;
	padding: 0;
}

.mbos-customer-reviews__dots {
	align-items: center;
	display: flex;
	gap: 6px;
}

.mbos-customer-reviews__dot {
	border-radius: 999px;
	height: 10px;
	min-height: 10px;
	min-width: 10px;
	padding: 0;
	width: 10px;
}

.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__dot.wp-element-button {
	border-radius: 999px !important;
	display: inline-block;
	flex: 0 0 10px;
	font-size: 0;
	height: 10px !important;
	line-height: 0;
	min-height: 10px !important;
	min-width: 10px !important;
	overflow: hidden;
	padding: 0 !important;
	width: 10px !important;
}

.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__dot.wp-element-button:not(.is-active):not([aria-current="true"]) {
	opacity: 0.45;
}

.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__dot.wp-element-button:hover {
	opacity: 0.75;
}

.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__dot.wp-element-button.is-active,
.mbos-customer-reviews.mbos-theme-button-sync-enabled .mbos-customer-reviews__dot.wp-element-button[aria-current="true"] {
	opacity: 1;
}

.mbos-customer-reviews__empty {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 8px;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
	padding: 22px;
}

.mbos-customer-reviews__empty h3 {
	font-size: 1.25rem;
	line-height: 1.2;
	margin: 0 0 8px;
}

.mbos-customer-reviews__empty p {
	color: #475569;
	font-size: 0.98rem;
	line-height: 1.5;
	margin: 0;
}

.mbos-customer-reviews__empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__cta {
	background: var(--mbos-customer-reviews-brand);
	border: 1px solid var(--mbos-customer-reviews-brand);
	border-radius: 6px;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
	color: #ffffff;
	display: inline-flex;
	font-weight: 850;
	line-height: 1.1;
	padding: 11px 14px;
	text-decoration: none;
}

.mbos-customer-reviews:not(.mbos-theme-button-sync-enabled) .mbos-customer-reviews__cta:hover {
	filter: brightness(0.94);
}

.mbos-customer-reviews__debug {
	background: #f8fafc;
	border: 1px dashed rgba(15, 23, 42, 0.2);
	border-radius: 8px;
	color: #334155;
	font-size: 0.88rem;
	margin-top: 16px;
	padding: 12px;
}

.mbos-customer-reviews__debug summary {
	cursor: pointer;
	font-weight: 850;
}

.mbos-customer-reviews__debug ul {
	margin: 10px 0 0 18px;
	padding: 0;
}

.mbos-customer-reviews__summary-pill:focus-visible,
.mbos-customer-reviews__author a:focus-visible,
.mbos-customer-reviews__review-link:focus-visible,
.mbos-customer-reviews__control:focus-visible,
.mbos-customer-reviews__dot:focus-visible,
.mbos-customer-reviews__cta:focus-visible {
	outline: 2px solid var(--mbos-customer-reviews-brand);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.mbos-customer-reviews__track {
		transition: none;
	}
}

@media (max-width: 720px) {
	.mbos-customer-reviews__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.mbos-customer-reviews__header .mbos-customer-reviews__summary {
		justify-content: flex-start;
	}

	.mbos-customer-reviews__card {
		padding: 15px;
	}

	.mbos-customer-reviews__card-top {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.mbos-customer-reviews__source {
		justify-self: start;
	}

	.mbos-customer-reviews__empty-actions,
	.mbos-customer-reviews__empty-actions a {
		width: 100%;
	}

	.mbos-customer-reviews__empty-actions a {
		justify-content: center;
	}
}

/* Frontend wrapper transparency polish */
.mbos-customer-reviews,
.mbos-customer-reviews__carousel,
.mbos-customer-reviews__viewport {
	background: transparent;
	border: 0;
	box-shadow: none;
}
