/* Google Reviews widget. Defaults recreate Essential Addons' Business Reviews slider, preset 3. */
.ndet-gr {
	--ndet-gr-cols: 3;
	--ndet-gr-gap: 30px;
	--ndet-gr-avatar: 50px;
	--ndet-gr-star: #f5a623;
	--ndet-gr-star-empty: #d9d9d9;
	--ndet-gr-star-size: 15px;
	--ndet-gr-arrow: currentColor;
	--ndet-gr-arrow-size: 22px;
	--ndet-gr-dot: #9eaf43;
	--ndet-gr-dot-size: 10px;
	--ndet-gr-dot-space: 10px;
	position: relative;
	box-sizing: border-box;
}

.ndet-gr *,
.ndet-gr *::before,
.ndet-gr *::after {
	box-sizing: border-box;
}

/* Header */
.ndet-gr__header {
	margin-bottom: 24px;
	text-align: center;
}

.ndet-gr__logo {
	display: inline-block;
	width: 60px;
	height: auto;
	margin-bottom: 8px;
}

.ndet-gr__summary {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.ndet-gr__header .ndet-gr__stars {
	--ndet-gr-star-size: 24px;
}

.ndet-gr__count {
	color: inherit;
	text-decoration: none;
}

/* Stars: grey base with a coloured layer clipped to the rating. */
.ndet-gr__stars {
	position: relative;
	display: inline-block;
	line-height: 0;
	white-space: nowrap;
	vertical-align: middle;
}

.ndet-gr__stars svg {
	display: inline-block;
	width: var(--ndet-gr-star-size);
	height: var(--ndet-gr-star-size);
	margin-right: 2px;
}

.ndet-gr__stars-base svg {
	fill: var(--ndet-gr-star-empty);
}

.ndet-gr__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}

.ndet-gr__stars-fill svg {
	fill: var(--ndet-gr-star);
}

/* Review card */
.ndet-gr__card {
	margin: 5px;
	padding: 10px;
	border-radius: 10px;
	box-shadow: 0 0 5px rgba(19, 26, 64, .1);
}

.ndet-gr__card .ndet-gr__stars {
	display: block;
	margin-top: 20px;
	text-align: center;
}

/* Review text box. The wrapper holds the scroll hint over the bottom edge. */
.ndet-gr__text-wrap {
	position: relative;
	margin-top: 10px;
}

.ndet-gr__text {
	height: 225px;
	padding: 20px;
	overflow-y: auto;
	color: #000;
	text-align: left;
	overflow-wrap: break-word;
}

/* Reviewer, under the card */
.ndet-gr__reviewer {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 40px;
}

.ndet-gr__avatar {
	flex-shrink: 0;
	width: var(--ndet-gr-avatar);
	height: var(--ndet-gr-avatar);
	border-radius: 50%;
	object-fit: cover;
}

.ndet-gr__avatar--initial {
	display: grid;
	place-items: center;
	background: #6b7280;
	color: #fff;
	font-weight: 600;
	font-size: calc(var(--ndet-gr-avatar) * .45);
	line-height: 1;
}

.ndet-gr__meta {
	min-width: 0;
	text-align: left;
}

.ndet-gr__name {
	color: #292844;
	font-weight: 500;
}

.ndet-gr__name a {
	color: inherit;
	text-decoration: none;
}

.ndet-gr__time {
	color: #4a4b50;
}

/* Grid layout */
.ndet-gr__grid {
	display: grid;
	grid-template-columns: repeat(var(--ndet-gr-cols), minmax(0, 1fr));
	gap: var(--ndet-gr-gap);
}

/* Slider. Swiper core rules are repeated here so the layout holds even before Swiper's own CSS loads. */
.ndet-gr__viewport.swiper {
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.ndet-gr__track.swiper-wrapper {
	position: relative;
	display: flex;
	width: 100%;
	height: auto;
	z-index: 1;
	box-sizing: content-box;
	transition-property: transform;
}

.ndet-gr__item.swiper-slide {
	position: relative;
	flex-shrink: 0;
	width: calc((100% - (var(--ndet-gr-cols) - 1) * var(--ndet-gr-gap)) / var(--ndet-gr-cols));
	height: auto;
	margin-right: var(--ndet-gr-gap);
}

.ndet-gr__viewport.swiper-fade .swiper-slide {
	pointer-events: none;
	transition-property: opacity;
}

.ndet-gr__viewport.swiper-fade .swiper-slide-active {
	pointer-events: auto;
}

/* Navigation: arrows at the ends of the row, dots centred between them. */
.ndet-gr__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 32px;
}

.ndet-gr__dots {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ndet-gr-dot-space);
}

.ndet-gr__dots .swiper-pagination-bullet {
	display: inline-block;
	width: var(--ndet-gr-dot-size);
	height: var(--ndet-gr-dot-size);
	margin: 0 !important;
	border-radius: 50%;
	background: var(--ndet-gr-dot);
	opacity: .35;
	cursor: pointer;
	transition: opacity .2s;
}

