/*
 * Google Reviews - front-end styles.
 *
 * Restyle everything from your theme by setting these CSS variables on :root,
 * on a wrapper element, or on .gr-testimonials. None of them are
 * required; the values below are the defaults.
 *
 *   --gr-accent        #fbbc04                    Star colour
 *   --gr-radius        14px                       Corner radius
 *   --gr-bg            #ffffff                    Card background
 *   --gr-text          #1f2937                    Main text colour
 *   --gr-muted         #5b6472                    Secondary text colour
 *   --gr-border        rgba(15, 23, 42, 0.1)      Card border
 *   --gr-shadow        0 1px 3px rgba(16, 24, 40, 0.08)
 *   --gr-gap           1.25rem                    Space between cards
 *   --gr-star-empty    #d1d5db                    Unfilled star colour
 *   --gr-star-size     1.2em                      Star height (width is 5x)
 *
 * Dark style (style="dark") reads --gr-dark-bg, --gr-dark-text, --gr-dark-muted,
 * --gr-dark-border and --gr-dark-star-empty.
 */

.gr-testimonials,
.gr-testimonials * {
	box-sizing: border-box;
}

/* Dark style: scoped re-definition of the variables. */
.gr-theme-dark {
	--gr-bg: var(--gr-dark-bg, #1b2130);
	--gr-text: var(--gr-dark-text, #f3f4f6);
	--gr-muted: var(--gr-dark-muted, #aab2c0);
	--gr-border: var(--gr-dark-border, rgba(255, 255, 255, 0.16));
	--gr-star-empty: var(--gr-dark-star-empty, #4b5563);
}

/* Visually hidden, still read by screen readers. */
.gr-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Message shown to administrators only when there is nothing to display. */
.gr-notice {
	display: inline-block;
	padding: 0.35em 0.6em;
	border: 1px dashed #b32d2e;
	border-radius: 4px;
	background: #fff;
	color: #b32d2e;
	font-size: 0.85rem;
	line-height: 1.4;
}

/* Inline values ------------------------------------------------------- */

.gr-stars {
	display: inline-block;
	line-height: 0;
	vertical-align: middle;
}

.gr-stars__svg {
	display: block;
	width: calc(var(--gr-star-size, 1.2em) * 5);
	height: var(--gr-star-size, 1.2em);
	max-width: none;
}

.gr-stars__empty {
	fill: var(--gr-star-empty, #d1d5db);
}

.gr-stars__full {
	fill: var(--gr-accent, #fbbc04);
}

/* The nested SVG is the partial-fill clip: make sure no theme CSS lets it overflow. */
.gr-stars__clip {
	overflow: hidden;
}

.gr-attribution--inline {
	font-size: 0.8em;
	opacity: 0.8;
}

.gr-attribution a,
a.gr-attribution {
	color: inherit;
	text-decoration: underline;
}

.gr-testimonials .gr-card__source:focus-visible,
.gr-attribution a:focus-visible,
a.gr-attribution:focus-visible,
.gr-testimonials .gr-slider__btn:focus-visible,
.gr-testimonials .gr-testimonials__list:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Testimonials -------------------------------------------------------- */

.gr-testimonials {
	--gr-cols-active: 3;
	position: relative;
	width: 100%;
	color: var(--gr-text, #1f2937);
}

.gr-cols-1 { --gr-cols-active: 1; }
.gr-cols-2 { --gr-cols-active: 2; }
.gr-cols-3 { --gr-cols-active: 3; }
.gr-cols-4 { --gr-cols-active: 4; }

.gr-testimonials .gr-testimonials__list {
	display: grid;
	grid-template-columns: repeat(var(--gr-cols-active, 3), minmax(0, 1fr));
	gap: var(--gr-gap, 1.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-testimonials .gr-card {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-testimonials .gr-card::before,
.gr-testimonials .gr-card::after {
	content: none;
}

.gr-testimonials .gr-card__figure {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	width: 100%;
	margin: 0;
	padding: 1.4rem;
	border: 1px solid var(--gr-border, rgba(15, 23, 42, 0.1));
	border-radius: var(--gr-radius, 14px);
	background: var(--gr-bg, #fff);
	color: var(--gr-text, #1f2937);
	box-shadow: var(--gr-shadow, 0 1px 3px rgba(16, 24, 40, 0.08));
}

.gr-testimonials .gr-card__rating {
	line-height: 0;
}

.gr-testimonials .gr-card__rating .gr-stars__svg {
	--gr-star-size: 1.15rem;
}

/* Reset the heavy blockquote styling many themes add. */
.gr-testimonials .gr-card__quote {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font-size: 1rem;
	font-style: normal;
	line-height: 1.6;
	quotes: none;
}

.gr-testimonials .gr-card__quote::before,
.gr-testimonials .gr-card__quote::after {
	content: none;
}

.gr-testimonials .gr-card__quote p {
	margin: 0;
	color: inherit;
	font-size: inherit;
	font-style: normal;
	line-height: inherit;
}

.gr-testimonials .gr-card__author {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: 0.9rem;
}

.gr-testimonials .gr-card__avatar {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 50%;
	object-fit: cover;
}

.gr-testimonials .gr-card__avatar--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(127, 127, 127, 0.2);
	color: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1;
}

.gr-testimonials .gr-card__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 0.15rem;
}

.gr-testimonials .gr-card__name {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.gr-testimonials .gr-card__date {
	color: var(--gr-muted, #5b6472);
	font-size: 0.85em;
}

.gr-testimonials .gr-card__source {
	margin-inline-start: auto;
	color: var(--gr-muted, #5b6472);
	font-size: 0.85em;
	text-decoration: underline;
}

.gr-testimonials .gr-card__source:hover {
	color: var(--gr-text, #1f2937);
}

.gr-attribution {
	margin: 0.9rem 0 0;
	font-size: 0.8rem;
	opacity: 0.85;
	text-align: end;
}

.gr-attribution__link {
	font-weight: 600;
}

/* Responsive columns: cap at 2 on tablets, 1 on phones. */
@media (max-width: 900px) {
	.gr-cols-3,
	.gr-cols-4 {
		--gr-cols-active: 2;
	}
}

@media (max-width: 600px) {
	.gr-cols-2,
	.gr-cols-3,
	.gr-cols-4 {
		--gr-cols-active: 1;
	}

	.gr-attribution {
		text-align: start;
	}
}

/* Slider -------------------------------------------------------------- */

.gr-testimonials--slider .gr-testimonials__list {
	display: flex;
	overflow-x: auto;
	padding: 0.5rem 0.25rem 0.75rem;
	margin: -0.5rem -0.25rem 0;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.25rem;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.gr-testimonials--slider .gr-card {
	flex: 0 0 calc((100% - (var(--gr-cols-active, 3) - 1) * var(--gr-gap, 1.25rem)) / var(--gr-cols-active, 3));
	scroll-snap-align: start;
}

.gr-testimonials .gr-slider__nav {
	display: flex;
	justify-content: center;
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.gr-testimonials .gr-slider__nav[hidden] {
	display: none;
}

.gr-testimonials .gr-slider__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--gr-border, rgba(15, 23, 42, 0.18));
	border-radius: 50%;
	background: var(--gr-bg, #fff);
	color: var(--gr-text, #1f2937);
	cursor: pointer;
	line-height: 1;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.gr-testimonials .gr-slider__btn:hover:not(:disabled) {
	transform: scale(1.06);
}

.gr-testimonials .gr-slider__btn:disabled {
	cursor: default;
	opacity: 0.35;
}

.gr-testimonials .gr-slider__btn svg {
	display: block;
	width: 20px;
	height: 20px;
}

/* Right-to-left languages: flip the arrows. */
[dir="rtl"] .gr-slider__btn svg {
	transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
	.gr-testimonials .gr-slider__btn {
		transition: none;
	}

	.gr-testimonials .gr-slider__btn:hover:not(:disabled) {
		transform: none;
	}

	.gr-testimonials .gr-testimonials__list {
		scroll-behavior: auto;
	}
}
