/* GBP Reviews frontend */

.gbpr-badge-wrap,
.gbpr-reviews {
	--gbpr-star: #f5a623;
	--gbpr-star-empty: #dadce0;
	--gbpr-star-size: 18px;
	--gbpr-star-gap: 2px;
	--gbpr-heading: #202124;
	--gbpr-text: #3c4043;
	--gbpr-muted: #70757a;
	--gbpr-rating: #e8710a;
	--gbpr-accent: #1a73e8;
	--gbpr-btn-bg: #1a5fd0;
	--gbpr-btn-color: #fff;
	--gbpr-badge-bg: transparent;
	--gbpr-card-bg: #fff;
	--gbpr-card-border: #e8eaed;
	--gbpr-radius: 12px;
	--gbpr-gap: 24px;
	--gbpr-avatar: 44px;
	--gbpr-logo-size: 56px;
	--gbpr-nav-size: 40px;
	--gbpr-nav-offset: -20px;
	--gbpr-dot-size: 8px;
	box-sizing: border-box;
}

.gbpr-badge-wrap *,
.gbpr-reviews *,
.gbpr-badge-wrap *::before,
.gbpr-reviews *::before,
.gbpr-badge-wrap *::after,
.gbpr-reviews *::after {
	box-sizing: inherit;
}

.gbpr-reviews [hidden],
.gbpr-dialog [hidden] {
	display: none !important;
}

.gbpr-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gbpr-notice {
	padding: 12px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	color: #50575e;
	font-size: 14px;
}

/* Stars ------------------------------------------------------------------- */

.gbpr-stars {
	display: inline-flex;
	gap: var(--gbpr-star-gap);
	vertical-align: middle;
	line-height: 1;
}

.gbpr-star {
	position: relative;
	display: inline-block;
	width: var(--gbpr-star-size);
	height: var(--gbpr-star-size);
	flex: 0 0 auto;
}

.gbpr-star svg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.gbpr-star__empty {
	fill: var(--gbpr-star-empty);
}

.gbpr-star__fill {
	fill: var(--gbpr-star);
	clip-path: inset(0 calc(100% - var(--gbpr-fill, 100%)) 0 0);
}

[dir="rtl"] .gbpr-star__fill {
	clip-path: inset(0 0 0 calc(100% - var(--gbpr-fill, 100%)));
}

.gbpr-google-icon {
	display: block;
	width: 100%;
	height: 100%;
}

/* Badge ------------------------------------------------------------------- */

.gbpr-badge-wrap {
	--gbpr-star-size: 22px;
}

.gbpr-align-left {
	text-align: left;
}

.gbpr-align-center {
	text-align: center;
}

.gbpr-align-right {
	text-align: right;
}

[dir="rtl"] .gbpr-align-left {
	text-align: right;
}

[dir="rtl"] .gbpr-align-right {
	text-align: left;
}

.gbpr-badge {
	display: inline-flex;
	align-items: flex-start;
	gap: 16px;
	max-width: 100%;
	text-align: start;
	background: var(--gbpr-badge-bg);
	color: var(--gbpr-text);
	font-size: 15px;
	line-height: 1.4;
}

.gbpr-badge__logo {
	flex: 0 0 var(--gbpr-logo-size);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--gbpr-logo-size);
	height: var(--gbpr-logo-size);
	overflow: hidden;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(60, 64, 67, 0.2);
}

.gbpr-badge__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gbpr-badge__logo-icon {
	width: 58%;
	height: 58%;
	color: var(--gbpr-accent);
}