.ndet-gr__dots .swiper-pagination-bullet-active {
	background: var(--ndet-gr-dot-active, var(--ndet-gr-dot));
	opacity: 1;
}

.ndet-gr .ndet-gr__arrow {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: calc(var(--ndet-gr-arrow-size) + 6px);
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ndet-gr-arrow);
	cursor: pointer;
	transition: color .2s, opacity .2s;
}

.ndet-gr .ndet-gr__arrow:hover,
.ndet-gr .ndet-gr__arrow:focus {
	background: none;
	color: var(--ndet-gr-arrow-hover, var(--ndet-gr-arrow));
}

.ndet-gr .ndet-gr__arrow svg {
	width: var(--ndet-gr-arrow-size);
	height: var(--ndet-gr-arrow-size);
}

.ndet-gr__arrow--prev svg {
	transform: scaleX(-1);
}

.ndet-gr__arrow.swiper-button-disabled {
	opacity: .35;
	cursor: default;
}

.ndet-gr__arrow.swiper-button-lock,
.ndet-gr__dots.swiper-pagination-lock {
	visibility: hidden;
}

/* Editor-only notice when reviews can't be shown. */
.ndet-gr-notice {
	padding: 16px 20px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.ndet-gr__track.swiper-wrapper {
		transition-duration: 0ms !important;
	}
}

/* Scroll hint: shown only when a review is longer than its box, hidden once the reader reaches the end. */
.ndet-gr__text:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.ndet-gr__text-wrap.has-hint.is-scrollable:not(.is-at-end) .ndet-gr__text {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
	mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
}

/* Small round arrow at the bottom centre of the box. Fully reset so theme styles can't reach it. */
.ndet-gr .ndet-gr__more {
	position: absolute;
	bottom: 6px;
	left: 50%;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 22px;
	min-width: 0;
	height: 22px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, .55);
	box-shadow: none;
	color: #fff;
	font-size: 0;
	line-height: 0;
	text-transform: none;
	cursor: pointer;
	transform: translateX(-50%);
	transition: opacity .2s;
}

.ndet-gr .ndet-gr__more:hover {
	opacity: .85;
}

.ndet-gr .ndet-gr__more svg {
	display: block;
	flex: none;
	width: 12px;
	height: 12px;
	margin: 1px 0 0;
	fill: none;
	stroke: currentColor;
	animation: ndet-gr-nudge 1.6s ease-in-out infinite;
}

.ndet-gr .ndet-gr__text-wrap.has-hint.is-scrollable:not(.is-at-end) .ndet-gr__more {
	display: flex;
}

@keyframes ndet-gr-nudge {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
	.ndet-gr .ndet-gr__more svg {
		animation: none;
	}
}

/*
 * Featured layout: a summary column beside one review at a time. The card drops under the summary
 * when it would be narrower than about half the widget. Every review is stacked in the same grid
 * cell, so the card keeps the tallest one's height and nothing below it jumps.
 */
.ndet-gr--featured {
	--ndet-gr-fx-gap: 48px;
	--ndet-gr-fx-side: 280px;
	--ndet-gr-fx-time: 8s;
	--ndet-gr-fx-quote: 40px;
	--ndet-gr-fx-big-star: 22px;
	--ndet-gr-fx-bar: 3px;
	--ndet-gr-fx-button: 40px;
	--ndet-gr-fx-line: rgba(0, 0, 0, .1);
	--ndet-gr-fx-track: rgba(0, 0, 0, .12);
	--ndet-gr-avatar: 44px;
	--ndet-gr-star-size: 14px;
}

/* The kit's Text font (Global Fonts), not the theme's, until the widget's own typography is set. */
.ndet-gr--featured {
	font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.ndet-gr__fx {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndet-gr-fx-gap);
}

.ndet-gr__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Summary column */
.ndet-gr__fx-summary {
	display: flex;
	flex: 1 1 var(--ndet-gr-fx-side);
	flex-direction: column;
	align-items: start;
	gap: 10px;
	min-width: 0;
}

.ndet-gr__fx-score {
	font-size: 64px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
}

.ndet-gr__fx-summary .ndet-gr__stars {
	--ndet-gr-star-size: var(--ndet-gr-fx-big-star);
}

.ndet-gr__fx-count {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	opacity: .8;
}

.ndet-gr__g {
	flex: none;
	width: 1.1em;
	height: 1.1em;
}

.ndet-gr .ndet-gr__fx-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding: 10px 18px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s;
}

.ndet-gr .ndet-gr__fx-link:hover {
	background-color: rgba(0, 0, 0, .05);
}

.ndet-gr .ndet-gr__fx-link svg {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform .2s;
}

.ndet-gr .ndet-gr__fx-link:hover svg {
	transform: translateX(3px);
}

