/**
 * KS LP Blocks — Shape Dividers Stylesheet & CSS Keyframes Animations
 */

.kslp-shape-divider {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	pointer-events: none;
	direction: ltr;
	box-sizing: border-box;
	z-index: 1;
}

.kslp-shape-divider svg {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

/* Top and Bottom Positioning */
.kslp-shape-divider--top {
	top: 0;
	bottom: auto;
	transform: translateY(-1px);
}

.kslp-shape-divider--bottom {
	bottom: 0;
	top: auto;
	transform: translateY(1px);
}

/* Z-Index Controls */
.kslp-shape-divider--front {
	z-index: 3 !important;
}

.kslp-shape-divider--back {
	z-index: 0 !important;
}

/* Transform Flips */
.kslp-shape-divider--flip-h svg {
	transform: scaleX(-1);
	transform-origin: center center;
}

.kslp-shape-divider--flip-v svg {
	transform: scaleY(-1);
	transform-origin: center center;
}

.kslp-shape-divider--flip-both svg {
	transform: scale(-1, -1);
	transform-origin: center center;
}

/* Width / Scale Handling for zoomed/repeated waves */
.kslp-shape-divider--scaled svg {
	width: var(--kslp-sd-scale, 100%);
	min-width: 100%;
	left: 50%;
	transform: translateX(-50%);
}

.kslp-shape-divider--flip-h.kslp-shape-divider--scaled svg {
	transform: translateX(-50%) scaleX(-1);
}

.kslp-shape-divider--flip-v.kslp-shape-divider--scaled svg {
	transform: translateX(-50%) scaleY(-1);
}

.kslp-shape-divider--flip-both.kslp-shape-divider--scaled svg {
	transform: translateX(-50%) scale(-1, -1);
}

/* Multi-layer default opacities */
.kslp-sd-layer--1 {
	opacity: var(--kslp-sd-op1, 0.25);
}

.kslp-sd-layer--2 {
	opacity: var(--kslp-sd-op2, 0.5);
}

.kslp-sd-layer--3 {
	opacity: var(--kslp-sd-op3, 1);
}

/* ----------------------------------------------------
   ANIMATION KEYFRAMES (GPU ACCELERATED)
   ---------------------------------------------------- */

/* 1. Wave Drift / Flow (Horizontal Flow) */
@keyframes kslpSdFlow {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(-50%, 0, 0);
	}
}

@keyframes kslpSdFlowRev {
	0% {
		transform: translate3d(-50%, 0, 0);
	}
	100% {
		transform: translate3d(0, 0, 0);
	}
}

.kslp-shape-divider--anim-flow svg {
	width: 200% !important;
	min-width: 200% !important;
	max-width: none !important;
	animation: kslpSdFlow 10s linear infinite;
	will-change: transform;
}

.kslp-shape-divider--anim-flow-rev svg {
	width: 200% !important;
	min-width: 200% !important;
	max-width: none !important;
	animation: kslpSdFlowRev 10s linear infinite;
	will-change: transform;
}

/* Multi-layer Parallax animation for Layered Wave */
.kslp-shape-divider--anim-parallax .kslp-sd-path--layer-1 {
	animation: kslpSdPathDrift1 18s ease-in-out infinite alternate;
}

.kslp-shape-divider--anim-parallax .kslp-sd-path--layer-2 {
	animation: kslpSdPathDrift2 12s ease-in-out infinite alternate-reverse;
}

.kslp-shape-divider--anim-parallax .kslp-sd-path--layer-3 {
	animation: kslpSdPathDrift3 7s ease-in-out infinite alternate;
}

@keyframes kslpSdPathDrift1 {
	0% {
		transform: translate3d(-15px, 0, 0) scaleY(1);
	}
	50% {
		transform: translate3d(15px, -3px, 0) scaleY(1.05);
	}
	100% {
		transform: translate3d(-10px, 2px, 0) scaleY(0.96);
	}
}

@keyframes kslpSdPathDrift2 {
	0% {
		transform: translate3d(12px, 0, 0) scaleY(1);
	}
	50% {
		transform: translate3d(-14px, 3px, 0) scaleY(0.95);
	}
	100% {
		transform: translate3d(8px, -2px, 0) scaleY(1.04);
	}
}

@keyframes kslpSdPathDrift3 {
	0% {
		transform: translate3d(-8px, 0, 0) scaleY(1);
	}
	50% {
		transform: translate3d(10px, -2px, 0) scaleY(1.03);
	}
	100% {
		transform: translate3d(-6px, 1px, 0) scaleY(0.97);
	}
}

/* 2. Wave Pulse / Surge (Vertical Breathing) */
@keyframes kslpSdPulse {
	0%, 100% {
		transform: scaleY(1);
	}
	50% {
		transform: scaleY(1.15);
	}
}

.kslp-shape-divider--anim-pulse svg {
	animation: kslpSdPulse 6s ease-in-out infinite;
	transform-origin: bottom center;
	will-change: transform;
}

.kslp-shape-divider--top.kslp-shape-divider--anim-pulse svg {
	transform-origin: top center;
}

/* 3. Organic Wobble */
@keyframes kslpSdWobble {
	0%, 100% {
		transform: translateY(0) scaleY(1) skewX(0deg);
	}
	25% {
		transform: translateY(-2px) scaleY(1.08) skewX(0.5deg);
	}
	75% {
		transform: translateY(2px) scaleY(0.94) skewX(-0.5deg);
	}
}

.kslp-shape-divider--anim-wobble svg {
	animation: kslpSdWobble 8s ease-in-out infinite;
	transform-origin: center center;
	will-change: transform;
}

/* Speed Modifiers */
.kslp-shape-divider--speed-fast svg,
.kslp-shape-divider--speed-fast .kslp-sd-path--layer-1,
.kslp-shape-divider--speed-fast .kslp-sd-path--layer-2,
.kslp-shape-divider--speed-fast .kslp-sd-path--layer-3 {
	animation-duration: 4s !important;
}

.kslp-shape-divider--speed-normal svg,
.kslp-shape-divider--speed-normal .kslp-sd-path--layer-1,
.kslp-shape-divider--speed-normal .kslp-sd-path--layer-2,
.kslp-shape-divider--speed-normal .kslp-sd-path--layer-3 {
	animation-duration: 8s !important;
}

.kslp-shape-divider--speed-slow svg,
.kslp-shape-divider--speed-slow .kslp-sd-path--layer-1,
.kslp-shape-divider--speed-slow .kslp-sd-path--layer-2,
.kslp-shape-divider--speed-slow .kslp-sd-path--layer-3 {
	animation-duration: 15s !important;
}

/* Standalone Shape Divider Block Styles */
.kslp-shape-divider-block {
	position: relative;
	width: 100%;
	line-height: 0;
	overflow: hidden;
	box-sizing: border-box;
}

.kslp-shape-divider-block__container {
	position: relative;
	width: 100%;
	height: 100%;
}
