/**
 * Google Reviews Pro - Public Frontend Widget CSS
 */

.grp-pub-widget-card {
	position: fixed;
	width: 320px;
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	line-height: 1.4;
	z-index: 999999;
	transition: opacity 0.3s ease, transform 0.3s ease;
	opacity: 0;
	transform: translateY(10px);
}

.grp-pub-widget-card.grp-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Close Button */
.grp-pub-close-btn {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none !important;
	border: none !important;
	font-size: 18px !important;
	cursor: pointer;
	color: inherit;
	opacity: 0.5;
	padding: 0 !important;
	line-height: 1 !important;
	z-index: 10;
	transition: opacity 0.2s ease;
	width: 20px;
	height: 20px;
	box-shadow: none !important;
}

.grp-pub-close-btn:hover {
	opacity: 0.9;
}

/* Slider / Slides Layout */
.grp-pub-slider-container {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.grp-pub-slide {
	display: none;
	width: 100%;
}

.grp-pub-slide.active {
	display: block;
	animation: grpFadeEffect 0.5s ease;
}

@keyframes grpFadeEffect {
	from { opacity: 0; }
	to { opacity: 1; }
}

.grp-pub-slide-inner {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	transition: opacity 0.2s ease;
}
.grp-pub-slide-inner[style*="cursor: pointer"]:hover {
	opacity: 0.85;
}

/* Avatar Column */
.grp-pub-avatar-col {
	flex-shrink: 0;
}

.grp-pub-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid rgba(255,255,255,0.1);
	display: block;
}

.grp-pub-avatar-placeholder {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: rgba(120, 120, 120, 0.2);
	background-image: url('data:image/svg+xml;utf8,<svg fill="%23888888" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
	background-size: 24px;
	background-repeat: no-repeat;
	background-position: center;
	border: 1px solid rgba(255,255,255,0.1);
}

/* Body Column */
.grp-pub-body-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.grp-pub-stars {
	font-size: 15px;
	display: flex;
	gap: 2px;
	line-height: 1;
}

.grp-pub-text {
	font-style: italic;
	word-break: break-word;
	max-height: 56px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	margin-bottom: 2px;
}

/* Meta Footer inside Card */
.grp-pub-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	margin-top: 2px;
}

.grp-pub-author {
	font-weight: 600;
	opacity: 0.9;
}

.grp-pub-date {
	opacity: 0.5;
}

.grp-pub-google-logo {
	margin-left: auto;
	display: flex;
	align-items: center;
}

/* Theme Preset Classes */
.grp-theme-dark_glass {
	color: #ffffff;
}

.grp-theme-light_glass {
	color: #0f172a;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.grp-theme-light_glass .grp-pub-avatar-placeholder {
	background-color: rgba(0, 0, 0, 0.05);
}

.grp-theme-minimal_light {
	background: #ffffff !important;
	color: #0f172a !important;
	border: 1px solid #e2e8f0 !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.grp-theme-minimal_light .grp-pub-avatar-placeholder {
	background-color: rgba(0, 0, 0, 0.05);
}

/* Embedding Shortcode Layouts */
.grp-reviews-embed {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	line-height: 1.4;
	margin: 20px 0;
	width: 100%;
}

/* Shortcode Summary Header */
.grp-shortcode-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	padding: 8px 4px;
	border-bottom: 1px solid rgba(120, 120, 120, 0.1);
}