/* The card */
.ndet-gr__fx-card {
	flex: 999 1 0;
	min-width: min(100%, 52%);
	padding: 40px;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(19, 26, 64, .06);
}

/* Segmented progress: one bar per review, the current one filling over the interval. */
.ndet-gr__fx-progress {
	display: flex;
	gap: 6px;
	margin: -8px 0 20px;
}

.ndet-gr .ndet-gr__fx-seg {
	flex: 1;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 8px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	cursor: pointer;
}

.ndet-gr .ndet-gr__fx-seg:hover,
.ndet-gr .ndet-gr__fx-seg:focus {
	outline: 0;
	background: none;
}

.ndet-gr__fx-seg span {
	display: block;
	height: var(--ndet-gr-fx-bar);
	overflow: hidden;
	border-radius: var(--ndet-gr-fx-bar);
	background: var(--ndet-gr-fx-track);
}

.ndet-gr__fx-seg i {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--ndet-gr-fx-fill, var(--ndet-gr-star));
}

.ndet-gr__fx-seg.is-done i,
.ndet-gr__fx-seg.is-active i {
	width: 100%;
}

.ndet-gr--featured.is-playing .ndet-gr__fx-seg.is-active i {
	width: 0;
	animation: ndet-gr-fx-fill var(--ndet-gr-fx-time) linear forwards;
}

.ndet-gr--featured.is-paused .ndet-gr__fx-seg.is-active i {
	animation-play-state: paused;
}

@keyframes ndet-gr-fx-fill {
	from { width: 0; }
	to { width: 100%; }
}

/* Slides: stacked in one cell; the current one fades up. */
.ndet-gr__fx-slides,
.ndet-gr__fx-people {
	display: grid;
}

.ndet-gr__fx-slide,
.ndet-gr__fx-who {
	grid-area: 1 / 1;
	min-width: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}

.ndet-gr__fx-slide {
	transform: translateY(10px);
}

.ndet-gr__fx-slide.is-active,
.ndet-gr__fx-who.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.ndet-gr__fx-quote {
	display: block;
	width: var(--ndet-gr-fx-quote);
	height: auto;
	margin-bottom: 16px;
	color: var(--ndet-gr-star);
}

.ndet-gr .ndet-gr__fx-text {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: clamp(18px, 1rem + .5vw, 22px);
	font-style: normal;
	line-height: 1.6;
	overflow-wrap: break-word;
}

/* Footer: the reviewer on the left, counter and buttons on the right. */
.ndet-gr__fx-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--ndet-gr-fx-line);
}

.ndet-gr__fx-people {
	flex: 1 1 240px;
	min-width: 0;
}

.ndet-gr__fx-who {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ndet-gr__fx-person {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ndet-gr__fx-who .ndet-gr__name {
	font-weight: 600;
	line-height: 1.3;
}

.ndet-gr__fx-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.ndet-gr__fx-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 1.3;
	opacity: .75;
}

.ndet-gr__fx-nav {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.ndet-gr__fx-counter {
	margin-right: 6px;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	opacity: .75;
}

/* Round buttons, fully reset so theme and kit button styles can't reach them. */
.ndet-gr .ndet-gr__fx-button {
	display: grid;
	place-items: center;
	flex: none;
	width: var(--ndet-gr-fx-button);
	min-width: 0;
	height: var(--ndet-gr-fx-button);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ndet-gr-fx-line);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.ndet-gr .ndet-gr__fx-button:hover {
	border-color: currentColor;
	background: transparent;
	color: inherit;
}

.ndet-gr .ndet-gr__fx-button:focus {
	background: transparent;
	color: inherit;
}

.ndet-gr .ndet-gr__fx-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ndet-gr .ndet-gr__fx-button svg {
	width: 45%;
	height: 45%;
}

.ndet-gr .ndet-gr__fx-prev svg {
	transform: scaleX(-1);
}

.ndet-gr__fx-pause .ndet-gr__fx-icon-play,
.ndet-gr__fx-pause[aria-pressed="true"] .ndet-gr__fx-icon-pause {
	display: none;
}

.ndet-gr__fx-pause[aria-pressed="true"] .ndet-gr__fx-icon-play {
	display: block;
}

/* Until the widget's own CSS sets it, the summary goes above the card on tablets and phones. */
@media (max-width: 1024px) {
	.ndet-gr__fx-summary {
		flex-basis: 100%;
	}
}

@media (max-width: 767px) {
	.ndet-gr--featured {
		--ndet-gr-fx-gap: 28px;
	}

	.ndet-gr__fx-card {
		padding: 24px;
	}

	.ndet-gr__fx-score {
		font-size: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ndet-gr__fx-slide,
	.ndet-gr__fx-who {
		transform: none;
		transition: none;
	}
}

.ndet-gr .ndet-gr__fx-text:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}
