/**
 * ASE — Notifications de popularité.
 * Scoped styles, no global element selectors.
 */

.ase-sn {
	position: fixed;
	z-index: 99980;
	max-width: 380px;
	width: calc(100vw - 32px);
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0ms linear 260ms;
	pointer-events: none;
	font-family: inherit;
	color: #111827;
	-webkit-font-smoothing: antialiased;
}

.ase-sn--bottom-left {
	bottom: calc(24px + var(--ase-sn-banner-offset, 0px));
	left: 24px;
}

.ase-sn--bottom-right {
	bottom: calc(24px + var(--ase-sn-banner-offset, 0px));
	right: 24px;
}

.ase-sn--top-left {
	top: 24px;
	left: 24px;
	transform: translateY(-14px);
}

.ase-sn--top-right {
	top: 24px;
	right: 24px;
	transform: translateY(-14px);
}

.ase-sn.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0ms linear 0ms;
}

.ase-sn.is-leaving {
	opacity: 0;
	transform: translateY(10px);
}

.ase-sn--top-left.is-leaving,
.ase-sn--top-right.is-leaving {
	transform: translateY(-10px);
}

.ase-sn__card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 36px 12px 12px;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.06);
	border-radius: 12px;
	box-shadow: 0 12px 34px rgba(17, 24, 39, 0.16), 0 2px 8px rgba(17, 24, 39, 0.05);
	pointer-events: auto;
	box-sizing: border-box;
}

.ase-sn__link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
	text-decoration: none;
	color: inherit;
}

.ase-sn__link:focus-visible {
	outline: 2px solid #006800;
	outline-offset: 3px;
	border-radius: 8px;
}

.ase-sn__media {
	width: 64px;
	height: 64px;
	flex: 0 0 64px;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
}

.ase-sn__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.ase-sn__body {
	min-width: 0;
	flex: 1 1 auto;
}

.ase-sn__eyebrow {
	display: block;
	margin: 0 0 3px;
	font-size: 9.5px;
	line-height: 1.3;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b7280;
}

.ase-sn__text {
	display: block;
	margin: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: #4b5563;
}

.ase-sn__product {
	display: block;
	margin: 2px 0 0;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 800;
	color: #111827;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ase-sn__footer {
	display: block;
	margin: 5px 0 0;
	font-size: 10.5px;
	line-height: 1.4;
	color: #6b7280;
}

.ase-sn__close {
	position: absolute;
	top: 7px;
	right: 7px;
	width: 24px;
	height: 24px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7280;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.ase-sn__close:hover,
.ase-sn__close:focus-visible {
	background: #f3f4f6;
	color: #111827;
}

.ase-sn__close:focus-visible {
	outline: 2px solid #006800;
	outline-offset: 1px;
}

@media (max-width: 767px) {
	.ase-sn {
		left: 12px;
		right: 12px;
		width: auto;
		max-width: none;
	}

	.ase-sn--bottom-left,
	.ase-sn--bottom-right {
		bottom: calc(12px + var(--ase-sn-banner-offset, 0px));
	}

	.ase-sn--top-left,
	.ase-sn--top-right {
		top: 12px;
	}

	.ase-sn--bottom-left,
	.ase-sn--top-left {
		left: 12px;
	}

	.ase-sn--bottom-right,
	.ase-sn--top-right {
		right: 12px;
	}

	.ase-sn__card {
		padding: 10px 34px 10px 10px;
		gap: 10px;
		border-radius: 11px;
	}

	.ase-sn__link {
		gap: 10px;
	}

	.ase-sn__media {
		width: 56px;
		height: 56px;
		flex-basis: 56px;
	}

	.ase-sn__eyebrow {
		font-size: 9px;
	}

	.ase-sn__text {
		font-size: 12px;
	}

	.ase-sn__product {
		font-size: 13px;
	}

	.ase-sn__footer {
		font-size: 10px;
	}

	.ase-sn--compact .ase-sn__media {
		width: 48px;
		height: 48px;
		flex-basis: 48px;
	}

	.ase-sn--compact .ase-sn__card {
		padding: 8px 32px 8px 8px;
	}

	.ase-sn--compact .ase-sn__product {
		font-size: 12.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ase-sn,
	.ase-sn.is-visible,
	.ase-sn.is-leaving {
		transition: none;
		transform: none;
	}
}

/* Admin preview uses the same card but sits inside the admin page. */
.ase-sn-admin-preview .ase-sn {
	position: fixed;
	z-index: 100000;
}

.ase-sn-admin-preview .ase-sn__card {
	box-shadow: 0 16px 38px rgba(17, 24, 39, 0.22);
}

