/**
 * Fake Purchase Notifications — toast styles.
 * Loaded only on pages that contain the Elementor widget.
 */

.fpn-widget,
.fpn-host {
	--fpn-icon-bg: #22c55e;
	--fpn-icon-color: #ffffff;
	--fpn-icon-size: 40px;
	--fpn-toast-bg: #ffffff;
	--fpn-line1-color: #111827;
	--fpn-line2-color: #6b7280;
	--fpn-radius: 10px;
	--fpn-offset-x: 24px;
	--fpn-offset-y: 24px;
}

/* Placeholder only in the Elementor editor so the widget stays selectable. */
.fpn-editor-note {
	display: none;
	padding: 10px 12px;
	border: 1px dashed #c5c5c5;
	border-radius: 6px;
	background: #f8fafc;
	color: #64748b;
	font-size: 12px;
	line-height: 1.4;
}

.elementor-editor-active .fpn-editor-note,
.fpn-is-editor .fpn-editor-note {
	display: block;
}

/* Original toast stays in the widget as a template; JS clones it to body. */
.fpn-widget > .fpn-toast {
	display: none !important;
}

.fpn-toast {
	position: fixed;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 240px;
	max-width: min(360px, calc(100vw - 32px));
	padding: 12px 16px 12px 12px;
	background: var(--fpn-toast-bg);
	border-radius: var(--fpn-radius);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), 0 1px 3px rgba(15, 23, 42, 0.08);
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
}

.fpn-toast.is-visible {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transform: translate(0, 0);
}

/* Position */
.fpn-position-bottom-left .fpn-toast {
	left: var(--fpn-offset-x);
	bottom: var(--fpn-offset-y);
	right: auto;
}

.fpn-position-bottom-right .fpn-toast {
	right: var(--fpn-offset-x);
	bottom: var(--fpn-offset-y);
	left: auto;
}

/* Hidden state: slide from left */
.fpn-anim-left .fpn-toast:not(.is-visible),
.fpn-position-bottom-left.fpn-anim-auto .fpn-toast:not(.is-visible) {
	transform: translateX(-28px);
}

/* Hidden state: slide from right (auto + bottom-right) */
.fpn-position-bottom-right.fpn-anim-auto .fpn-toast:not(.is-visible),
.fpn-position-bottom-right.fpn-anim-left .fpn-toast:not(.is-visible) {
	transform: translateX(28px);
}

/* Hidden state: slide from bottom */
.fpn-anim-bottom .fpn-toast:not(.is-visible) {
	transform: translateY(24px);
}

/* Green circle + checkmark */
.fpn-icon {
	flex: 0 0 var(--fpn-icon-size);
	width: var(--fpn-icon-size);
	height: var(--fpn-icon-size);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--fpn-icon-bg);
}

.fpn-check {
	width: 58%;
	height: 58%;
	fill: var(--fpn-icon-color);
	display: block;
}

.fpn-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fpn-line-1 {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	color: var(--fpn-line1-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fpn-line-2 {
	font-weight: 400;
	font-size: 13px;
	line-height: 1.3;
	color: var(--fpn-line2-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
	.fpn-toast {
		transition: opacity 0.2s ease, visibility 0.2s;
		transform: none !important;
	}
}