.gbpr-badge__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.gbpr-badge__name {
	margin: 0 0 2px;
	color: var(--gbpr-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.gbpr-badge__name a {
	color: inherit;
	text-decoration: none;
}

.gbpr-badge__name a:hover,
.gbpr-badge__name a:focus-visible {
	text-decoration: underline;
}

.gbpr-badge__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.gbpr-badge__score {
	color: var(--gbpr-rating);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.gbpr-badge__count,
.gbpr-badge__powered {
	color: var(--gbpr-text);
	margin-bottom: 4px;
}

.gbpr-google-word {
	font-weight: 600;
	letter-spacing: -0.2px;
}

.gbpr-google-word span:nth-child(1),
.gbpr-google-word span:nth-child(4) {
	color: #4285f4;
}

.gbpr-google-word span:nth-child(2),
.gbpr-google-word span:nth-child(6) {
	color: #ea4335;
}

.gbpr-google-word span:nth-child(3) {
	color: #fbbc05;
}

.gbpr-google-word span:nth-child(5) {
	color: #34a853;
}

.gbpr-badge__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 6px 8px 6px 16px;
	border: 0 solid transparent;
	border-radius: 999px;
	background-color: var(--gbpr-btn-bg);
	color: var(--gbpr-btn-color);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.gbpr-badge__button:hover,
.gbpr-badge__button:focus-visible {
	background-color: #174ea6;
	color: var(--gbpr-btn-color);
	text-decoration: none;
}

.gbpr-badge__button:focus-visible {
	outline: 2px solid var(--gbpr-accent);
	outline-offset: 2px;
}

.gbpr-badge__button-icon {
	display: inline-flex;
	width: 22px;
	height: 22px;
	padding: 3px;
	border-radius: 50%;
	background: #fff;
}

.gbpr-badge--vertical {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.gbpr-badge--vertical .gbpr-badge__content {
	align-items: center;
}

.gbpr-badge--inline {
	align-items: center;
}

.gbpr-badge--inline .gbpr-badge__content {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 12px;
	row-gap: 4px;
}

.gbpr-badge--inline .gbpr-badge__name,
.gbpr-badge--inline .gbpr-badge__rating,
.gbpr-badge--inline .gbpr-badge__count,
.gbpr-badge--inline .gbpr-badge__powered,
.gbpr-badge--inline .gbpr-badge__button {
	margin: 0;
}

/* Reviews: shared ---------------------------------------------------------- */

.gbpr-reviews {
	--gbpr-cols: var(--gbpr-cols-d, 3);
	--gbpr-slides: var(--gbpr-slides-d, 3);
	position: relative;
	color: var(--gbpr-text);
}

@media (max-width: 1024px) {
	.gbpr-reviews {
		--gbpr-cols: var(--gbpr-cols-t, 2);
		--gbpr-slides: var(--gbpr-slides-t, 2);
	}
}

@media (max-width: 767px) {
	.gbpr-reviews {
		--gbpr-cols: var(--gbpr-cols-m, 1);
		--gbpr-slides: var(--gbpr-slides-m, 1);
		--gbpr-nav-offset: 4px;
	}
}

.gbpr-reviews__summary {
	margin-bottom: var(--gbpr-gap);
}

.gbpr-empty {
	color: var(--gbpr-muted);
}

.gbpr-layout-grid .gbpr-items {
	display: grid;
	grid-template-columns: repeat(var(--gbpr-cols), minmax(0, 1fr));
	gap: var(--gbpr-gap);
}

.gbpr-layout-masonry .gbpr-items {
	column-count: var(--gbpr-cols);
	column-gap: var(--gbpr-gap);
}

.gbpr-layout-masonry .gbpr-review {
	display: inline-flex;
	width: 100%;
	margin-bottom: var(--gbpr-gap);
	break-inside: avoid;
}

.gbpr-reviews.is-loading .gbpr-items {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s;
}

/* Review card -------------------------------------------------------------- */

.gbpr-review {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 20px;
	border: 1px solid var(--gbpr-card-border);
	border-radius: var(--gbpr-radius);
	background-color: var(--gbpr-card-bg);
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
	color: var(--gbpr-text);
	font-size: 15px;
	line-height: 1.6;
	transition: box-shadow 0.2s, transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.gbpr-review:focus {
	outline: 2px solid var(--gbpr-accent);
	outline-offset: 2px;
}

.gbpr-review__header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gbpr-review__avatar {
	flex: 0 0 var(--gbpr-avatar);
	width: var(--gbpr-avatar);
	height: var(--gbpr-avatar);
	border-radius: 50%;
	object-fit: cover;
}

.gbpr-review__avatar--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: hsl(var(--gbpr-hue, 210), 45%, 46%);
	color: #fff;
	font-size: calc(var(--gbpr-avatar) * 0.38);
	font-weight: 600;
	line-height: 1;
}

.gbpr-review__meta {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.gbpr-review__name {
	overflow: hidden;
	color: var(--gbpr-heading);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

a.gbpr-review__name:hover,
a.gbpr-review__name:focus-visible {
	text-decoration: underline;
}

.gbpr-review__date {
	color: var(--gbpr-muted);
	font-size: 13px;
	line-height: 1.4;
}

.gbpr-review__source {
	display: inline-flex;
	flex: 0 0 auto;
	align-self: flex-start;
}

.gbpr-review__source svg {
	width: 20px;
	height: 20px;
}

.gbpr-review__text {
	width: 100%;
	margin: 0;
	overflow-wrap: anywhere;
}

.gbpr-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--gbpr-lines, 4);
	line-clamp: var(--gbpr-lines, 4);
	overflow: hidden;
}

.gbpr-review.is-expanded .gbpr-clamp {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: none;
	overflow: visible;
}

.gbpr-review__more {
	display: inline-block;
	margin-top: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gbpr-accent);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.gbpr-review__more:hover,
.gbpr-review__more:focus-visible {
	background: none;
	text-decoration: underline;
}

.gbpr-review__more[hidden] {
	display: none;
}

.gbpr-highlight {
	padding: 0 2px;
	border-radius: 3px;
	background-color: #fef3c7;
	color: inherit;
}

.gbpr-review__reply {
	margin-top: auto;
	padding: 10px 14px;
	border-inline-start: 3px solid var(--gbpr-accent);
	border-radius: 6px;
	background-color: #f8f9fa;
	font-size: 14px;
}

.gbpr-review__reply-label {
	margin-bottom: 2px;
	color: var(--gbpr-heading);
	font-weight: 600;
}

/* Source labels for reviews from other sites ------------------------------- */

.gbpr-review__source--label {
	align-self: flex-start;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f1f3f4;
	color: #5f6368;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.gbpr-source-facebook {
	background: #e7f0fd;
	color: #1877f2;
}

.gbpr-source-yelp {
	background: #fdecea;
	color: #c41200;
}

.gbpr-source-healthgrades {
	background: #e6f4f1;
	color: #00695c;
}

.gbpr-source-trustpilot {
	background: #e6f7ef;
	color: #00866a;
}

.gbpr-source-realself {
	background: #fdeef3;
	color: #b4245d;
}

/* Pagination --------------------------------------------------------------- */

.gbpr-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 28px;
}

.gbpr-page,
.gbpr-load-more {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--gbpr-card-border);
	border-radius: 8px;
	background-color: var(--gbpr-card-bg);
	color: var(--gbpr-heading);
	font: inherit;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.gbpr-page:hover,
.gbpr-page[aria-current="page"],
.gbpr-load-more:hover,
.gbpr-load-more:focus-visible {
	border-color: var(--gbpr-accent);
	background-color: var(--gbpr-accent);
	color: #fff;
}

.gbpr-page:disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.gbpr-page-gap {
	padding: 0 4px;
	color: var(--gbpr-muted);
}

.gbpr-load-more-wrap {
	margin-top: 28px;
	text-align: center;
}

.gbpr-load-more {
	padding: 0 24px;
	height: 44px;
}

.gbpr-page:focus-visible,
.gbpr-load-more:focus-visible,
.gbpr-nav:focus-visible,
.gbpr-dot:focus-visible,
.gbpr-autoplay-toggle:focus-visible,
.gbpr-track:focus-visible {
	outline: 2px solid var(--gbpr-accent);
	outline-offset: 2px;
}

/* Carousel ----------------------------------------------------------------- */

.gbpr-carousel {
	position: relative;
}

.gbpr-track {
	position: relative;
	display: flex;
	gap: var(--gbpr-gap);
	padding: 4px 0 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gbpr-track::-webkit-scrollbar {
	display: none;
}

.gbpr-slide {
	display: flex;
	flex: 0 0 calc((100% - (var(--gbpr-slides) - 1) * var(--gbpr-gap)) / var(--gbpr-slides));
	min-width: 0;
	scroll-snap-align: start;
}

.gbpr-slide > .gbpr-review {
	width: 100%;
}

.gbpr-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--gbpr-nav-size);
	height: var(--gbpr-nav-size);
	padding: 0;
	border: 1px solid var(--gbpr-card-border);
	border-radius: 50%;
	background-color: #fff;
	color: var(--gbpr-heading);
	box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, opacity 0.2s;
	z-index: 2;
}

.gbpr-nav svg {
	width: 50%;
	height: 50%;
}

.gbpr-nav--next svg,
[dir="rtl"] .gbpr-nav--prev svg {
	transform: scaleX(-1);
}

[dir="rtl"] .gbpr-nav--next svg {
	transform: none;
}

.gbpr-nav:hover,
.gbpr-nav:focus-visible {
	background-color: var(--gbpr-accent);
	color: #fff;
}

.gbpr-nav:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.gbpr-nav-sides .gbpr-nav {
	position: absolute;
	top: calc(50% - 16px);
	transform: translateY(-50%);
}

.gbpr-nav-sides .gbpr-nav--prev {
	inset-inline-start: var(--gbpr-nav-offset);
}

.gbpr-nav-sides .gbpr-nav--next {
	inset-inline-end: var(--gbpr-nav-offset);
}

.gbpr-nav-bottom .gbpr-carousel {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas:
		"track track track"
		"prev footer next";
	align-items: center;
	column-gap: 12px;
}

.gbpr-nav-bottom .gbpr-track {
	grid-area: track;
	min-width: 0;
}

.gbpr-nav-bottom .gbpr-nav--prev {
	grid-area: prev;
}

.gbpr-nav-bottom .gbpr-nav--next {
	grid-area: next;
}

.gbpr-nav-bottom .gbpr-carousel__footer {
	grid-area: footer;
}

.gbpr-carousel__footer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	min-height: 32px;
	margin-top: 8px;
}

.gbpr-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.gbpr-dot {
	width: calc(var(--gbpr-dot-size) + 12px);
	height: calc(var(--gbpr-dot-size) + 12px);
	padding: 6px;
	border: 0;
	border-radius: 50%;
	background-color: var(--gbpr-star-empty);
	background-clip: content-box;
	cursor: pointer;
	transition: background-color 0.2s;
}

.gbpr-dot:hover,
.gbpr-dot[aria-current="true"] {
	background-color: var(--gbpr-accent);
}

.gbpr-autoplay-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--gbpr-card-border);
	border-radius: 50%;
	background: #fff;
	color: var(--gbpr-muted);
	cursor: pointer;
}

