/**
 * Feeling Yachty — branded empty-cart scene.
 *
 * The WooCommerce Cart Block ships a crying-face icon, "Your cart is
 * currently empty!" and a "New in store" product grid — shop language and
 * shop upsells for a business that sells charters, not products off a shelf.
 * cart-empty.js hides all of that and inserts this panel in its place.
 *
 * PERFORMANCE: the scene is inline SVG (no image requests), flat colour only
 * (no gradients/filters/shadows), and every moving part animates transform or
 * opacity only, so it runs entirely on the compositor — no layout, no paint,
 * no JavaScript per frame. It stops completely under prefers-reduced-motion.
 */

.fy-cart-empty {
	--ce-pink: #E45C9C;
	--ce-magenta: #d600d6;
	--ce-purple: #7C3AED;
	--ce-muted: #5b6478;

	position: relative;
	overflow: hidden;
	margin: 0 0 30px;
	padding: 38px 22px 30px;
	border-radius: 26px;
	text-align: center;
	background:
		radial-gradient(1100px 340px at 50% -40%, rgba(214, 0, 214, .12), transparent 62%),
		linear-gradient(180deg, #ffffff 0%, #fdf6ff 46%, #f2ecff 100%);
	border: 1px solid rgba(124, 58, 237, .16);
	box-shadow: 0 18px 44px rgba(27, 18, 64, .09);
}

/* ---------- the scene ---------- */
.fy-cart-scene {
	position: relative;
	width: 100%;
	max-width: 340px;
	margin: 0 auto 20px;
	aspect-ratio: 16 / 9;
}

.fy-cart-scene svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* Four water layers drifting at different speeds — the parallax is what
   sells the motion. Each path has a 120px repeat and drifts exactly -120px,
   so the loop has no seam and, since the path runs from -120 to 480, no gap
   opens at the frame edge either. */
.fy-ce-wave {
	animation: fy-ce-drift linear infinite;
	will-change: transform;
}

.fy-ce-wave--1 { animation-duration: 22s; }
.fy-ce-wave--2 { animation-duration: 15s; }
.fy-ce-wave--3 { animation-duration: 10s; }
.fy-ce-wave--4 { animation-duration: 7s; }

@keyframes fy-ce-drift {
	from { transform: translateX(0); }
	to   { transform: translateX(-120px); }
}

/* The yacht rides the swell: rise, fall, and a gentle heel. */
.fy-ce-yacht {
	transform-origin: 160px 132px;
	animation: fy-ce-bob 5.5s ease-in-out infinite;
	will-change: transform;
}

@keyframes fy-ce-bob {
	0%, 100% { transform: translateY(1px) rotate(-1.2deg); }
	50%      { transform: translateY(-4px) rotate(1.2deg); }
}

.fy-ce-flag {
	transform-box: fill-box;
	transform-origin: right center;
	animation: fy-ce-flag 1.5s ease-in-out infinite;
}

@keyframes fy-ce-flag {
	0%, 100% { transform: scaleX(1); }
	50%      { transform: scaleX(.62); }
}

.fy-ce-wake {
	animation: fy-ce-wake 5.5s ease-in-out infinite;
}

@keyframes fy-ce-wake {
	0%, 100% { opacity: .25; transform: translateX(0); }
	50%      { opacity: .8;  transform: translateX(-5px); }
}

.fy-ce-wake--b { animation-delay: -1.3s; }
.fy-ce-wake--s { animation-name: fy-ce-spray; animation-delay: -.6s; }

@keyframes fy-ce-spray {
	0%, 100% { opacity: .35; transform: translate(0, 0); }
	50%      { opacity: .9;  transform: translate(2px, -1px); }
}

/* Palms sway independently so the scene doesn't feel metronomic. */
.fy-ce-palm {
	transform-box: fill-box;
	transform-origin: bottom center;
	animation: fy-ce-sway 6.5s ease-in-out infinite;
}

.fy-ce-palm--r { animation-duration: 8s; animation-delay: -2.6s; }

@keyframes fy-ce-sway {
	0%, 100% { transform: rotate(-1.6deg); }
	50%      { transform: rotate(1.6deg); }
}

/* Sunset reflection on the water: a slow twinkle, staggered per dash. */
.fy-ce-shim {
	transform-box: fill-box;
	transform-origin: center;
	animation: fy-ce-shim 4.5s ease-in-out infinite;
}

.fy-ce-shim--2 { animation-delay: -.9s; }
.fy-ce-shim--3 { animation-delay: -1.8s; }
.fy-ce-shim--4 { animation-delay: -2.7s; }

@keyframes fy-ce-shim {
	0%, 100% { opacity: .3; transform: scaleX(.72); }
	50%      { opacity: .9; transform: scaleX(1.1); }
}

.fy-ce-birds {
	animation: fy-ce-birds 32s linear infinite;
	animation-delay: -9s;
}

@keyframes fy-ce-birds {
	from { transform: translateX(0); }
	to   { transform: translateX(400px); }
}

/* ---------- copy ---------- */
.fy-cart-empty__title {
	margin: 0 0 10px;
	font-size: clamp(23px, 4.4vw, 34px);
	font-weight: 900;
	letter-spacing: -.02em;
	line-height: 1.15;
	background: linear-gradient(92deg, var(--ce-pink), var(--ce-magenta) 46%, var(--ce-purple));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.fy-cart-empty__sub {
	margin: 0 auto 22px;
	max-width: 430px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ce-muted);
}

.fy-cart-empty__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.fy-cart-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	border: 2px solid transparent;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.fy-cart-btn--primary {
	color: #fff;
	background: linear-gradient(120deg, var(--ce-pink), var(--ce-magenta) 52%, var(--ce-purple));
	box-shadow: 0 12px 26px rgba(214, 0, 214, .3);
}

.fy-cart-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 32px rgba(214, 0, 214, .38);
	color: #fff;
}

.fy-cart-btn--ghost {
	color: var(--ce-purple);
	background: #fff;
	border-color: rgba(124, 58, 237, .3);
}

.fy-cart-btn--ghost:hover {
	transform: translateY(-2px);
	border-color: var(--ce-purple);
	color: var(--ce-purple);
}

.fy-cart-btn:focus-visible {
	outline: 3px solid var(--ce-purple);
	outline-offset: 3px;
}

/* Reassurance strip — the questions people actually have before booking. */
.fy-cart-empty__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 18px;
	margin: 22px 0 0;
	padding: 14px 0 0;
	border-top: 1px dashed rgba(124, 58, 237, .22);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ce-muted);
}

.fy-cart-empty__trust span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Everything WooCommerce would otherwise render here (crying-face heading,
   separator, "New in store" and its product grid) — hidden by cart-empty.js,
   which adds this class to every original child of the block. */
.fy-cart-hidden {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.fy-ce-wave,
	.fy-ce-yacht,
	.fy-ce-flag,
	.fy-ce-wake,
	.fy-ce-palm,
	.fy-ce-shim,
	.fy-ce-birds {
		animation: none !important;
	}
	.fy-cart-btn { transition: none; }
}

@media (max-width: 480px) {
	.fy-cart-empty { padding: 28px 16px 24px; border-radius: 20px; }
	.fy-cart-scene { max-width: 260px; }
	.fy-cart-btn { padding: 13px 20px; font-size: 14.5px; }
}
