/* VDB Google Reviews
   Override any of these variables on a parent element to restyle per site or per section. */

.vdb-gr {
	--vdb-card-bg: #ffffff;
	--vdb-card-text: #13284c;
	--vdb-card-border: transparent;
	--vdb-star: #fbbc04;
	--vdb-accent: #007ea7;
	--vdb-header-text: inherit;
	--vdb-muted: rgba(19, 40, 76, 0.62);
	--vdb-nav-bg: #ffffff;
	--vdb-nav-text: #13284c;
	--vdb-radius: 8px;
	--vdb-gap: 20px;
	--vdb-card-width: 340px;
	--vdb-nav-size: 44px;
	--vdb-nav-overlap: 18px;
	--vdb-track-pad: 4px;

	font-family: Arial, Helvetica, sans-serif;
	color: var(--vdb-header-text);
	line-height: 1.5;
	box-sizing: border-box;
}
.vdb-gr *, .vdb-gr *::before, .vdb-gr *::after { box-sizing: inherit; }
.vdb-gr ul { list-style: none; margin: 0; padding: 0; }
.vdb-gr p { margin: 0; }

/* Header */
.vdb-gr-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	flex-wrap: wrap;
	margin: 0 0 24px;
}
.vdb-gr-header-rating {
	display: flex;
	align-items: center;
	gap: 12px;
}
.vdb-gr-score {
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}
.vdb-gr-source {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid var(--vdb-accent);
	padding-bottom: 2px;
}
.vdb-gr-source:hover,
.vdb-gr-source:focus-visible { border-bottom-color: currentColor; }

/* Stars */
.vdb-gr-stars { display: inline-flex; gap: 2px; color: var(--vdb-star); }
.vdb-gr-star { display: block; fill: currentColor; }
.vdb-gr-star.is-empty { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0.55; }
.vdb-gr-star.is-half { fill: url(#vdbhalf); stroke: currentColor; stroke-width: 1.5; }

/* Track */
.vdb-gr-viewport { position: relative; }
.vdb-gr-track {
	display: grid;
	gap: var(--vdb-gap);
}
.vdb-gr--grid .vdb-gr-track {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.vdb-gr--carousel .vdb-gr-track {
	grid-auto-flow: column;
	grid-auto-columns: min(var(--vdb-card-width), 88%);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--vdb-track-pad);
	padding: var(--vdb-track-pad) var(--vdb-track-pad) 12px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.vdb-gr--carousel .vdb-gr-track::-webkit-scrollbar { display: none; }
.vdb-gr--carousel .vdb-gr-track:focus-visible {
	outline: 2px solid var(--vdb-accent);
	outline-offset: 4px;
}

/* Card */
.vdb-gr-card {
	background: var(--vdb-card-bg);
	color: var(--vdb-card-text);
	border: 1px solid var(--vdb-card-border);
	border-radius: var(--vdb-radius);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-snap-align: start;
	min-height: 100%;
}
.vdb-gr-card-top {
	display: flex;
	align-items: center;
	gap: 12px;
}
.vdb-gr-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex: 0 0 40px;
	object-fit: cover;
}
.vdb-gr-avatar--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--vdb-accent);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
}
.vdb-gr-who { display: flex; flex-direction: column; min-width: 0; }
.vdb-gr-author { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdb-gr-when { font-size: 13px; color: var(--vdb-muted); }
.vdb-gr-text { font-size: 15px; line-height: 1.6; }
.vdb-gr-more {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: var(--vdb-accent);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.vdb-gr-more:focus-visible { outline: 2px solid var(--vdb-accent); outline-offset: 2px; }

/* Nav arrows
   Positioned against the card edge, not the viewport edge. The track carries
   --vdb-track-pad of horizontal padding, so the offsets subtract it back out.
   The 4px top nudge compensates for the track's 4px top / 12px bottom padding
   so the arrows land on the true vertical center of the cards. */
.vdb-gr-nav {
	position: absolute;
	top: calc(50% - 4px);
	transform: translateY(-50%);
	width: var(--vdb-nav-size);
	height: var(--vdb-nav-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--vdb-nav-bg);
	color: var(--vdb-nav-text);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	font-size: 0;
	cursor: pointer;
	z-index: 2;
	box-shadow: none;
	text-shadow: none;
}
.vdb-gr-nav svg { display: block; flex: 0 0 auto; }
.vdb-gr-nav--prev {
	left: calc(var(--vdb-track-pad) - var(--vdb-nav-overlap));
	right: auto;
}
.vdb-gr-nav--next {
	right: calc(var(--vdb-track-pad) - var(--vdb-nav-overlap));
	left: auto;
}
.vdb-gr-nav:hover { background: var(--vdb-accent); color: #fff; }
.vdb-gr-nav:focus-visible { outline: 2px solid var(--vdb-accent); outline-offset: 3px; }
.vdb-gr-nav[disabled] { opacity: 0.35; cursor: default; }
.vdb-gr-nav[disabled]:hover { background: var(--vdb-nav-bg); color: var(--vdb-nav-text); }

@media (max-width: 782px) {
	.vdb-gr { --vdb-nav-overlap: -4px; }
	.vdb-gr-score { font-size: 36px; }
}

/* Attribution when header is hidden */
.vdb-gr-attribution { margin-top: 16px; font-size: 13px; }
.vdb-gr-attribution a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
	opacity: 0.85;
}
.vdb-gr-attribution a:hover { opacity: 1; text-decoration: underline; }
.vdb-gr-google { flex: 0 0 auto; }

/* Admin-only error */
.vdb-gr-error {
	background: #fff3cd;
	color: #664d03;
	border: 1px solid #ffe69c;
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
	.vdb-gr--carousel .vdb-gr-track { scroll-behavior: smooth; }
	.vdb-gr-nav { transition: background-color 0.15s ease, color 0.15s ease; }
}
