/* WP Google Reviews: carousel */

.wpgr {
	--wpgr-accent: #c8102e;
	--wpgr-gold: #f6bb06;
	--wpgr-star-empty: #d1d5db;
	--wpgr-text: #0f172a;
	--wpgr-muted: #64748b;
	--wpgr-border: rgba(15, 23, 42, 0.06);
	--wpgr-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);

	position: relative;
	color: var(--wpgr-text);
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.5;
	max-width: 100%;
}

.wpgr [hidden] {
	display: none !important;
}

.wpgr svg {
	display: block;
}

/* Heading */
/* Heading row: logo, title and rating on one centred line, at twice the original size */
.wpgr-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 20px;
	margin-bottom: 36px;
	text-align: center;
}

.wpgr-heading .wpgr-google {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
}

.wpgr-heading-text {
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -0.4px;
	line-height: 1.2;
}

.wpgr-heading-rating {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 10px;
	font-size: 28px;
	line-height: 1.2;
}

.wpgr-heading-rating .wpgr-stars {
	font-size: 36px;
}

.wpgr-heading-rating .wpgr-score {
	font-weight: 700;
}

.wpgr-heading-rating .wpgr-count {
	color: var(--wpgr-muted);
	font-size: 22px;
}

/* Grid (default): five columns, then a "Load more" button */
.wpgr-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}

.wpgr-more {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.wpgr-load-more {
	padding: 10px 24px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1), 0 0 2px rgba(0, 0, 0, 0.05);
	color: var(--wpgr-text);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
}

.wpgr-load-more:focus-visible {
	outline: 3px solid rgba(200, 16, 46, 0.35);
	outline-offset: 2px;
}

/* layout="list": one column */
.wpgr-layout-list .wpgr-grid {
	grid-template-columns: minmax(0, 1fr);
}

/* Carousel */
.wpgr-carousel {
	position: relative;
}

.wpgr-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	padding: 6px 4px 18px;
	position: relative;
	outline: none;
}

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

.wpgr-track:focus-visible {
	box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.25);
	border-radius: 20px;
}

.wpgr-track > * {
	flex: 0 0 320px;
	max-width: 85%;
	scroll-snap-align: start;
}

/* Cards */
.wpgr-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 22px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid var(--wpgr-border);
	box-shadow: var(--wpgr-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wpgr-review:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 36px -14px rgba(15, 23, 42, 0.25);
}

.wpgr-summary-card {
	background: linear-gradient(160deg, #e3f0ff 0%, #f1e6f8 60%, #f7e1ec 100%);
	gap: 10px;
}

.wpgr-summary-title {
	margin: 0;
	color: var(--wpgr-accent);
	font-size: 18px;
	font-weight: 700;
}

.wpgr-summary-based {
	margin: 0;
	color: var(--wpgr-muted);
	font-size: 14px;
}

.wpgr-summary-points {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.wpgr-summary-points li {
	position: relative;
	padding-left: 24px;
	margin-bottom: 8px;
}

.wpgr-summary-points li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--wpgr-text);
	font-weight: 700;
}

/* Review card */
.wpgr-review-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wpgr-review-who {
	flex: 1 1 auto;
	min-width: 0;
}

.wpgr-author {
	display: block;
	color: var(--wpgr-accent);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	overflow-wrap: anywhere;
}

.wpgr-date {
	color: var(--wpgr-muted);
	font-size: 13px;
}

.wpgr-google {
	flex: 0 0 22px;
}

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

.wpgr-avatar-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #e2e8f0;
	color: #94a3b8;
}

.wpgr-stars {
	position: relative;
	display: inline-block;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 2px;
	white-space: nowrap;
}

.wpgr-stars-base {
	color: var(--wpgr-star-empty);
}

.wpgr-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	color: var(--wpgr-gold);
	white-space: nowrap;
}

.wpgr-text {
	margin: 0;
	font-size: 15px;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wpgr-text.is-expanded {
	display: block;
	overflow: visible;
}

.wpgr-read-more {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wpgr-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.wpgr-read-more:hover,
.wpgr-read-more:focus-visible {
	color: var(--wpgr-text);
	text-decoration: underline;
}

/* Arrows */
.wpgr-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--wpgr-text);
	box-shadow: 0 6px 18px -6px rgba(15, 23, 42, 0.35);
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.wpgr-nav:hover:not(:disabled) {
	transform: scale(1.06);
}

.wpgr-nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.wpgr-nav:focus-visible {
	outline: 3px solid rgba(200, 16, 46, 0.35);
	outline-offset: 2px;
}

.wpgr-prev {
	left: -22px;
}

.wpgr-next {
	right: -22px;
}

/* Dots */
.wpgr-dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.wpgr-dots:empty {
	display: none;
}

.wpgr-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #cbd5e1;
	cursor: pointer;
	transition: width 0.25s ease, background 0.25s ease;
}

.wpgr-dot.is-active {
	width: 24px;
	background: var(--wpgr-accent);
}

/* Footer and rating shortcode */
.wpgr-footer {
	margin: 16px 0 0;
	text-align: center;
	font-size: 15px;
}

.wpgr-footer strong:last-child {
	text-decoration: underline;
}

.wpgr-footer-link {
	color: inherit;
	text-decoration: none;
}

.wpgr-footer-link:hover {
	text-decoration: underline;
}

.wpgr-sep {
	margin: 0 6px;
	color: var(--wpgr-muted);
}

.wpgr-website {
	color: var(--wpgr-accent);
	font-weight: 600;
	text-decoration: none;
}

.wpgr-website:hover {
	text-decoration: underline;
}

.wpgr-rating a {
	color: inherit;
	text-decoration: none;
}

.wpgr-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wpgr-score {
	font-weight: 700;
}

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

/* layout="list": stacked cards, no arrows or dots */
.wpgr-layout-list .wpgr-track {
	flex-direction: column;
	overflow: visible;
	scroll-snap-type: none;
	padding: 0;
}

.wpgr-layout-list .wpgr-track > * {
	flex: none;
	max-width: none;
	width: 100%;
}

.wpgr-layout-list .wpgr-nav,
.wpgr-layout-list .wpgr-dots {
	display: none;
}

/* Single slide: no navigation needed */
.wpgr.is-single .wpgr-nav,
.wpgr.is-single .wpgr-dots {
	display: none;
}

/* Desktop: keep the arrows clear of the cards */
@media (min-width: 641px) {
	.wpgr-carousel {
		padding: 0 22px;
	}
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
	.wpgr-track > * {
		flex-basis: 300px;
	}
}

/* Phone: swipe instead of arrows */
@media (max-width: 640px) {
	.wpgr-heading-text {
		font-size: 18px;
	}

	.wpgr-track {
		gap: 12px;
		padding: 4px 16px 16px;
		scroll-padding: 0 16px;
	}

	.wpgr-track > * {
		flex-basis: 84%;
		max-width: 84%;
	}

	.wpgr-card {
		padding: 18px;
	}

	.wpgr-nav {
		display: none;
	}
}

@media (min-width: 641px) and (max-width: 1200px) {
	.wpgr-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.wpgr-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpgr-track,
	.wpgr-card,
	.wpgr-nav,
	.wpgr-dot {
		transition: none;
		scroll-behavior: auto;
	}
}
