/* PLS Google Reviews — badge, modal, carousel/grid.
   Everything is scoped under .plsgr* so it can't leak into the theme. */

.plsgr-badge,
.plsgr-modal,
.plsgr {
	--plsgr-star: #fbbc04;
	--plsgr-star-empty: #dadce0;
	--plsgr-btn: #1a73e8;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.plsgr-badge *,
.plsgr-modal *,
.plsgr * {
	box-sizing: border-box;
}

/* Shared stars */
.plsgr-stars {
	display: inline-flex;
	line-height: 0;
	vertical-align: middle;
}

.plsgr-stars .plsgr-star-bg path {
	fill: var(--plsgr-star-empty);
}

.plsgr-stars .plsgr-star-fg path {
	fill: var(--plsgr-star);
}

.plsgr-stars--badge .plsgr-star-bg path {
	fill: rgba(255, 255, 255, .38);
}

.plsgr-stars--badge .plsgr-star-fg path {
	fill: var(--plsgr-badge-star, #fff);
}

/* Google wordmark — required attribution */
.plsgr-wordmark {
	font-family: "Product Sans", "Google Sans", Arial, sans-serif;
	font-weight: 500;
	letter-spacing: -0.4px;
}

.plsgr-verified {
	flex: 0 0 auto;
	vertical-align: -2px;
}

/* =====================================================================
   1. Badge
   ================================================================== */

.plsgr-badge {
	--plsgr-badge-bg: #ff7f00;
	--plsgr-badge-fg: #fff;
	--plsgr-badge-star: #fff;
	--plsgr-badge-x: 20px;
	--plsgr-badge-y: 20px;

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 148px;
	margin: 0;
	padding: 16px 14px 14px;
	border: 0;
	border-radius: 14px;
	background: var(--plsgr-badge-bg);
	color: var(--plsgr-badge-fg);
	font-family: inherit;
	cursor: pointer;
	text-align: center;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
	transition: transform .18s ease, box-shadow .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.plsgr-badge:hover,
.plsgr-badge:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 26px rgba(0, 0, 0, .24);
}

.plsgr-badge--floating {
	position: fixed;
	bottom: var(--plsgr-badge-y);
	z-index: 99990;
}

.plsgr-badge--bottom-left {
	left: var(--plsgr-badge-x);
}

.plsgr-badge--bottom-right {
	right: var(--plsgr-badge-x);
}

.plsgr-badge--inline {
	position: relative;
	display: inline-flex;
}

.plsgr-badge__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.plsgr-badge__rating {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.5px;
	color: var(--plsgr-badge-fg);
}

.plsgr-badge__count {
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	opacity: .95;
	color: var(--plsgr-badge-fg);
}

@media (max-width: 782px) {
	.plsgr-badge--desktop-only {
		display: none;
	}

	.plsgr-badge--floating {
		width: 128px;
		padding: 12px 10px 11px;
	}

	.plsgr-badge--floating .plsgr-badge__rating {
		font-size: 25px;
	}

	.plsgr-badge--floating .plsgr-badge__logo {
		width: 34px;
		height: 34px;
	}
}

/* =====================================================================
   2. Modal
   ================================================================== */

.plsgr-modal[hidden] {
	display: none;
}

.plsgr-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.plsgr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	animation: plsgr-fade .18s ease;
}

.plsgr-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 900px;
	max-height: min(86vh, 820px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
	overflow: hidden;
	animation: plsgr-pop .2s cubic-bezier(.2, .8, .3, 1);
}

@keyframes plsgr-fade {
	from { opacity: 0; }
}

@keyframes plsgr-pop {
	from { opacity: 0; transform: translateY(14px) scale(.985); }
}

.plsgr-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5f6368;
	cursor: pointer;
	transition: background .15s ease;
}

.plsgr-modal__close:hover {
	background: #f1f3f4;
	color: #202124;
}

.plsgr-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding: 26px 68px 20px 32px;
	border-bottom: 1px solid #e8eaed;
}

.plsgr-modal__title {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin: 0 0 6px;
	font-size: 27px;
	line-height: 1.2;
	color: #202124;
}

.plsgr-modal__title .plsgr-wordmark {
	font-size: 27px;
}

.plsgr-modal__title-word {
	font-weight: 700;
	color: #202124;
}

.plsgr-modal__score {
	display: flex;
	align-items: center;
	gap: 9px;
}

.plsgr-modal__rating {
	font-size: 25px;
	font-weight: 700;
	line-height: 1;
	color: #202124;
}

.plsgr-modal__count {
	font-size: 15px;
	color: #70757a;
}

.plsgr-modal__cta {
	display: inline-flex;
	align-items: center;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--plsgr-btn);
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	transition: filter .15s ease;
}

.plsgr-modal__cta:hover,
.plsgr-modal__cta:focus-visible {
	filter: brightness(1.1);
	color: #fff !important;
}

.plsgr-modal__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 32px;
}

.plsgr-modal__empty {
	margin: 28px 0;
	font-size: 16px;
	line-height: 1.6;
	color: #5f6368;
}

.plsgr-modal__empty a {
	color: var(--plsgr-btn);
	text-decoration: none;
}

.plsgr-modal__empty a:hover {
	text-decoration: underline;
}

.plsgr-modal__empty--admin {
	padding: 12px 14px;
	background: #fff8e1;
	border: 1px solid #f0d58c;
	border-radius: 8px;
	font-size: 14px;
	color: #6b5a1e;
}

.plsgr-modal__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.plsgr-modal__list > li::marker,
.plsgr-modal__list > li::before {
	content: none;
}

/* ---- a single review ---- */

.plsgr-review {
	margin: 0;
	padding: 26px 0;
	list-style: none;
	border-bottom: 1px solid #e8eaed;
}

.plsgr-review:last-child {
	border-bottom: 0;
}

.plsgr-review__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}

.plsgr-avatar {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.plsgr-avatar--initial {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 21px;
	font-weight: 500;
	line-height: 1;
}

.plsgr-review__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.plsgr-review__author {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 17px;
	font-weight: 600;
	color: #202124;
}

.plsgr-review__when {
	font-size: 14px;
	color: #70757a;
}

.plsgr-review__text {
	margin: 12px 0 16px;
	font-size: 16px;
	line-height: 1.6;
	color: #202124;
	white-space: pre-line;
	word-break: break-word;
}

.plsgr-review__posted {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: #70757a;
}

.plsgr-review__posted a {
	color: var(--plsgr-btn);
	text-decoration: none;
	font-size: 14px;
}

.plsgr-review__posted a:hover {
	text-decoration: underline;
}

/* Page lock while the popup is open. `top` is set inline by the script so the
   scroll position is preserved — position:fixed is the only reliable lock on
   iOS Safari, where overflow:hidden on body is ignored. */
body.plsgr-locked {
	position: fixed;
	width: 100%;
	overflow: hidden;
}

@media (max-width: 680px) {
	.plsgr-modal {
		padding: 0;
	}

	.plsgr-modal__dialog {
		max-width: none;
		max-height: 100%;
		height: 100%;
		border-radius: 0;
	}

	.plsgr-modal__head {
		padding: 22px 60px 18px 20px;
	}

	.plsgr-modal__title,
	.plsgr-modal__title .plsgr-wordmark {
		font-size: 22px;
	}

	.plsgr-modal__cta {
		width: 100%;
		justify-content: center;
	}

	.plsgr-modal__body {
		padding: 0 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.plsgr-modal__dialog,
	.plsgr-modal__backdrop {
		animation: none;
	}

	.plsgr-badge {
		transition: none;
	}
}
