/* =============================================================
   VNP Google Places — Frontend Styles
   Loads on every public page when the plugin is active.
   Uses BEM naming under .vnp-reviews and .vnp-nearby to
   avoid conflicts with Elementor or other theme styles.
   ============================================================= */

/* ── Shared utility ─────────────────────────────────────────── */

.vnp-notice {
	color: #666;
	font-style: italic;
	font-size: 0.9rem;
}

/* ── Google Reviews widget ──────────────────────────────────── */

.vnp-reviews {
	font-family: inherit;
	margin: 1.5rem 0;
}

.vnp-reviews__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e0e0e0;
}

.vnp-reviews__overall {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.vnp-reviews__score {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: #111;
}

.vnp-reviews__stars {
	font-size: 1.2rem;
	color: #F4B400;
	letter-spacing: 1px;
}

.vnp-reviews__count {
	font-size: 0.85rem;
	color: #555;
}

.vnp-reviews__link {
	font-size: 0.85rem;
	color: #4285F4;
	text-decoration: none;
	white-space: nowrap;
}

.vnp-reviews__link:hover {
	text-decoration: underline;
}

/* Card grid */

.vnp-reviews__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.vnp-reviews__card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 1rem;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s ease;
}

.vnp-reviews__card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.vnp-reviews__card-header {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

/* Avatar */

.vnp-reviews__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.vnp-reviews__avatar--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #4285F4;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	flex-shrink: 0;
}

.vnp-reviews__author-info {
	flex: 1;
	min-width: 0;
}

.vnp-reviews__author {
	font-weight: 600;
	font-size: 0.875rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vnp-reviews__author a {
	color: inherit;
	text-decoration: none;
}

.vnp-reviews__author a:hover {
	text-decoration: underline;
}

.vnp-reviews__date {
	font-size: 0.775rem;
	color: #888;
	margin-top: 1px;
}

.vnp-reviews__card-stars {
	margin-left: auto;
	color: #F4B400;
	font-size: 0.85rem;
	flex-shrink: 0;
	letter-spacing: 1px;
}

.vnp-reviews__text {
	font-size: 0.865rem;
	color: #444;
	line-height: 1.55;
	margin: 0;
	/* Clamp to 4 lines with a fade — no JS required */
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Google badge */

.vnp-reviews__badge {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 1rem;
	font-size: 0.75rem;
	color: #888;
}

.vnp-reviews__badge img {
	vertical-align: middle;
}

/* ── Nearby places widget ────────────────────────────────────── */

.vnp-nearby {
	margin: 1.5rem 0;
}

.vnp-nearby__title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 1rem;
}

.vnp-nearby__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.vnp-nearby__card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.vnp-nearby__card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.vnp-nearby__card-body {
	padding: 0.9rem 1rem;
}

.vnp-nearby__name {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3rem;
	line-height: 1.3;
}

.vnp-nearby__name a {
	color: inherit;
	text-decoration: none;
}

.vnp-nearby__name a:hover {
	color: #4285F4;
}

.vnp-nearby__rating {
	font-size: 0.85rem;
	margin-bottom: 0.25rem;
}

.vnp-nearby__rating-score {
	color: #F4B400;
	font-weight: 600;
}

.vnp-nearby__rating-count {
	color: #888;
	font-size: 0.8rem;
}

.vnp-nearby__address {
	font-size: 0.78rem;
	color: #666;
	margin-bottom: 0.4rem;
	line-height: 1.35;
}

.vnp-nearby__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 0.4rem;
}

.vnp-nearby__price {
	font-size: 0.8rem;
	color: #2e7d32;
	font-weight: 700;
}

.vnp-nearby__open {
	font-size: 0.72rem;
	background: #e8f5e9;
	color: #2e7d32;
	padding: 2px 7px;
	border-radius: 20px;
	font-weight: 600;
}

.vnp-nearby__closed {
	font-size: 0.72rem;
	background: #fce4ec;
	color: #c62828;
	padding: 2px 7px;
	border-radius: 20px;
	font-weight: 600;
}

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

@media (max-width: 600px) {
	.vnp-reviews__grid,
	.vnp-nearby__grid {
		grid-template-columns: 1fr;
	}

	.vnp-reviews__score {
		font-size: 1.6rem;
	}
}
