/* =============================================================================
 * Storzen Sales Notifications — Frontend Styles
 * Scoped under .storzen-sn-*
 * ============================================================================= */

.storzen-sn-container {
	--szsn-bg:     #ffffff;
	--szsn-text:   #1f2937;
	--szsn-accent: #7c3aed;
	--szsn-radius: 10px;

	position: fixed;
	z-index: 99998;
	max-width: 340px;
	box-sizing: border-box;
	pointer-events: none;
}

.storzen-sn-container * { box-sizing: border-box; }

/* Positions */
.storzen-sn-container--bottom-left  { bottom: 20px; left: 20px; }
.storzen-sn-container--bottom-right { bottom: 20px; right: 20px; }
.storzen-sn-container--top-left     { top: 20px; left: 20px; }
.storzen-sn-container--top-right    { top: 20px; right: 20px; }

/* Individual notification */
.storzen-sn-item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--szsn-bg);
	color: var(--szsn-text);
	border-radius: var(--szsn-radius);
	padding: 12px 14px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	pointer-events: auto;
	min-width: 280px;
	max-width: 340px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: opacity 0.3s, transform 0.3s;
}

/* Avatar / thumb */
.storzen-sn-item__avatar {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #f3f4f6;
	flex-shrink: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.storzen-sn-item__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.storzen-sn-item__avatar--placeholder {
	background: var(--szsn-accent);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}

/* Body */
.storzen-sn-item__body { flex: 1; min-width: 0; }

.storzen-sn-item__message {
	font-size: 13px;
	font-weight: 500;
	color: var(--szsn-text);
	line-height: 1.4;
	margin-bottom: 3px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.storzen-sn-item__product-link {
	color: var(--szsn-accent);
	text-decoration: none;
	font-weight: 600;
}

.storzen-sn-item__product-link:hover { text-decoration: underline; }

.storzen-sn-item__time {
	font-size: 11px;
	color: #9ca3af;
	display: flex;
	align-items: center;
	gap: 4px;
}

.storzen-sn-item__time::before {
	content: '✓';
	color: #16a34a;
	font-weight: 700;
}

/* Close button */
.storzen-sn-item__close {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	color: #6b7280;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.storzen-sn-item__close:hover { background: rgba(0, 0, 0, 0.1); }

.storzen-sn-item { position: relative; }

/* ── Animations ────────────────────────────────────────────────────────────── */

/* Slide up (default for bottom positions) */
.storzen-sn-container--slide-up .storzen-sn-item {
	transform: translateY(20px);
	opacity: 0;
}
.storzen-sn-container--slide-up .storzen-sn-item.is-visible {
	transform: translateY(0);
	opacity: 1;
}
.storzen-sn-container--slide-up .storzen-sn-item.is-hiding {
	transform: translateY(10px);
	opacity: 0;
}

/* Slide from side */
.storzen-sn-container--bottom-left.storzen-sn-container--slide-side .storzen-sn-item,
.storzen-sn-container--top-left.storzen-sn-container--slide-side .storzen-sn-item {
	transform: translateX(-30px); opacity: 0;
}
.storzen-sn-container--bottom-right.storzen-sn-container--slide-side .storzen-sn-item,
.storzen-sn-container--top-right.storzen-sn-container--slide-side .storzen-sn-item {
	transform: translateX(30px); opacity: 0;
}
.storzen-sn-container--slide-side .storzen-sn-item.is-visible {
	transform: translateX(0); opacity: 1;
}
.storzen-sn-container--slide-side .storzen-sn-item.is-hiding {
	opacity: 0;
}

/* Fade */
.storzen-sn-container--fade .storzen-sn-item { opacity: 0; }
.storzen-sn-container--fade .storzen-sn-item.is-visible { opacity: 1; }
.storzen-sn-container--fade .storzen-sn-item.is-hiding { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
	.storzen-sn-item { transition: opacity 0.15s; transform: none !important; }
}

/* Mobile — push to edges */
@media (max-width: 480px) {
	.storzen-sn-container--bottom-left,
	.storzen-sn-container--bottom-right {
		bottom: 10px;
		left: 10px;
		right: 10px;
		max-width: none;
	}
	.storzen-sn-container--top-left,
	.storzen-sn-container--top-right {
		top: 10px;
		left: 10px;
		right: 10px;
		max-width: none;
	}
	.storzen-sn-item {
		min-width: 0;
		max-width: none;
	}
}

/* Hidden data script — never visible */
.storzen-sn-data { display: none; }
