/* Social Proof — спливне сповіщення. Кольори й заокруглення задаються змінними з налаштувань. */

.zsp-popup {
	--zsp-gap: 20px;
	position: fixed;
	z-index: 99999;
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	width: 360px;
	max-width: calc(100vw - 2 * var(--zsp-gap));
	background: var(--zsp-bg, #fff);
	color: var(--zsp-text, #000);
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: var(--zsp-radius, 8px);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.zsp-popup.zsp-shadow {
	box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}
.zsp-popup.zsp-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition: opacity .35s ease, transform .35s ease, visibility 0s;
}

.zsp-pos-bottom-left  { left: var(--zsp-gap);  bottom: var(--zsp-gap); }
.zsp-pos-bottom-right { right: var(--zsp-gap); bottom: var(--zsp-gap); }
.zsp-pos-top-left     { left: var(--zsp-gap);  top: var(--zsp-gap); }
.zsp-pos-top-right    { right: var(--zsp-gap); top: var(--zsp-gap); }
.admin-bar .zsp-pos-top-left,
.admin-bar .zsp-pos-top-right { top: calc(var(--zsp-gap) + 32px); }

.zsp-anim-slide.zsp-pos-bottom-left,
.zsp-anim-slide.zsp-pos-bottom-right { transform: translateY(24px); }
.zsp-anim-slide.zsp-pos-top-left,
.zsp-anim-slide.zsp-pos-top-right { transform: translateY(-24px); }

.zsp-popup .zsp-inner {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 12px 14px;
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}
.zsp-popup a.zsp-inner:hover,
.zsp-popup a.zsp-inner:focus {
	color: inherit;
	text-decoration: none;
}
.zsp-popup a.zsp-inner:hover .zsp-title {
	text-decoration: underline;
}

.zsp-popup .zsp-image {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #f0f0f0;
	color: #000;
	border-radius: 50%;
}
.zsp-shape-rounded .zsp-image { border-radius: 8px; }
.zsp-shape-square .zsp-image  { border-radius: 0; }
.zsp-popup .zsp-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}
.zsp-popup .zsp-image.zsp-letter {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 600;
}

.zsp-popup .zsp-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 2px;
}
.zsp-popup .zsp-line {
	display: block;
	overflow-wrap: anywhere;
}
.zsp-popup .zsp-line2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.zsp-popup .zsp-name,
.zsp-popup .zsp-title {
	font-weight: 600;
}
.zsp-popup .zsp-title {
	color: var(--zsp-title, #000);
}
.zsp-popup .zsp-time {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	opacity: .65;
}
.zsp-popup .zsp-stars {
	color: var(--zsp-star, #f5a623);
	letter-spacing: 1px;
	white-space: nowrap;
}
.zsp-popup .zsp-stars-off {
	color: #d0d0d0;
}

.zsp-popup .zsp-close {
	flex: 0 0 auto;
	align-self: flex-start;
	margin: 0;
	padding: 4px 8px 8px;
	border: 0;
	background: none;
	color: inherit;
	font: 400 20px/1 Arial, sans-serif;
	opacity: .5;
	cursor: pointer;
	box-shadow: none;
}
.zsp-popup .zsp-close:hover,
.zsp-popup .zsp-close:focus-visible {
	opacity: 1;
	background: none;
	color: inherit;
}

@media (max-width: 600px) {
	.zsp-popup {
		--zsp-gap: 10px;
		left: var(--zsp-gap);
		right: var(--zsp-gap);
		width: auto;
		max-width: none;
	}
	.zsp-popup.zsp-hide-mobile {
		display: none;
	}
	.admin-bar .zsp-pos-top-left,
	.admin-bar .zsp-pos-top-right { top: calc(var(--zsp-gap) + 46px); }
}

@media (prefers-reduced-motion: reduce) {
	.zsp-popup,
	.zsp-popup.zsp-visible {
		transform: none;
		transition: none;
	}
}

/* Перегляд на сторінці налаштувань: сповіщення стоїть у блоці, а не в куті екрана. */
.zsp-popup.zsp-preview {
	position: relative;
	inset: auto;
	transform: none;
	display: flex;
}
