.ti-widget.lgr-widget {
	--lgr-star-color: #fbbc04;
	--lgr-star-empty: #dcdcdc;
	--lgr-text: #3c4043;
	--lgr-muted: #70757a;
	--lgr-border: #e0e0e0;
	--lgr-bg: #ffffff;
	max-width: 100%;
	font-family: inherit;
	color: var(--lgr-text);
	box-sizing: border-box;
}

.ti-widget.lgr-widget * {
	box-sizing: border-box;
}

.lgr-widget.lgr-empty {
	padding: 1em;
	border: 1px dashed var(--lgr-border);
	border-radius: 6px;
	color: var(--lgr-muted);
	font-size: 0.9em;
}

/* Top row: business name/stars on the left, review slider on the right */
.lgr-top-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.5em;
	margin-bottom: 1em;
}

.lgr-header-col {
	flex: 0 0 220px;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.lgr-reviews-wrap {
	flex: 1 1 320px;
	min-width: 0;
}

/* .lgr-header-main renders as a link to the Google Maps place page when a
   Place ID is configured (see LGR_Render) - strip default link styling. */
a.lgr-header-main {
	display: block;
	text-decoration: none;
	color: inherit;
}

a.lgr-header-main:hover .lgr-name {
	text-decoration: underline;
}

.lgr-name {
	color: #252525;
	font-weight: 600;
	font-size: 1.05em;
	margin-bottom: 0.15em;
}

.lgr-rating-text {
	color: #252525;
	font-size: 0.9em;
	margin-top: 0.2em;
}

/* "Eine Bewertung schreiben" reuses the site's own .nectar-button styling
   and hover effect (theme stylesheet). Spacing above it comes from the
   .lgr-header-col flex gap, not a margin here. Padding is pinned explicitly
   to match the theme's .nectar-button.small rule (8px 14px), in case this
   widget renders somewhere the theme's own dynamic CSS specificity doesn't
   win the cascade (e.g. inside a builder row with its own button resets). */
.lgr-footer-actions .nectar-button {
	padding: 8px 14px;
}

.lgr-social-links {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

/* On narrow screens (see lgr-frontend.js) the icons get moved to the end of
   .lgr-reviews-wrap, which - unlike .lgr-header-col - has no flex gap of
   its own to space them from the review slider above. */
.lgr-reviews-wrap .lgr-social-links {
	margin-top: 0.75em;
}

/* Only center them (instead of left-aligned) below 640px. */
@media (max-width: 640px) {
	.lgr-reviews-wrap .lgr-social-links {
		width: 100%;
		justify-content: center;
	}
}

.lgr-social-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	color: #252525;
	font-size: 50px;
	line-height: 1;
	transition: color 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}

.lgr-social-links a:hover {
	color: #8f0000;
}

/* Stars */
.lgr-stars {
	display: inline-flex;
	gap: 2px;
	vertical-align: middle;
}

.lgr-star {
	width: 16px;
	height: 16px;
	display: inline-block;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.lgr-star-full,
.lgr-star-half {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fbbc04' d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

.lgr-star-half {
	background-image: linear-gradient(90deg, #fbbc04 50%, transparent 50%);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	background-color: transparent;
}

.lgr-star-empty {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dcdcdc' d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

/*
 * Stars fade in one by one when the widget scrolls into view. Hidden state
 * only applies once JS has actually added .lgr-js-anim (see lgr-frontend.js)
 * so stars stay visible for no-JS visitors or if the script fails to load.
 */
.lgr-widget.lgr-js-anim .lgr-star {
	opacity: 0;
	transform: scale(0.4);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.lgr-widget.lgr-js-anim.lgr-in-view .lgr-star {
	opacity: 1;
	transform: scale(1);
}

.lgr-star:nth-child(1) { transition-delay: 0ms; }
.lgr-star:nth-child(2) { transition-delay: 90ms; }
.lgr-star:nth-child(3) { transition-delay: 180ms; }
.lgr-star:nth-child(4) { transition-delay: 270ms; }
.lgr-star:nth-child(5) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
	.lgr-widget.lgr-js-anim .lgr-star {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Review slider: one card fills the view, the next peeks in at the edge */
.lgr-controls {
	display: flex;
	justify-content: flex-end;
	gap: 0.4em;
	margin-bottom: 0.4em;
}

/* Matches the site's accent-color .nectar-button (background + hover). */
.lgr-prev,
.lgr-next {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background-color: #8f0000;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	font-size: 1.1em;
	transition: opacity 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}

.lgr-prev:hover,
.lgr-next:hover {
	opacity: 0.87;
	color: #fff;
}

.lgr-reviews {
	display: flex;
	gap: 1em;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 0.5em;
	scrollbar-width: thin;
}

.lgr-review-item {
	scroll-snap-align: start;
	flex: 0 0 88%;
	max-width: 88%;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	padding: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	/* Deliberately fixed light card regardless of the widget's own light/dark
	   mode, so reviews stay legible against any surrounding page background. */
	background: #ffffff;
	color: #202124;
}

.lgr-review-header {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.lgr-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.lgr-avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #4285f4;
	color: #fff;
	font-weight: 600;
	font-size: 1em;
}

.lgr-review-meta {
	min-width: 0;
}

.lgr-review-name {
	font-weight: 600;
	font-size: 0.92em;
	color: #202124;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lgr-review-date {
	color: #5f6368;
	font-size: 0.8em;
}

.lgr-review-text {
	font-size: 0.9em;
	line-height: 1.45;
	color: #202124;
	max-height: 250px;
	overflow: hidden;
}

.lgr-review-item.lgr-expanded .lgr-review-text {
	max-height: none;
	overflow: visible;
}

.lgr-read-more {
	font-size: inherit;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.lgr-review-item.lgr-expanded .lgr-read-more,
.lgr-read-more.lgr-hidden {
	display: none;
}

@media (prefers-color-scheme: dark) {
	.ti-widget.lgr-widget {
		--lgr-text: #e8eaed;
		--lgr-muted: #9aa0a6;
		--lgr-border: #3c4043;
		--lgr-bg: #202124;
	}
}
