/**
 * CommerceForge UI - Sales Notification (Social Proof FOMO) Styles
 *
 * Clean, hardware-accelerated CSS animations with backdrop blur and responsive positioning.
 */

.cforge-sales-notification {
	position: fixed;
	z-index: 99998;
	pointer-events: none;
	max-width: calc(100vw - 32px);
	width: 360px;
	margin: 16px;
	font-family: inherit;
}

/* Positions */
.cforge-sales-notification--bottom-left {
	bottom: 0;
	left: 0;
}

.cforge-sales-notification--bottom-right {
	bottom: 0;
	right: 0;
}

.cforge-sales-notification--top-left {
	top: 0;
	left: 0;
}

.cforge-sales-notification--top-right {
	top: 0;
	right: 0;
}

/* Card Container */
.cforge-sales-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
	pointer-events: auto;
	box-sizing: border-box;
	overflow: hidden;
	opacity: 0;
	transform: translate3d(0, 20px, 0) scale(0.96);
	transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
	            transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cforge-sales-notification--top-left .cforge-sales-card,
.cforge-sales-notification--top-right .cforge-sales-card {
	transform: translate3d(0, -20px, 0) scale(0.96);
}

/* Active State (Visible) */
.cforge-sales-card.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
}

/* Exit State */
.cforge-sales-card.is-hiding {
	opacity: 0;
	transform: translate3d(0, 16px, 0) scale(0.95);
	pointer-events: none;
}

/* Thumbnail */
.cforge-sales-card__thumb-link {
	display: block;
	flex-shrink: 0;
	width: 58px;
	height: 58px;
	border-radius: 8px;
	overflow: hidden;
	background-color: #f3f4f6;
	text-decoration: none;
}

.cforge-sales-card__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.cforge-sales-card__thumb-link:hover .cforge-sales-card__thumb {
	transform: scale(1.05);
}

/* Content */
.cforge-sales-card__content {
	flex: 1;
	min-width: 0;
}

.cforge-sales-card__headline {
	font-size: 13px;
	line-height: 1.35;
	color: #1f2937;
	margin: 0 0 2px 0;
	font-weight: 500;
}

.cforge-sales-card__buyer {
	font-weight: 700;
	color: #111827;
}

.cforge-sales-card__location {
	color: #4b5563;
}

.cforge-sales-card__product-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 210px;
	margin-bottom: 4px;
	transition: color 0.2s ease;
}

.cforge-sales-card__product-title:hover {
	color: #2563eb;
	text-decoration: underline;
}

/* Meta Footer */
.cforge-sales-card__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: #6b7280;
	line-height: 1;
}

.cforge-sales-card__verified {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #059669;
	font-weight: 600;
}

.cforge-sales-card__verified svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.cforge-sales-card__separator {
	opacity: 0.4;
}

/* Close Button */
button.cforge-sales-card__close,
.cforge-sales-card__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	min-width: 0 !important;
	min-height: 0 !important;
	border: none !important;
	background: transparent !important;
	color: #9ca3af !important;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50% !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	box-shadow: none !important;
	transition: color 0.15s ease, background 0.15s ease;
}

button.cforge-sales-card__close:hover,
button.cforge-sales-card__close:focus-visible,
.cforge-sales-card__close:hover,
.cforge-sales-card__close:focus-visible {
	color: #374151 !important;
	background: rgba(0, 0, 0, 0.08) !important;
	outline: none !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
	.cforge-sales-notification {
		width: calc(100vw - 24px);
		margin: 12px;
	}

	.cforge-sales-card__product-title {
		max-width: calc(100vw - 140px);
	}
}
