/* Snap Google Reviews
   Override any of the variables below in your theme CSS, e.g.
   .sgr { --sgr-card-bg: #fff; --sgr-button-bg: #e8501c; }
*/

.sgr {
	--sgr-gap: 20px;
	--sgr-radius: 16px;
	--sgr-surface: #f4f4f6;
	--sgr-card-bg: #f4f4f6;
	--sgr-text: #1f2023;
	--sgr-muted: #7a7d85;
	--sgr-star: #fbbc04;
	--sgr-star-empty: #d6d8dc;
	--sgr-link: #1a73e8;
	--sgr-button-bg: #1a73e8;
	--sgr-button-text: #ffffff;
	--sgr-verified: #1a73e8;
	--sgr-nav-bg: #ffffff;
	--sgr-nav-icon: #202124;
	--sgr-photo-radius: 10px;
	--sgr-text-size: 15px;
	--sgr-per-view: 4;
	--sgr-text-lines: 3;

	position: relative;
	box-sizing: border-box;
	color: var(--sgr-text);
	font-family: inherit;
	line-height: 1.5;
	margin: 0 auto;
}

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

/* ---------- Header ---------- */

.sgr-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	background: var(--sgr-surface);
	border-radius: var(--sgr-radius);
	padding: 18px 24px;
	margin-bottom: var(--sgr-gap);
}

.sgr-brand {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}