.grp-header-left {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.grp-header-google {
	font-size: 10px;
	text-transform: uppercase;
	opacity: 0.5;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.grp-header-place-name {
	font-weight: 700;
	font-size: 15px;
}

.grp-header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.grp-header-score {
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
}

.grp-header-stars {
	display: flex;
	gap: 2px;
	color: #ffb400;
	font-size: 15px;
	line-height: 1;
}

.grp-header-reviews-count {
	opacity: 0.5;
	font-size: 11px;
}

/* Grid Layout */
.grp-pub-grid {
	display: grid;
	gap: 20px;
}

.grp-pub-grid .grp-embed-card {
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border-width: 1px;
	border-style: solid;
}

/* Slider Layout */
.grp-pub-embed-slider {
	position: relative;
	width: 100%;
	min-height: 130px;
}

.grp-pub-embed-slider .grp-embed-card {
	display: none;
	width: 100%;
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border-width: 1px;
	border-style: solid;
}

.grp-pub-embed-slider .grp-embed-card.active {
	display: block;
	animation: grpFadeEffect 0.5s ease;
}

/* Theme presets inside embed (Fallbacks) */
.grp-reviews-embed.grp-theme-dark_glass .grp-embed-card {
	background: #1e293b;
	color: #ffffff;
	border-color: #334155;
}

.grp-reviews-embed.grp-theme-light_glass .grp-embed-card {
	background: #f8fafc;
	color: #0f172a;
	border-color: #e2e8f0;
}

.grp-reviews-embed.grp-theme-minimal_light .grp-embed-card {
	background: #ffffff;
	color: #0f172a;
	border-color: #cbd5e1;
}

@media (max-width: 600px) {
	.grp-shortcode-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding-bottom: 12px;
	}
	.grp-header-right {
		width: 100%;
		justify-content: space-between;
	}
}

/* Responsive CSS rules for Footer Widget */
@media (max-width: 600px) {
	.grp-hide-mobile {
		display: none !important;
	}

	/* Compact Layout (star summary sticky at bottom) */
	.grp-pub-widget-card[data-mobile-size="compact"] {
		width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		top: auto !important;
		border-radius: 0 !important;
		margin: 0 !important;
		padding: 8px 16px !important;
		box-shadow: 0 -4px 10px rgba(0,0,0,0.1) !important;
	}

	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-close-btn,
	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-avatar-col,
	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-text,
	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-date {
		display: none !important;
	}

	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-body-col {
		flex-direction: row !important;
		align-items: center !important;
		justify-content: space-between !important;
		width: 100% !important;
	}

	.grp-pub-widget-card[data-mobile-size="compact"] .grp-pub-meta {
		margin: 0 !important;
		gap: 6px !important;
	}

	/* Mobile Position Overrides for Full Cards */
	.grp-pub-widget-card[data-mobile-size="full"] {
		width: calc(100% - 32px) !important;
		left: 16px !important;
		right: 16px !important;
		margin: 0 !important;
	}

	.grp-pub-widget-card[data-mobile-size="full"][data-mobile-pos="bottom"] {
		bottom: 16px !important;
		top: auto !important;
	}

	.grp-pub-widget-card[data-mobile-size="full"][data-mobile-pos="bottom_left"] {
		bottom: 16px !important;
		left: 16px !important;
		right: auto !important;
		top: auto !important;
		width: 280px !important;
	}

	.grp-pub-widget-card[data-mobile-size="full"][data-mobile-pos="bottom_right"] {
		bottom: 16px !important;
		right: 16px !important;
		left: auto !important;
		top: auto !important;
		width: 280px !important;
	}
}

/* ============================================================
   Floating "Google icon" (bubble) + expandable popup
   ============================================================ */
#grp-widget-root { position: static; }

.grp-bubble {
	position: fixed;
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.3s ease;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.grp-bubble.grp-visible { opacity: 1; }

/* The clickable icon pill */
.grp-bubble-icon {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	color: #0f172a;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 40px;
	padding: 9px 14px 9px 11px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	line-height: 1;
}
.grp-bubble-icon:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24); }
.grp-bubble-g { display: flex; }
.grp-bubble-badge { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.grp-bubble-score { font-size: 14px; }
.grp-bubble-star { color: #ffb400; font-size: 14px; }
.grp-bubble-count { font-weight: 500; opacity: 0.55; font-size: 12px; }

/* Gentle wobble to draw attention */
.grp-bubble.grp-anim .grp-bubble-icon {
	animation: grpBubbleWobble 3.2s ease-in-out infinite;
	transform-origin: center;
}
.grp-bubble.grp-anim .grp-bubble-icon:hover,
.grp-bubble.grp-open.grp-anim .grp-bubble-icon { animation-play-state: paused; }
@keyframes grpBubbleWobble {
	0%, 85%, 100% { transform: rotate(0); }
	88% { transform: rotate(-9deg); }
	92% { transform: rotate(7deg); }
	96% { transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
	.grp-bubble.grp-anim .grp-bubble-icon { animation: none; }
}

/* The popup review card */
.grp-bubble-popup {
	position: absolute;
	width: 300px;
	max-width: calc(100vw - 32px);
	padding: 16px;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
	font-size: 13px;
	line-height: 1.4;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}
.grp-bubble.grp-open .grp-bubble-popup {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
.grp-bubble-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none !important;
	border: none !important;
	font-size: 18px !important;
	line-height: 1 !important;
	color: inherit;
	opacity: 0.5;
	cursor: pointer;
	padding: 0 !important;
	width: 20px;
	height: 20px;
	box-shadow: none !important;
	z-index: 2;
}
.grp-bubble-close:hover { opacity: 0.9; }

/* Popup open direction relative to the icon */
.grp-bubble.grp-pop-up .grp-bubble-popup { bottom: calc(100% + 12px); }
.grp-bubble.grp-pop-down .grp-bubble-popup { top: calc(100% + 12px); }
.grp-bubble.grp-pop-right .grp-bubble-popup { right: 0; }
.grp-bubble.grp-pop-left .grp-bubble-popup { left: 0; }
.grp-bubble.grp-pop-center .grp-bubble-popup { left: 50%; transform: translateX(-50%) translateY(8px) scale(0.98); }
.grp-bubble.grp-pop-center.grp-open .grp-bubble-popup { transform: translateX(-50%) translateY(0) scale(1); }
