/* ============================================================
   fb-grw — Custom Google Reviews Widget Styles
   Ferrarini & Bonetti Design System — v2.0
   ============================================================ */

:root {
	--grw-gold: #c8962a;
	--grw-gold-lt: #e1b43d;
	--grw-orange: #f4a623;
	--grw-brown-900: #1f1a17;
	--grw-brown-700: #3b2a1f;
	--grw-brown-500: #5f5247;
	--grw-brown-300: #8a7b6c;
	--grw-cream-100: #faf6ef;
	--grw-cream-bd: #e8ddd0;
	--grw-white: #ffffff;
	--grw-radius: 14px;
	--grw-shadow-sm: 0 6px 20px rgba(59, 42, 31, 0.07);
	--grw-shadow-lg: 0 20px 50px rgba(59, 42, 31, 0.14);
	--grw-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--grw-card-w: 300px;
	--grw-card-gap: 24px;
}

/* ── Widget root ── */
.fb-grw {
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: var(--grw-brown-700);
}

/* ── Header: big rating + CTA button ── */
.fb-grw__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(200, 150, 42, 0.2);
}

.fb-grw__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.fb-grw__rating-num {
	font-size: 42px;
	font-weight: 800;
	line-height: 1;
	color: var(--grw-brown-900);
	letter-spacing: -0.03em;
}

/* ── Stars ── */
.fb-grw__stars {
	display: flex;
	gap: 2px;
}

.fb-grw__star {
	font-size: 15px;
	color: var(--grw-cream-bd);
	line-height: 1;
}

.fb-grw__star--on {
	color: var(--grw-orange);
}

.fb-grw__stars--lg .fb-grw__star {
	font-size: 24px;
}

.fb-grw__count {
	font-size: 12px;
	color: var(--grw-brown-300);
	letter-spacing: 0.04em;
	font-weight: 600;
}

/* ── Buttons ── */
.fb-grw__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 24px;
	border-radius: 99px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.25s, color 0.25s, transform 0.2s;
	cursor: pointer;
}

.fb-grw__btn--write {
	background: var(--grw-gold);
	color: var(--grw-white);
	border: 2px solid transparent;
}

.fb-grw__btn--write:hover {
	background: var(--grw-gold-lt);
	transform: translateY(-2px);
}

/* ── Scroll viewport with edge fades ── */
.fb-grw__viewport {
	position: relative;
	overflow: hidden;
	mask-image: linear-gradient(to right,
			transparent 0,
			#000 7%,
			#000 93%,
			transparent 100%);
	-webkit-mask-image: linear-gradient(to right,
			transparent 0,
			#000 7%,
			#000 93%,
			transparent 100%);
}

/* ── Scrolling track ── */
.fb-grw__track {
	display: flex;
	align-items: stretch;
	width: max-content;
	animation: fbReviewsScroll 32s linear infinite;
}

.fb-grw__viewport:hover .fb-grw__track {
	animation-play-state: paused;
}

@keyframes fbReviewsScroll {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-50%);
	}
}

/* ── Review card ── */
.fb-grw__card {
	position: relative;
	width: var(--grw-card-w);
	flex-shrink: 0;
	box-sizing: border-box;
	background: var(--grw-white);
	border: 1px solid var(--grw-cream-bd);
	border-radius: var(--grw-radius);
	box-shadow: var(--grw-shadow-sm);
	padding: 26px 24px 30px;
	margin-right: var(--grw-card-gap);
	overflow: hidden;
	transition:
		transform 0.32s var(--grw-ease),
		box-shadow 0.32s var(--grw-ease),
		border-color 0.32s var(--grw-ease);
}

/* Gold bar reveal on hover */
.fb-grw__card::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--grw-gold), var(--grw-gold-lt));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--grw-ease);
}

.fb-grw__card:hover {
	transform: translateY(-4px);
	box-shadow: var(--grw-shadow-lg);
	border-color: rgba(200, 150, 42, 0.3);
}

.fb-grw__card:hover::after {
	transform: scaleX(1);
}

/* ── Reviewer row (avatar + name + stars + date) ── */
.fb-grw__reviewer {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin-bottom: 16px;
}

.fb-grw__avatar-wrap {
	display: block;
	flex-shrink: 0;
	text-decoration: none;
}

.fb-grw__avatar,
.fb-grw__avatar-init {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

/* Fallback initial avatar (Google-style coloured circle) */
.fb-grw__avatar-init {
	background: var(--grw-gold);
	color: var(--grw-white);
	font-size: 18px;
	font-weight: 700;
	line-height: 44px;
	text-align: center;
	text-transform: uppercase;
	font-family: 'Montserrat', sans-serif;
}

.fb-grw__reviewer-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	line-height: 1;
}

.fb-grw__name {
	font-size: 13px;
	font-weight: 700;
	color: var(--grw-brown-700);
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.2s;
}

.fb-grw__name:hover {
	color: var(--grw-gold);
}

.fb-grw__date {
	display: block;
	font-size: 11px;
	color: var(--grw-brown-300);
	letter-spacing: 0.02em;
	margin-top: 2px;
}

/* ── Review text ── */
.fb-grw__text {
	font-size: 13.5px;
	line-height: 1.74;
	color: var(--grw-brown-500);
	margin: 0;
}

/* ── Decorative quote mark ── */
.fb-grw__quote {
	position: absolute;
	top: 6px;
	right: 16px;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 72px;
	line-height: 1;
	color: rgba(200, 150, 42, 0.09);
	pointer-events: none;
	user-select: none;
}

/* ── Footer: both buttons ── */
.fb-grw__footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
	text-align: center;
	margin-top: 20px;
}

.fb-grw__btn--all {
	background: transparent;
	color: var(--grw-gold);
	border: 2px solid var(--grw-gold);
}

.fb-grw__btn--all:hover {
	background: var(--grw-gold);
	color: var(--grw-white);
	transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 767px) {
	.fb-grw__header {
		flex-direction: column;
		align-items: center;
	}

	.fb-grw__rating-num {
		font-size: 42px;
	}

	.fb-grw__stars--lg .fb-grw__star {
		font-size: 24px;
	}

	.fb-grw__card {
		width: 260px;
	}
}