/* Google Reviews Toasts — frontend styles */

.grt-container {
	position: fixed;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: min(380px, calc(100vw - 32px));
	pointer-events: none;
	--grt-accent: #1a73e8;
	--grt-radius: 14px;
	--grt-bg: #ffffff;
	--grt-fg: #1f2430;
	--grt-fg-soft: #6b7280;
	--grt-border: rgba(15, 23, 42, 0.08);
	--grt-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
	--grt-star: #fbbc04;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo", "Assistant", "Rubik", Roboto, Arial, sans-serif;
	text-align: start;
}

.grt-container[data-position="bottom-left"]  { left: 20px;  bottom: 20px; }
.grt-container[data-position="bottom-right"] { right: 20px; bottom: 20px; }
.grt-container[data-position="top-left"]     { left: 20px;  top: 20px; }
.grt-container[data-position="top-right"]    { right: 20px; top: 20px; }

.grt-container[data-theme="dark"] {
	--grt-bg: #16181d;
	--grt-fg: #f3f4f6;
	--grt-fg-soft: #9ca3af;
	--grt-border: rgba(255, 255, 255, 0.09);
	--grt-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.grt-container[data-theme="glass"] {
	--grt-bg: rgba(255, 255, 255, 0.72);
	--grt-fg: #111827;
	--grt-fg-soft: #4b5563;
	--grt-border: rgba(255, 255, 255, 0.55);
	--grt-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.grt-toast {
	pointer-events: auto;
	background: var(--grt-bg);
	color: var(--grt-fg);
	border: 1px solid var(--grt-border);
	border-radius: var(--grt-radius);
	box-shadow: var(--grt-shadow);
	padding: 14px 16px 14px 14px;
	display: grid;
	grid-template-columns: 44px 1fr 24px;
	grid-column-gap: 12px;
	column-gap: 12px;
	align-items: start;
	position: relative;
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
	            transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.grt-container[data-position^="top"] .grt-toast {
	transform: translateY(-12px) scale(0.98);
}

.grt-toast.grt-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.grt-toast.grt-leaving {
	opacity: 0;
	transform: translateY(6px) scale(0.97);
}

.grt-container[data-theme="glass"] .grt-toast {
	backdrop-filter: blur(14px) saturate(1.4);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
}

/* פס הדגשה — בצד הפתיחה (ימין ב-RTL) */
.grt-toast::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--grt-accent);
	border-start-start-radius: 3px;
	border-end-start-radius: 3px;
}

.grt-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--grt-border);
	flex-shrink: 0;
}

.grt-avatar-fallback {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 17px;
	color: #fff;
	background: var(--grt-accent);
	user-select: none;
}

.grt-body { min-width: 0; }

.grt-header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 2px;
}

.grt-author {
	font-weight: 650;
	font-size: 14px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grt-time {
	font-size: 12px;
	color: var(--grt-fg-soft);
	white-space: nowrap;
}

.grt-stars {
	display: inline-flex;
	gap: 1px;
	margin: 2px 0 4px;
	line-height: 1;
}

.grt-star {
	width: 14px;
	height: 14px;
	fill: var(--grt-star);
}

.grt-star--empty {
	fill: var(--grt-fg-soft);
	opacity: 0.35;
}

.grt-text {
	font-size: 13px;
	line-height: 1.45;
	color: var(--grt-fg);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.grt-source {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 7px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--grt-fg-soft);
	text-decoration: none;
}

.grt-source:hover { color: var(--grt-accent); }

.grt-source svg { width: 13px; height: 13px; }

.grt-close {
	appearance: none;
	background: transparent;
	border: 0;
	padding: 2px;
	margin-block-start: -2px;
	margin-inline-end: -4px;
	cursor: pointer;
	color: var(--grt-fg-soft);
	border-radius: 6px;
	line-height: 0;
	transition: color 0.15s ease, background 0.15s ease;
}

.grt-close:hover,
.grt-close:focus-visible {
	color: var(--grt-fg);
	background: var(--grt-border);
	outline: none;
}

.grt-close svg { width: 16px; height: 16px; display: block; }

/* --- Purchase toasts --- */

.grt-product-img {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--grt-border);
	border: 1px solid var(--grt-border);
	flex-shrink: 0;
}

.grt-location {
	font-size: 12px;
	color: var(--grt-fg-soft);
	margin: -1px 0 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grt-purchase-line {
	-webkit-line-clamp: 2;
}

.grt-purchase-line strong { font-weight: 650; }

.grt-product-link {
	font-weight: 650;
	color: var(--grt-fg);
	text-decoration: none;
	border-bottom: 1px solid var(--grt-accent);
}

.grt-product-link:hover { color: var(--grt-accent); }

.grt-toast--purchase .grt-source { cursor: default; }
.grt-toast--purchase .grt-source svg { stroke: var(--grt-accent); }
.grt-toast--purchase .grt-source:hover { color: var(--grt-fg-soft); }

@media (max-width: 480px) {
	.grt-container[data-position="bottom-left"],
	.grt-container[data-position="bottom-right"] { left: 16px; right: 16px; bottom: 16px; }
	.grt-container[data-position="top-left"],
	.grt-container[data-position="top-right"]   { left: 16px; right: 16px; top: 16px; }
	.grt-container { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.grt-toast { transition: opacity 0.2s linear; transform: none !important; }
}
