/* Google Reviews Widget — grw-widget.css */

.grw-widget {
	--grw-btn-bg:         #ffffff;
	--grw-btn-color:      #1a73e8;
	--grw-accent:         #fbbc04;
	--grw-card-bg:        #ffffff;
	--grw-card-padding:   20px;
	--grw-card-radius:    14px;
	--grw-card-gap:       8px;
	--grw-header-size:    20px;
	--grw-header-color:   #202124;
	--grw-header-margin:  16px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #202124;
	max-width: 100%;
	box-sizing: border-box;
}

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

/* ─── Título customizável ──────────────────────────── */

.grw-header-text {
	font-size: var(--grw-header-size);
	font-weight: 700;
	color: var(--grw-header-color);
	margin: 0 0 var(--grw-header-margin);
	line-height: 1.3;
}

.grw-header-text-link {
	text-decoration: none;
	display: block;
}

.grw-header-text-link:hover .grw-header-text {
	text-decoration: underline;
}

/* Header linkável */
a.grw-header {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

a.grw-header:hover .grw-business-name {
	text-decoration: underline;
}

/* ─── Alinhamento ──────────────────────────────────── */

.grw-align-center .grw-header-text,
.grw-align-center .grw-footer,
.grw-align-center .grw-dots {
	text-align: center;
}

.grw-align-center .grw-header,
.grw-align-center .grw-dots {
	justify-content: center;
}

/* ─── Header ─────────────────────────────────────────── */

.grw-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}

.grw-google-logo { flex-shrink: 0; }

.grw-header-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.grw-business-name {
	font-size: 1rem;
	font-weight: 700;
	color: #202124;
	line-height: 1.2;
}

.grw-overall {
	display: flex;
	align-items: center;
	gap: 6px;
}

.grw-overall-score {
	font-size: 1.1rem;
	font-weight: 700;
	color: #202124;
}

.grw-total-count {
	font-size: 0.82rem;
	color: #5f6368;
}

/* ─── Stars ───────────────────────────────────────────── */

.grw-stars {
	display: inline-flex;
	gap: 2px;
	line-height: 1;
}

.grw-star {
	width: 16px;
	height: 16px;
	fill: var(--grw-accent);
}

.grw-star--empty { fill: #dadce0; }

.grw-stars--overall .grw-star {
	width: 18px;
	height: 18px;
}

/* ─── Carousel wrapper ────────────────────────────────── */

.grw-carousel-wrapper {
	position: relative;
	display: flex;
	align-items: flex-start; /* não deixa o tema restringir a altura pelo botão */
	gap: 8px;
}

.grw-nav {
	/* garante que o botão se centraliza independente do align-items do wrapper */
	align-self: center;
}

.grw-carousel {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	/* padding cria área visível para sombra/borda dentro do clip */
	padding: 8px 2px 20px;
}

.grw-track {
	display: flex;
	will-change: transform;
	/* padding no track garante que a borda inferior dos cards
	   nunca toca o limite do overflow:hidden */
	padding-bottom: 4px;
}

/* ─── Card ────────────────────────────────────────────── */

.grw-card {
	flex: 0 0 100%;
	padding: 4px var(--grw-card-gap) 8px;
	display: flex;
	flex-direction: column;
}

.grw-card-inner {
	background: var(--grw-card-bg);
	border: 1px solid #e8eaed;
	border-radius: var(--grw-card-radius);
	padding: var(--grw-card-padding);
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1; /* ocupa a altura disponível sem depender de height:100% */
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.grw-card-inner:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Quote icon */
.grw-card-inner::before {
	content: '\201C';
	font-size: 3rem;
	line-height: 0.6;
	color: var(--grw-accent);
	font-family: Georgia, serif;
	display: block;
	height: 20px;
	margin-bottom: 4px;
}

/* ─── Reviewer ────────────────────────────────────────── */

.grw-reviewer {
	display: flex;
	align-items: center;
	gap: 10px;
}

.grw-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.grw-avatar--placeholder {
	background: linear-gradient(135deg, #4285f4, #34a853);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.grw-reviewer-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.grw-reviewer-name {
	font-size: 0.875rem;
	font-weight: 600;
	color: #202124;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grw-review-date {
	font-size: 0.775rem;
	color: #80868b;
}

/* ─── Review text ─────────────────────────────────────── */

.grw-review-text {
	font-size: 0.875rem;
	color: #3c4043;
	line-height: 1.6;
	margin: 0;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ─── Nav buttons ─────────────────────────────────────── */

.grw-nav {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #dadce0;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5f6368;
	transition: background 0.2s, box-shadow 0.2s, color 0.2s;
	padding: 0;
}

.grw-nav:hover {
	background: #f1f3f4;
	box-shadow: 0 1px 6px rgba(0,0,0,0.12);
	color: #202124;
}

.grw-nav svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	pointer-events: none;
}

/* ─── Dots ────────────────────────────────────────────── */

.grw-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
}

.grw-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: #dadce0;
	cursor: pointer;
	padding: 0;
	transition: background 0.25s, transform 0.25s;
}

.grw-dot--active {
	background: var(--grw-accent);
	transform: scale(1.3);
}

/* ─── Footer CTA ──────────────────────────────────────── */

.grw-footer {
	margin-top: 22px;
	text-align: center;
}

.grw-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	background: var(--grw-btn-bg);
	color: var(--grw-btn-color);
	border: 1px solid color-mix(in srgb, var(--grw-btn-color) 30%, transparent);
	border-radius: 24px;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s, box-shadow 0.2s;
}

.grw-cta:hover {
	background: color-mix(in srgb, var(--grw-btn-bg) 85%, #000);
	box-shadow: 0 1px 8px rgba(0,0,0,0.12);
	color: var(--grw-btn-color);
	text-decoration: none;
}

/* ─── Error (admins) ──────────────────────────────────── */

.grw-error {
	padding: 10px 14px;
	background: #fce8e6;
	border-left: 4px solid #d93025;
	color: #202124;
	font-size: 0.875rem;
	border-radius: 4px;
}

.grw-error a { color: #1a73e8; }

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 479px) {
	.grw-nav {
		width: 30px;
		height: 30px;
	}
	.grw-nav svg {
		width: 16px;
		height: 16px;
	}
}
