/* WD Google Reviews - front end.
   Every colour, radius, font and column count arrives as a CSS variable set
   inline on the wrapper, so several widgets styled differently can share a
   page. Nothing here is a global style. */

.wdgr {
	font-family: var(--wdgr-font, inherit);
	font-size: var(--wdgr-size, 16px);
	color: var(--wdgr-text, #1f2328);
	line-height: 1.45;
	box-sizing: border-box;
}

.wdgr *,
.wdgr *::before,
.wdgr *::after {
	box-sizing: inherit;
}

.wdgr p {
	margin: 0;
}

/* ---------- stars ---------- */

.wdgr-stars {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
}

.wdgr-stars-bg,
.wdgr-stars-fg {
	display: inline-flex;
	gap: 0.08em;
	line-height: 0;
}

.wdgr-stars-bg {
	color: var(--wdgr-dim);
}

.wdgr-stars-fg {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	color: var(--wdgr-star);
}

.wdgr-stars svg {
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
	fill: currentColor;
}

/* ---------- verified rosette and Google mark ---------- */

.wdgr-verified svg {
	width: 1em;
	height: 1em;
	display: block;
}

.wdgr-verified {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.wdgr-glogo {
	display: inline-flex;
	margin-left: auto;
	flex: 0 0 auto;
}

.wdgr-glogo svg {
	width: 1.5em;
	height: 1.5em;
	display: block;
}

.wdgr-word {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* ---------- card ---------- */

.wdgr-card {
	display: flex;
	flex-direction: column;
	gap: 0.7em;
	padding: 1.1em 1.15em;
	background: var(--wdgr-bg);
	border: 1px solid var(--wdgr-border);
	border-radius: var(--wdgr-radius);
}

.wdgr-head {
	display: flex;
	align-items: center;
	gap: 0.7em;
}

.wdgr-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 0.1em;
}

.wdgr-name {
	color: var(--wdgr-name);
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wdgr-when {
	font-size: 0.92em;
	color: var(--wdgr-when);
	line-height: 1.2;
}

/* avatar */

.wdgr-av {
	position: relative;
	flex: 0 0 2.75em;
	width: 2.75em;
	height: 2.75em;
}

.wdgr-av img,
.wdgr-av-letter {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.wdgr-av-letter {
	display: grid;
	place-items: center;
	color: #fff;
	font-weight: 600;
	font-size: 1.1em;
	line-height: 1;
}

/* stars row */

.wdgr-stars-row {
	display: flex;
	align-items: center;
	gap: 0.4em;
}

/* body */

.wdgr-body {
	font-size: 1em;
	line-height: 1.5;
}

.wdgr-body.is-clipped p {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wdgr-body.is-open p {
	display: block;
}

.wdgr-more {
	align-self: flex-start;
	margin: -0.2em 0 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.95em;
	color: var(--wdgr-muted);
	cursor: pointer;
}

.wdgr-more:hover {
	color: var(--wdgr-text);
}

/* ---------- grid ---------- */

.wdgr-grid {
	display: grid;
	gap: 1.25em;
	grid-template-columns: repeat(var(--wdgr-cols), minmax(0, 1fr));
	align-items: start;
}

.wdgr-card[hidden] {
	display: none;
}

.wdgr-load-wrap {
	display: flex;
	justify-content: center;
	margin-top: 1.5em;
}

.wdgr-load {
	padding: 0.7em 1.4em;
	font: inherit;
	color: var(--wdgr-text);
	background: var(--wdgr-bg);
	border: 1px solid var(--wdgr-border);
	border-radius: 10px;
	cursor: pointer;
}

.wdgr-load:hover {
	filter: brightness(0.96);
}

/* ---------- slider ---------- */

.wdgr-slider {
	position: relative;
	display: flex;
	align-items: center;
}

.wdgr-viewport {
	flex: 1 1 auto;
	overflow: hidden;
	padding: 0.35em 0;
}

.wdgr-track {
	display: flex;
	gap: 1.25em;
	align-items: stretch;
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.wdgr-track > .wdgr-card {
	flex: 0 0 calc((100% - (var(--wdgr-cols) - 1) * 1.25em) / var(--wdgr-cols));
}

/* Arrows sit over the edge of the row, as in the reference. */
.wdgr-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.6em;
	height: 2.6em;
	padding: 0;
	border: 1px solid var(--wdgr-dim);
	border-radius: 50%;
	background: var(--wdgr-bg);
	color: var(--wdgr-text);
	cursor: pointer;
}

.wdgr-nav svg {
	width: 1.2em;
	height: 1.2em;
	display: block;
}

.wdgr-prev {
	left: -0.9em;
}

.wdgr-next {
	right: -0.9em;
}

.wdgr-nav[disabled] {
	opacity: 0.25;
	cursor: default;
}

.wdgr-nav:hover:not([disabled]) {
	border-color: var(--wdgr-muted);
}

/* ---------- speech bubble ---------- */

.wdgr-bubble-card {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	gap: 0;
}

.wdgr-bubble {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.7em;
	padding: 1.1em 1.15em;
	background: var(--wdgr-bg);
	border: 1px solid var(--wdgr-border);
	border-radius: var(--wdgr-radius);
}

/* The tail, pointing down toward the author below it.
   A rotated square rather than a clipped triangle, so the two visible sides
   can carry the card border and the two hidden sides merge into the bubble,
   covering its bottom border where they meet. */
.wdgr-bubble::after {
	content: "";
	position: absolute;
	left: 1.45em;
	bottom: -0.48em;
	width: 0.95em;
	height: 0.95em;
	background: var(--wdgr-bg);
	border-right: 1px solid var(--wdgr-border);
	border-bottom: 1px solid var(--wdgr-border);
	transform: rotate(45deg) skewX(-12deg);
}

.wdgr-head-under {
	margin-top: 1.35em;
	padding-left: 0.1em;
}

/* ---------- badge ---------- */

.wdgr-l-badge {
	display: inline-block;
}

.wdgr-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.85em 1.35em;
	background: var(--wdgr-bg);
	border: 1px solid var(--wdgr-border);
	border-radius: var(--wdgr-radius);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.wdgr-badge .wdgr-word {
	font-size: 1.25em;
}

.wdgr-badge .wdgr-stars svg {
	width: 1.3em;
	height: 1.3em;
}

.wdgr-badge-score {
	font-weight: 700;
}

.wdgr-badge-sep {
	color: var(--wdgr-dim);
}

.wdgr-badge-count {
	font-weight: 700;
	white-space: nowrap;
}

/* ---------- summary line ---------- */

.wdgr-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.3em;
	margin-top: 1.6em;
	text-align: center;
}

.wdgr-summary .wdgr-word {
	font-size: 1.15em;
}

/* ---------- misc ---------- */

.wdgr-empty {
	color: var(--wdgr-muted);
}

.wdgr-notice {
	padding: 0.6em 0.8em;
	border-left: 3px solid #d97706;
	background: #fff7ed;
	color: #7c2d12;
	font-size: 0.9em;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
	.wdgr-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.wdgr-track > .wdgr-card {
		flex-basis: calc(50% - 0.625em);
	}
}

@media (max-width: 640px) {
	.wdgr-grid {
		grid-template-columns: 1fr;
	}
	.wdgr-track > .wdgr-card {
		flex-basis: 100%;
	}
	.wdgr-prev {
		left: 0;
	}
	.wdgr-next {
		right: 0;
	}
	.wdgr-badge {
		padding: 0.7em 1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wdgr-track {
		transition: none;
	}
}

.wdgr :focus-visible {
	outline: 2px solid var(--wdgr-star);
	outline-offset: 2px;
}