.sgr-g1, .sgr-g4 { color: #4285f4; }
.sgr-g2, .sgr-g6 { color: #ea4335; }
.sgr-g3 { color: #fbbc05; }
.sgr-g5 { color: #34a853; }
.sgr-brand-text { color: var(--sgr-text); }

.sgr-score {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sgr-score-num {
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.sgr-score .sgr-stars {
	--sgr-star-size: 22px;
}

.sgr-count {
	color: var(--sgr-muted);
	font-size: 14px;
}

.sgr a.sgr-btn,
.sgr a.sgr-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--sgr-button-bg);
	color: var(--sgr-button-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.sgr a.sgr-btn:hover,
.sgr a.sgr-btn:focus-visible {
	color: var(--sgr-button-text);
	filter: brightness(1.08);
	transform: translateY(-1px);
}

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

.sgr-carousel {
	position: relative;
}

.sgr-track {
	display: flex;
	gap: var(--sgr-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	outline: none;
}

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

.sgr-track:focus-visible {
	outline: 2px solid var(--sgr-link);
	outline-offset: 4px;
	border-radius: var(--sgr-radius);
}

.sgr-card {
	flex: 0 0 calc((100% - (var(--sgr-per-view) - 1) * var(--sgr-gap)) / var(--sgr-per-view));
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	background: var(--sgr-card-bg);
	border-radius: var(--sgr-radius);
	padding: 22px 24px 24px;
	scroll-snap-align: start;
}

.sgr-card--no-photos {
	--sgr-text-lines: 7;
}

.sgr-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0 0 14px;
}

.sgr-avatar {
	position: relative;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
}

.sgr-avatar img,
.sgr-avatar-letter {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0;
}

.sgr-avatar-letter {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
}

.sgr-gbadge {
	position: absolute;
	right: -4px;
	bottom: -4px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.sgr-gbadge svg {
	width: 12px;
	height: 12px;
}

.sgr-meta {
	min-width: 0;
}

.sgr-name {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.sgr-name-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sgr-verified {
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	color: var(--sgr-verified);
}

.sgr-date {
	display: block;
	margin-top: 2px;
	color: var(--sgr-muted);
	font-size: 12.5px;
	line-height: 1.3;
}

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

.sgr-stars {
	--sgr-star-size: 20px;
	position: relative;
	display: inline-block;
	line-height: 0;
	vertical-align: middle;
}

.sgr-stars-row {
	display: flex;
	gap: 1px;
	width: max-content;
}

.sgr-stars svg {
	flex: 0 0 auto;
	width: var(--sgr-star-size);
	height: var(--sgr-star-size);
	fill: currentColor;
}

.sgr-stars-base {
	display: block;
	color: var(--sgr-star-empty);
}

.sgr-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	overflow: hidden;
	color: var(--sgr-star);
}

.sgr-card .sgr-stars {
	margin: 0 0 10px;
}

/* ---------- Text ---------- */

.sgr .sgr-text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--sgr-text-lines);
	line-clamp: var(--sgr-text-lines);
	overflow: hidden;
	margin: 0;
	padding: 0;
	font-size: var(--sgr-text-size);
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.sgr-card.is-expanded .sgr-text {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: none;
}

.sgr .sgr-more {
	align-self: flex-start;
	margin: 2px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sgr-link);
	font: inherit;
	font-size: var(--sgr-text-size);
	line-height: 1.55;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

.sgr .sgr-more:hover,
.sgr .sgr-more:focus {
	background: none;
	color: var(--sgr-link);
	text-decoration: underline;
}

.sgr .sgr-more[hidden] {
	display: none;
}

/* ---------- Photos ---------- */

.sgr-photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 6px;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin-top: 16px;
}

.sgr-photos--1 {
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
}

.sgr-photos--2 {
	grid-template-rows: 1fr;
}

.sgr-photos--3 .sgr-photo:first-child {
	grid-row: 1 / 3;
}

.sgr .sgr-photo {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--sgr-photo-radius);
	overflow: hidden;
	background: #dfe1e5;
	cursor: zoom-in;
	box-shadow: none;
}

.sgr .sgr-photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.sgr .sgr-photo:hover img {
	transform: scale(1.04);
}

.sgr-photo-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 20px;
	font-weight: 600;
}

/* ---------- Arrows ---------- */

.sgr .sgr-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sgr-nav-bg);
	color: var(--sgr-nav-icon);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.sgr .sgr-nav:hover {
	background: var(--sgr-nav-bg);
	color: var(--sgr-nav-icon);
	transform: translateY(-50%) scale(1.06);
}

.sgr .sgr-nav svg {
	width: 18px;
	height: 18px;
}

.sgr .sgr-prev { left: -18px; }
.sgr .sgr-next { right: -18px; }

.sgr .sgr-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.sgr-admin-note {
	padding: 12px 16px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.sgr { --sgr-per-view: 3; }
}

@media (max-width: 820px) {
	.sgr { --sgr-per-view: 2; }
	.sgr .sgr-prev { left: -10px; }
	.sgr .sgr-next { right: -10px; }
}

@media (max-width: 560px) {
	.sgr {
		--sgr-per-view: 1.12;
		--sgr-gap: 12px;
	}
	.sgr-header { padding: 16px 18px; }
	.sgr a.sgr-btn { width: 100%; }
	.sgr-card { padding: 18px 18px 20px; }
	.sgr .sgr-prev { left: 4px; }
	.sgr .sgr-next { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.sgr-track { scroll-behavior: auto; }
	.sgr .sgr-photo img,
	.sgr a.sgr-btn,
	.sgr .sgr-nav { transition: none; }
}

/* ---------- Lightbox ---------- */

.sgr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
	background: rgba(12, 12, 14, 0.9);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sgr-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.sgr-lightbox img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sgr-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	box-shadow: none;
}

.sgr-lightbox button:hover {
	background: rgba(255, 255, 255, 0.24);
	color: #fff;
}

.sgr-lightbox button svg {
	width: 22px;
	height: 22px;
}

.sgr-lightbox button[hidden] {
	display: none;
}

.sgr-lb-close { top: 14px; right: 14px; }
.sgr-lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.sgr-lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

.sgr-lb-count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
}

@media (max-width: 560px) {
	.sgr-lightbox { padding: 64px 12px; }
	.sgr-lb-prev, .sgr-lb-next { top: auto; bottom: 10px; transform: none; }
}
