/**
 * Social Proof Notifications — Frontend Styles
 *
 * Pure CSS — no image template dependencies.
 * ~5KB uncompressed target.
 *
 * @since 1.0.0
 */

/* ─── Notification Container ──────────────────────────────── */

.spn-notification {
	position: fixed;
	z-index: 999999;
	max-width: 400px;
	width: calc(100% - 30px);
	margin: 15px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.spn-hidden {
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
}

.spn-visible {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

/* ─── Position Variants ───────────────────────────────────── */

.spn-position-bottom-left {
	bottom: 0;
	left: 0;
}

.spn-position-bottom-right {
	bottom: 0;
	right: 0;
}

.spn-position-top-left {
	top: 0;
	left: 0;
}

.spn-position-top-right {
	top: 0;
	right: 0;
}

/* ─── Inner Container ─────────────────────────────────────── */

.spn-notification-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #ffffff;
	border-radius: 5px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
	position: relative;
}

/* ─── Product Image ───────────────────────────────────────── */

.spn-notification-image {
	flex-shrink: 0;
	width: 70px;
	height: 70px;
	overflow: hidden;
	border-radius: 4px;
}

.spn-notification-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.spn-notification-image a {
	display: block;
	text-decoration: none;
	width: 100%;
	height: 100%;
}

/* ─── Image Right Variant ─────────────────────────────────── */

.spn-image-right .spn-notification-inner {
	flex-direction: row-reverse;
}

/* ─── Content ─────────────────────────────────────────────── */

.spn-notification-content {
	flex: 1;
	min-width: 0;
}

.spn-notification-message {
	word-wrap: break-word;
}

.spn-notification-message a {
	text-decoration: none;
	font-weight: 600;
}

.spn-notification-message a:hover {
	text-decoration: underline;
}

/* ─── Close Button ────────────────────────────────────────── */

.spn-notification-close {
	all: initial;
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	min-width: 22px;
	min-height: 22px;
	max-width: 22px;
	max-height: 22px;
	box-sizing: border-box;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #ddd;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 14px;
	line-height: 1;
	color: #999;
	padding: 0;
	margin: 0;
	transition: background-color 0.2s, color 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	-webkit-appearance: none;
	appearance: none;
	z-index: 1;
}

.spn-notification-close:hover {
	background: #f5f5f5;
	color: #333;
}

.spn-close-icon {
	display: block;
	line-height: 1;
}

/* ─── Stars Rating ────────────────────────────────────────── */

.spn-stars {
	color: #f0ad4e;
	font-size: 12px;
	letter-spacing: 1px;
}

/* ─── Add to Cart Button ──────────────────────────────────── */

.spn-atc-btn {
	display: inline-block;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
	background: #333;
	color: #fff;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	margin-top: 4px;
	transition: background-color 0.2s;
}

.spn-atc-btn:hover {
	background: #555;
}

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

@keyframes spn-fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes spn-fadeOut {
	from { opacity: 1; }
	to { opacity: 0; }
}

@keyframes spn-slideInLeft {
	from { transform: translateX(-100%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes spn-slideOutLeft {
	from { transform: translateX(0); opacity: 1; }
	to { transform: translateX(-100%); opacity: 0; }
}

@keyframes spn-slideInRight {
	from { transform: translateX(100%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes spn-slideOutRight {
	from { transform: translateX(0); opacity: 1; }
	to { transform: translateX(100%); opacity: 0; }
}

@keyframes spn-bounceIn {
	0% { transform: scale(0.3); opacity: 0; }
	50% { transform: scale(1.05); }
	70% { transform: scale(0.95); }
	100% { transform: scale(1); opacity: 1; }
}

@keyframes spn-bounceOut {
	20% { transform: scale(0.95); }
	50%, 55% { opacity: 1; transform: scale(1.05); }
	100% { opacity: 0; transform: scale(0.3); }
}

@keyframes spn-zoomIn {
	from { transform: scale(0); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes spn-zoomOut {
	from { transform: scale(1); opacity: 1; }
	to { transform: scale(0); opacity: 0; }
}

@keyframes spn-flipInX {
	from { transform: perspective(400px) rotateX(90deg); opacity: 0; }
	to { transform: perspective(400px) rotateX(0); opacity: 1; }
}

@keyframes spn-flipOutX {
	from { transform: perspective(400px) rotateX(0); opacity: 1; }
	to { transform: perspective(400px) rotateX(90deg); opacity: 0; }
}

/* Animation classes */
.fade-in       { animation: spn-fadeIn 0.4s ease forwards; }
.fade-out      { animation: spn-fadeOut 0.4s ease forwards; }
.slide-in      { animation: spn-slideInLeft 0.4s ease forwards; }
.slide-out     { animation: spn-slideOutLeft 0.4s ease forwards; }
.bounce        { animation: spn-bounceIn 0.5s ease forwards; }
.bounce-out    { animation: spn-bounceOut 0.5s ease forwards; }
.zoom-in       { animation: spn-zoomIn 0.3s ease forwards; }
.zoom-out      { animation: spn-zoomOut 0.3s ease forwards; }
.flip-in       { animation: spn-flipInX 0.4s ease forwards; }
.flip-out      { animation: spn-flipOutX 0.4s ease forwards; }

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 480px) {
	.spn-notification {
		max-width: calc(100% - 20px);
		margin: 10px;
		font-size: 13px;
	}

	.spn-notification-image {
		width: 55px;
		height: 55px;
	}
}
