/* NP Google Reviews — frontend styles */

/* ── Shared card ───────────────────────────────────────────── */

.np-gr-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
	padding: 1.25rem 1.5rem;
	box-sizing: border-box;
	min-width: 0; /* prevent overflow in flex/grid contexts */
}

.np-gr-author {
	display: block;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.25rem;
	color: #1a1a1a;
}

.np-gr-stars {
	display: inline-block;
	margin-bottom: 0.25rem;
	line-height: 1;
}

.np-gr-star {
	font-size: 1.15rem;
	color: #ccc;
}

.np-gr-star.filled {
	color: #f5a623;
}

.np-gr-date {
	display: block;
	font-size: 0.8rem;
	color: #888;
	margin-bottom: 0.6rem;
}

.np-gr-text {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 400;
	color: #333;
	line-height: 1.55;
}

.np-gr-read-more {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
}

.np-gr-read-more a {
	color: #555;
	text-decoration: underline;
}

.np-gr-read-more a:hover {
	color: #111;
}

.np-gr-empty {
	color: #666;
	font-style: italic;
}

/* ── Column layout ─────────────────────────────────────────── */

.np-gr-reviews {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* Card width in column mode comes from --np-gr-cw set on the wrapper. */
.np-gr-reviews .np-gr-card {
	max-width: var( --np-gr-cw, 680px );
	width: 100%;
}

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

.np-gr-carousel {
	position: relative;
	width: 100%;
	border: none;
	box-shadow: none;
	outline: none;
}

.np-gr-carousel:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 3px;
}

.np-gr-carousel-track-outer {
	overflow: hidden;
}

.np-gr-carousel-track {
	display: flex;
	gap: 1rem;
	transition: transform 0.35s ease;
	will-change: transform;
}

/*
 * Card width comes from --np-gr-cw on the carousel container.
 * JS also clamps this to the visible container width on narrow screens.
 */
.np-gr-carousel-track .np-gr-card {
	flex: 0 0 var( --np-gr-cw, 300px );
	width: var( --np-gr-cw, 300px );
	max-width: 100%; /* can't exceed the track-outer on any screen */
	flex-shrink: 0;
	box-sizing: border-box;
}

.np-gr-carousel-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1rem;
}

.np-gr-prev,
.np-gr-next {
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	cursor: pointer;
	font-size: 1.3rem;
	line-height: 1;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	transition: border-color 0.15s, color 0.15s;
}

.np-gr-prev:hover,
.np-gr-next:hover {
	border-color: #888;
	color: #111;
}

.np-gr-dots {
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.np-gr-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d5d5d5;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, transform 0.2s;
	flex-shrink: 0;
}

.np-gr-dot.active {
	background: #555;
	transform: scale(1.25);
}

.np-gr-dot:hover {
	background: #888;
}

/* ── Mobile ───────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.np-gr-reviews {
		gap: 1rem;
	}

	/* Column: ignore --np-gr-cw and fill the container. */
	.np-gr-reviews .np-gr-card {
		max-width: 100%;
		padding: 1rem 1.1rem;
	}

	.np-gr-author {
		font-size: 0.95rem;
	}

	.np-gr-text {
		font-size: 0.9rem;
	}

	/* Carousel: JS will set the card width, but cap here as a fallback. */
	.np-gr-carousel-track .np-gr-card {
		max-width: 100%;
		padding: 1rem 1.1rem;
	}
}
