/* Motion (Brand Bible ch. 15) - see assets/js/motion.js. Colours/timings from theme.json only. */

/* 1. Added-to-cart confirmation */
.pph-added-toast {
	position: fixed;
	z-index: 1000;
	left: 50%;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	transform: translate(-50%, 12px);
	display: flex;
	align-items: center;
	gap: 1rem;
	width: max-content;
	max-width: calc(100vw - 2rem);
	padding: 0.75rem 1rem 0.75rem 1.25rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--pph-brown-dark);
	color: var(--wp--preset--color--pph-white);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	line-height: 1.3;
	box-shadow: 0 6px 24px rgba(18, 63, 62, 0.25);
	opacity: 0;
	transition:
		opacity var(--wp--custom--motion--duration-slow) var(--wp--custom--motion--easing),
		transform var(--wp--custom--motion--duration-slow) var(--wp--custom--motion--easing);
}

.pph-added-toast__text,
.pph-added-toast__link {
	white-space: nowrap;
}

@media (max-width: 420px) {
	.pph-added-toast {
		gap: 0.75rem;
		padding: 0.625rem 0.625rem 0.625rem 1rem;
		font-size: 0.875rem;
	}
}

.pph-added-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.pph-added-toast__link {
	flex-shrink: 0;
	padding: 0.375rem 0.875rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--pph-white);
	color: var(--wp--preset--color--pph-brown-dark);
	font-weight: 600;
	text-decoration: none;
}

.pph-added-toast__link:hover,
.pph-added-toast__link:focus-visible {
	background: var(--wp--preset--color--pph-sand);
}

.pph-added-toast__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--pph-white);
	outline-offset: 2px;
}

@keyframes pph-cart-bump {
	0%, 100% { transform: scale(1); }
	40% { transform: scale(1.15); }
}

.pph-cart-bump {
	animation: pph-cart-bump var(--wp--custom--motion--duration-slow) var(--wp--custom--motion--easing);
}

/* 2. Section fade-up - class added by JS only, below the first screen only. */
.pph-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity var(--wp--custom--motion--duration-slow) var(--wp--custom--motion--easing),
		transform var(--wp--custom--motion--duration-slow) var(--wp--custom--motion--easing);
}

.pph-reveal.is-revealed {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.pph-added-toast,
	.pph-reveal {
		transition: none;
	}

	.pph-added-toast {
		transform: translate(-50%, 0);
	}

	.pph-reveal {
		opacity: 1;
		transform: none;
	}

	.pph-cart-bump {
		animation: none;
	}
}
