/* ===== Frontend widget ===== */
.grs-widget {
	--grs-star: #f6b100;
	--grs-text: #1f2430;
	--grs-muted: #6b7280;
	--grs-card-bg: #ffffff;
	--grs-bg: transparent;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}
.grs-widget * { box-sizing: border-box; }

.grs-header {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
}
.grs-header-title {
	font-weight: 900;
	font-size: 20px;
	letter-spacing: 0.5px;
	color: var(--grs-text);
}
.grs-header-stars { font-size: 24px; line-height: 1; }
.grs-header-count { font-size: 14px; color: var(--grs-muted); font-weight: 500; }
.grs-header-google { margin-top: 6px; }
.grs-google-wordmark { height: 30px; width: auto; }

.grs-star-full { color: var(--grs-star); }
.grs-star-empty { color: #e0e0e0; }

.grs-carousel-col {
	flex: 1 1 400px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.grs-carousel-wrap {
	position: relative;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.grs-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	padding: 6px 4px 14px;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}
.grs-carousel::-webkit-scrollbar { display: none; }
.grs-carousel { scrollbar-width: none; -ms-overflow-style: none; }

.grs-card {
	scroll-snap-align: start;
	flex: 0 0 300px;
	background: var(--grs-card-bg);
	border-radius: 16px;
	box-shadow: 0 2px 14px rgba(20, 20, 43, 0.08);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.grs-card-top { display: flex; align-items: center; gap: 10px; }
.grs-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.grs-avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 800;
	background: #1a73e8;
}
.grs-card-meta { flex: 1; min-width: 0; }
.grs-card-name {
	font-weight: 800;
	font-size: 14.5px;
	color: var(--grs-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.grs-card-time { font-size: 12.5px; color: var(--grs-muted); font-weight: 500; }
.grs-card-google { flex-shrink: 0; }

.grs-card-stars { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.grs-verified {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #1a73e8;
	color: #fff;
	font-size: 10px;
	margin-left: 2px;
}

.grs-card-text { font-size: 14px; line-height: 1.5; color: #333; font-weight: 500; }
.grs-card-text-inner {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.grs-card-text.grs-expanded .grs-card-text-inner {
	-webkit-line-clamp: unset;
	overflow: visible;
}
.grs-read-more {
	background: none;
	border: none;
	padding: 0;
	margin-top: 4px;
	color: var(--grs-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.grs-arrow {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid #e5e5e5;
	background: #fff;
	color: #333;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.grs-arrow:hover { background: #f5f5f5; }

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

.grs-dots {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
}
.grs-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #d9d9d9;
	border: none;
	padding: 0;
	cursor: pointer;
}
.grs-dot.grs-dot-active {
	background: #b0b0b0;
	width: 18px;
	border-radius: 4px;
}

/* Responsivo */
@media (max-width: 900px) {
	.grs-widget { gap: 16px; }
	.grs-header { flex-basis: 100%; }
	.grs-card { flex-basis: 260px; }
}
@media (max-width: 520px) {
	/* No mobile o card ocupa 100% da largura disponivel dentro do carrossel,
	   para nao cortar o conteudo (nada de "espiada" do proximo card), mas com
	   um espaco visivel entre os cards durante o arraste, para nao ficarem colados. */
	.grs-carousel-wrap { gap: 4px; }
	.grs-carousel { gap: 16px; padding-bottom: 10px; }
	.grs-card { flex: 0 0 100%; }
	.grs-arrow {
		width: 26px;
		height: 26px;
		font-size: 16px;
		flex-shrink: 0;
	}
}

/* ===== Admin ===== */
.grs-wrap .grs-box {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 20px 24px;
	margin: 20px 0;
	max-width: 900px;
}
.grs-table td, .grs-table th { vertical-align: middle; padding: 10px; }
.grs-drag { cursor: grab; color: #999; text-align: center; }
.grs-visible-row { background: #f6fbf3; }
.grs-tag { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.grs-tag-auto { background: #e8f0fe; color: #1a73e8; }
.grs-tag-manual { background: #fdf0e3; color: #b5651d; }
.grs-delete { color: #b32d2e; }
#grs-fetch-status.grs-ok { color: #1a7f37; }
#grs-fetch-status.grs-err { color: #b32d2e; }