.gbpr-autoplay-toggle svg {
	width: 14px;
	height: 14px;
}

.gbpr-autoplay-toggle .gbpr-icon-play,
.gbpr-autoplay-toggle[aria-pressed="true"] .gbpr-icon-pause {
	display: none;
}

.gbpr-autoplay-toggle[aria-pressed="true"] .gbpr-icon-play {
	display: block;
}

/* Popup -------------------------------------------------------------------- */

.gbpr-dialog {
	width: min(640px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: transparent;
	overflow: visible;
}

.gbpr-dialog::backdrop {
	background: rgba(32, 33, 36, 0.6);
}

.gbpr-dialog__inner {
	max-height: calc(100vh - 48px);
	overflow: auto;
	border-radius: 16px;
}

.gbpr-dialog .gbpr-review {
	border: 0;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	transform: none;
}

.gbpr-dialog__close {
	position: absolute;
	top: -14px;
	inset-inline-end: -14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #202124;
	font-size: 22px;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

@media (max-width: 767px) {
	.gbpr-dialog__close {
		top: 8px;
		inset-inline-end: 8px;
	}
}

/* Review request kit ----------------------------------------------------- */

.gbpr-review-kit {
	--gbpr-btn-bg: #1a5fd0;
	--gbpr-btn-color: #fff;
}

.gbpr-review-kit > * + * {
	margin-top: 16px;
}

.gbpr-review-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	border: 2px solid var(--gbpr-btn-bg);
	border-radius: 999px;
	background-color: var(--gbpr-btn-bg);
	color: var(--gbpr-btn-color);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.gbpr-review-button:hover,
.gbpr-review-button:focus-visible {
	background-color: #174ea6;
	border-color: #174ea6;
	color: #fff;
	text-decoration: none;
}

.gbpr-review-button:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: 3px;
}

.gbpr-review-button--outline {
	background-color: transparent;
	color: var(--gbpr-btn-bg);
}

.gbpr-review-button__icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	padding: 3px;
	border-radius: 50%;
	background: #fff;
}

.gbpr-qr {
	display: inline-block;
	width: var(--gbpr-qr-size, 180px);
	max-width: 100%;
	margin: 0;
	vertical-align: top;
	text-align: center;
}

.gbpr-qr__code,
.gbpr-qr__link {
	display: block;
}

.gbpr-qr__code svg {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.gbpr-qr__code:empty {
	aspect-ratio: 1;
	border-radius: 8px;
	background: #f1f3f4;
}

.gbpr-qr__caption {
	margin-top: 8px;
	color: #3c4043;
	font-size: 14px;
	line-height: 1.4;
}

/* Motion ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.gbpr-track {
		scroll-behavior: auto;
	}

	.gbpr-review,
	.gbpr-nav,
	.gbpr-dot,
	.gbpr-badge__button {
		transition: none;
	}

	.gbpr-review:hover {
		transform: none !important;
	}
}
