/**
 * VIP Sales Pop Frontend Styles
 */

/* Popup Container */
.vsp-popup-container {
	position: fixed;
	z-index: 999999;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 380px;
	max-width: calc(100% - 32px);
	background: var(--vsp-bg, #ffffff);
	color: var(--vsp-text, #1e293b);
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.03);
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
	opacity: 0;
	pointer-events: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Glassmorphism backing blur overrides */
.vsp-popup-container.vsp-glass {
	background: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Dark mode compatibility adaptation if background is dark */
@media (prefers-color-scheme: dark) {
	.vsp-popup-container.vsp-glass {
		background: rgba(15, 23, 42, 0.8);
		border: 1px solid rgba(255, 255, 255, 0.1);
	}
}

/* Active Show State */
.vsp-popup-container.vsp-show {
	opacity: 1;
	transform: translate3d(0, 0, 0) !important;
	pointer-events: auto;
}

/* Positions styling & animations setup */
.vsp-popup-container.vsp-bottom-left {
	bottom: 24px;
	left: 24px;
	transform: translate3d(-40px, 0, 0);
}

.vsp-popup-container.vsp-bottom-right {
	bottom: 24px;
	right: 24px;
	transform: translate3d(40px, 0, 0);
}

.vsp-popup-container.vsp-top-left {
	top: 24px;
	left: 24px;
	transform: translate3d(-40px, 0, 0);
}

.vsp-popup-container.vsp-top-right {
	top: 24px;
	right: 24px;
	transform: translate3d(40px, 0, 0);
}

/* Inner Layout */
.vsp-image-column {
	flex-shrink: 0;
	margin-right: 14px;
	display: flex;
	align-items: center;
}

.vsp-product-image {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	object-fit: cover;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.05);
	background: #f1f5f9;
}

.vsp-content-column {
	flex-grow: 1;
	padding-right: 16px;
	min-width: 0; /* allows text truncation/wrap safely */
}

/* Typography styles */
.vsp-title-row {
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 2px;
	color: #64748b;
}

/* Auto adapt detail color to light/dark balance */
.vsp-buyer-name {
	font-weight: 700;
	color: var(--vsp-text, #1e293b);
}

.vsp-action-text {
	color: #64748b;
	margin-left: 3px;
}

.vsp-product-link {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--vsp-link, #2563eb);
	text-decoration: none;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: opacity 0.15s ease;
}

.vsp-product-link:hover {
	opacity: 0.85;
	text-decoration: underline;
}

/* Meta Bottom Row */
.vsp-meta-row {
	display: flex;
	align-items: center;
	font-size: 11px;
	color: #94a3b8;
	gap: 8px;
}

.vsp-verified-badge {
	display: inline-flex;
	align-items: center;
	color: var(--vsp-accent, #16a34a);
	font-weight: 600;
	gap: 3px;
}

.vsp-verified-icon {
	width: 14px;
	height: 14px;
	fill: currentColor;
	flex-shrink: 0;
}

/* Close button */
.vsp-close-btn {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #94a3b8;
	transition: color 0.15s ease, background 0.15s ease;
	border-radius: 50%;
	background: transparent;
	border: none;
	padding: 0;
}

.vsp-close-btn:hover {
	color: #475569;
	background: rgba(0, 0, 0, 0.05);
}

.vsp-close-btn svg {
	width: 10px;
	height: 10px;
	fill: currentColor;
}

/* Responsive Scaling for Mobile Screens */
@media (max-width: 480px) {
	.vsp-popup-container {
		width: calc(100% - 24px) !important;
		max-width: 400px;
		margin: 0 auto;
	}
	
	.vsp-popup-container.vsp-bottom-left,
	.vsp-popup-container.vsp-bottom-right {
		bottom: 16px;
		left: 12px;
		right: 12px;
		transform: translate3d(0, 30px, 0);
	}
	
	.vsp-popup-container.vsp-top-left,
	.vsp-popup-container.vsp-top-right {
		top: 16px;
		left: 12px;
		right: 12px;
		transform: translate3d(0, -30px, 0);
	}
}
