/* ==========================================================================
   Revive Sales Alert — styles
   Edit the variables below to customise the notification.
   ========================================================================== */

:root {
	/* Size & layout */
	--nevell-as-width: 330px;
	--nevell-as-width-mobile: 100%;
	--nevell-as-padding: 8px;
	--nevell-as-gap: 10px;
	--nevell-as-radius: 14px;
	--nevell-as-border-width: 1.5px;
	--nevell-as-z-index: 99999;

	/* Position (bottom-left) */
	--nevell-as-offset-bottom: 20px;
	--nevell-as-offset-left: 20px;
	--nevell-as-offset-mobile: 10px;

	/* Colors */
	--nevell-as-bg: #ffffff;
	--nevell-as-border: #8dc63f;
	--nevell-as-text: #111111;
	--nevell-as-muted: #8c8c8c;
	--nevell-as-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	--nevell-as-thumb-bg: #eeeeee;
	--nevell-as-badge-bg: #efefef;
	--nevell-as-verified: #1a6cf0;
	--nevell-as-close-bg: #ececec;
	--nevell-as-close-color: #9a9a9a;

	/* Typography */
	--nevell-as-font: Inter, sans-serif;
	--nevell-as-font-size: 14px;
	--nevell-as-line-height: 1.3;
	--nevell-as-meta-size: 10px;
	--nevell-as-weight-strong: 600;

	/* Product image */
	--nevell-as-img-size: 56px;
	--nevell-as-img-height: 60px;
	--nevell-as-img-radius: 4px;

	/* Close button */
	--nevell-as-close-size: 20px;
	--nevell-as-close-icon: 12px;
	--nevell-as-close-offset: 6px;

	/* Badge */
	--nevell-as-check-size: 12px;

	/* Animation */
	--nevell-as-duration: 0.3s;
	--nevell-as-easing: cubic-bezier(0.22, 1, 0.36, 1);
	--nevell-as-slide-distance: 18px;
}

/* ---------- Container ---------- */
.nevell-as {
	position: fixed;
	bottom: var(--nevell-as-offset-bottom);
	left: var(--nevell-as-offset-left);
	z-index: var(--nevell-as-z-index);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: var(--nevell-as-gap);
	width: var(--nevell-as-width);
	max-width: calc(100vw - (var(--nevell-as-offset-mobile) * 2));
	padding: var(--nevell-as-padding);
	background: var(--nevell-as-bg);
	border: var(--nevell-as-border-width) solid var(--nevell-as-border);
	border-radius: var(--nevell-as-radius);
	box-shadow: var(--nevell-as-shadow);
	font-family: var(--nevell-as-font);
	font-size: var(--nevell-as-font-size);
	line-height: var(--nevell-as-line-height);
	color: var(--nevell-as-text);
	/* Slide Up: start slightly below, hidden */
	opacity: 0;
	visibility: hidden;
	transform: translateY(var(--nevell-as-slide-distance));
	transition:
		opacity var(--nevell-as-duration) var(--nevell-as-easing),
		transform var(--nevell-as-duration) var(--nevell-as-easing),
		visibility 0s linear var(--nevell-as-duration);
	pointer-events: none;
}

.nevell-as *,
.nevell-as *::before,
.nevell-as *::after {
	box-sizing: border-box;
}

.nevell-as.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0s;
	pointer-events: auto;
}

/* ---------- Thumbnail ---------- */
.nevell-as__thumb {
	flex: 0 0 var(--nevell-as-img-size);
	width: var(--nevell-as-img-size);
	height: var(--nevell-as-img-height);
	background: var(--nevell-as-thumb-bg);
	border-radius: var(--nevell-as-img-radius);
	overflow: hidden;
	display: block;
}

.nevell-as__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
	border: 0;
}

/* ---------- Text ---------- */
.nevell-as__body {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: calc(var(--nevell-as-close-size) * 0.5);
}

.nevell-as__text {
	margin: 0 0 6px;
	padding: 0;
	font-size: var(--nevell-as-font-size);
	line-height: var(--nevell-as-line-height);
	color: var(--nevell-as-text);
}

.nevell-as__strong {
	font-weight: var(--nevell-as-weight-strong);
	color: var(--nevell-as-text);
}

.nevell-as__muted {
	color: var(--nevell-as-muted);
}

/* ---------- Meta row ---------- */
.nevell-as__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: var(--nevell-as-meta-size);
	color: var(--nevell-as-muted);
}

.nevell-as__badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px 2px 4px;
	background: var(--nevell-as-badge-bg);
	border-radius: 999px;
	white-space: nowrap;
}

.nevell-as__check {
	width: var(--nevell-as-check-size);
	height: var(--nevell-as-check-size);
	color: var(--nevell-as-verified);
	flex: none;
}

.nevell-as__time {
	white-space: nowrap;
}

/* ---------- Close button ---------- */
.nevell-as__close {
	position: absolute;
	top: var(--nevell-as-close-offset);
	right: var(--nevell-as-close-offset);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--nevell-as-close-size);
	height: var(--nevell-as-close-size);
	margin: 0;
	padding: 0;
	background: var(--nevell-as-close-bg);
	color: var(--nevell-as-close-color);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	line-height: 1;
	box-shadow: none;
}

.nevell-as__close svg {
	width: var(--nevell-as-close-icon);
	height: var(--nevell-as-close-icon);
}

.nevell-as__close:hover,
.nevell-as__close:focus-visible {
	color: var(--nevell-as-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.nevell-as {
		left: var(--nevell-as-offset-mobile);
		bottom: var(--nevell-as-offset-mobile);
		width: var(--nevell-as-width-mobile);
		max-width: min(280px, calc(100vw - (var(--nevell-as-offset-mobile) * 2)));
		gap: 8px;
		padding: 6px;
		border-radius: 10px;
		font-size: 12px;
	}

	.nevell-as__thumb {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

	.nevell-as__body {
		padding-right: 14px;
	}

	.nevell-as__text {
		margin-bottom: 4px;
		font-size: 12px;
		line-height: 1.25;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.nevell-as__meta {
		font-size: 9px;
		gap: 4px;
		flex-wrap: nowrap;
	}

	.nevell-as__badge {
		gap: 3px;
		padding: 1px 6px 1px 3px;
		min-width: 0;
	}

	.nevell-as__badge svg {
		width: 14px;
		height: 14px;
		flex: none;
	}

	.nevell-as__time {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.nevell-as__close {
		top: 4px;
		right: 4px;
		width: 16px;
		height: 16px;
	}

	.nevell-as__close svg {
		width: 10px;
		height: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nevell-as {
		transition-duration: 0.01s;
		transform: none;
	}
}
