/* Frontend Styles for WP Funnels */

/* Font import for premium typography */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Core Wrapper Definitions */
.wp-funnel-wrapper {
	font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #e2e8f0;
	box-sizing: border-box;
	z-index: 999999;
}

.wp-funnel-wrapper * {
	box-sizing: border-box;
}

/* Standalone Landing Mode */
.wp-funnel-landing-mode {
	width: 100%;
	max-width: 750px;
	padding: 20px;
	margin: 0 auto;
}

/* Popup Mode Overlay & Wrapper */
.wp-funnel-popup-mode {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wp-funnel-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	backdrop-filter: blur(10px);
	transition: opacity 0.5s ease;
}

/* The Glassmorphism Content Box */
.wp-funnel-box {
	position: relative;
	width: 100%;
	max-width: 680px;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(25px) saturate(180%);
	-webkit-backdrop-filter: blur(25px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	padding: 40px;
	animation: wpfScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wpfScaleUp {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Close Button (Popups only) */
.wp-funnel-close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #94a3b8;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 100 !important;
}

.wp-funnel-close-btn:hover {
	background: rgba(255, 0, 0, 0.15);
	color: #ff8a8a;
	border-color: rgba(255, 0, 0, 0.2);
	transform: rotate(90deg);
}

/* Progress Bar indicator */
.wp-funnel-progress-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 5px;
	background: rgba(255, 255, 255, 0.05);
}

.wp-funnel-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--wpf-accent) 0%, #a855f7 100%);
	box-shadow: 0 0 10px rgba(var(--wpf-accent-rgb), 0.5);
	width: 0%;
	transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Slides and Containers */
.wp-funnel-slides-container {
	position: relative;
	min-height: 320px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wp-funnel-slide {
	display: none;
	opacity: 0;
	transform: translateX(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.wp-funnel-slide-active {
	display: block;
	opacity: 1;
	transform: translateX(0);
}

/* Header Text styling */
.wp-funnel-slide-header h2 {
	font-size: 28px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 10px 0;
	letter-spacing: -0.02em;
	background: linear-gradient(135deg, #ffffff 50%, #94a3b8 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wp-funnel-slide-desc {
	font-size: 16px;
	color: #94a3b8;
	margin: 0 0 30px 0;
	line-height: 1.5;
}

/* Footer Navigation Buttons */
.wp-funnel-slide-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	gap: 15px;
}

.wp-funnel-btn {
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.25s ease;
	outline: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wpf-next-btn {
	background: linear-gradient(135deg, var(--wpf-accent) 0%, #4f46e5 100%);
	border: none;
	color: #ffffff;
	box-shadow: 0 4px 15px rgba(var(--wpf-accent-rgb), 0.35);
	margin-left: auto;
}

.wpf-next-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(var(--wpf-accent-rgb), 0.45);
	filter: brightness(1.1);
}

.wpf-prev-btn, .wpf-close-funnel-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #e2e8f0;
}

.wpf-prev-btn:hover, .wpf-close-funnel-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.15);
}

/* Inputs and forms customization */
.wp-funnel-form-fields {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.wp-funnel-field-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wp-funnel-field-group label {
	font-size: 14px;
	font-weight: 500;
	color: #cbd5e1;
}

.wp-funnel-field-group input, 
.wp-funnel-field-group textarea {
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 16px;
	outline: none;
	font-family: inherit;
	transition: all 0.25s ease;
	width: 100%;
}

.wp-funnel-field-group input:focus, 
.wp-funnel-field-group textarea:focus {
	border-color: var(--wpf-accent);
	box-shadow: 0 0 0 3px rgba(var(--wpf-accent-rgb), 0.25);
	background: rgba(15, 23, 42, 0.8);
}

/* Media Modules: Video & Audio */
.wp-funnel-video-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	height: 0;
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 20px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.3);
	border: 1px solid rgba(255,255,255,0.05);
}

.wp-funnel-video-wrap iframe, 
.wp-funnel-video-wrap video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.wp-funnel-audio-wrap {
	width: 100%;
	background: rgba(15, 23, 42, 0.4);
	padding: 15px;
	border-radius: 16px;
	border: 1px solid rgba(255,255,255,0.05);
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
}

.wp-funnel-audio-wrap audio {
	width: 100%;
}

.wp-funnel-graphic-wrap {
	text-align: center;
	margin-bottom: 20px;
}

.wp-funnel-graphic-wrap img {
	max-width: 100%;
	max-height: 220px;
	border-radius: 16px;
	object-fit: cover;
}

/* Polls selection grid */
.wp-funnel-poll-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.wp-funnel-poll-item {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px 20px;
	border-radius: 14px;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	font-weight: 500;
	position: relative;
	overflow: hidden;
}

.wp-funnel-poll-item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 4px;
	height: 100%;
	background: var(--wpf-accent);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.wp-funnel-poll-item:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(var(--wpf-accent-rgb), 0.3);
	transform: translateX(4px);
}

.wp-funnel-poll-item.wpf-selected {
	background: rgba(var(--wpf-accent-rgb), 0.12);
	border-color: var(--wpf-accent);
	box-shadow: 0 0 15px rgba(var(--wpf-accent-rgb), 0.15);
}

.wp-funnel-poll-item.wpf-selected::before {
	opacity: 1;
}

/* Surveys check / radio list */
.wp-funnel-survey-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.wp-funnel-survey-item {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px 20px;
	border-radius: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 15px;
	transition: all 0.2s ease;
	font-weight: 500;
	user-select: none;
}

.wp-funnel-survey-item input[type="radio"], 
.wp-funnel-survey-item input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-radius: 5px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
	cursor: pointer;
	transition: all 0.2s ease;
	margin: 0;
}

.wp-funnel-survey-item input[type="radio"] {
	border-radius: 50%;
}

.wp-funnel-survey-item input[type="radio"]:checked, 
.wp-funnel-survey-item input[type="checkbox"]:checked {
	background: var(--wpf-accent);
	border-color: var(--wpf-accent);
}

.wp-funnel-survey-item input[type="radio"]:checked::after {
	content: '';
	width: 8px;
	height: 8px;
	background: #ffffff;
	border-radius: 50%;
	display: block;
}

.wp-funnel-survey-item input[type="checkbox"]:checked::after {
	content: '✓';
	color: #ffffff;
	font-size: 12px;
	font-weight: bold;
	display: block;
}

.wp-funnel-survey-item:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(var(--wpf-accent-rgb), 0.3);
}

.wp-funnel-survey-item.wpf-selected {
	background: rgba(var(--wpf-accent-rgb), 0.08);
	border-color: var(--wpf-accent);
}

/* Thank you Slide styles */
.wp-funnel-thankyou-text {
	text-align: center;
	padding: 20px 0;
}

.wp-funnel-thankyou-text h3 {
	font-size: 26px;
	color: #ffffff;
	margin: 0 0 10px 0;
}

.wp-funnel-thankyou-text p {
	font-size: 16px;
	color: #94a3b8;
	line-height: 1.6;
}

/* Animations for slide changes */
.wpf-animating-next-out {
	animation: wpfSlideNextOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.wpf-animating-next-in {
	animation: wpfSlideNextIn 0.25s cubic-bezier(0, 0, 0.2, 1) forwards;
}

.wpf-animating-prev-out {
	animation: wpfSlidePrevOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.wpf-animating-prev-in {
	animation: wpfSlidePrevIn 0.25s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes wpfSlideNextOut {
	to {
		opacity: 0;
		transform: translateX(-30px);
	}
}

@keyframes wpfSlideNextIn {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes wpfSlidePrevOut {
	to {
		opacity: 0;
		transform: translateX(30px);
	}
}

@keyframes wpfSlidePrevIn {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Testimony Slider Styles */
.wp-funnel-testimony-slider {
	position: relative;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	padding: 30px;
	text-align: center;
	margin-bottom: 20px;
	box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
	overflow: hidden;
}

.wpf-testimony-item {
	display: none;
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.wpf-testimony-item.wpf-testimony-active {
	display: block;
	opacity: 1;
	transform: scale(1);
}

.wpf-testimony-quote {
	font-size: 17px;
	line-height: 1.6;
	color: #cbd5e1;
	font-style: italic;
	margin: 0 0 15px 0;
	position: relative;
}

.wpf-testimony-quote::before {
	content: '“';
	font-size: 48px;
	color: var(--wpf-accent);
	opacity: 0.15;
	position: absolute;
	top: -20px;
	left: 50%;
	transform: translateX(-50%);
	font-family: serif;
	line-height: 1;
}

.wpf-testimony-author {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--wpf-accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.wpf-testimony-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	margin-top: 20px;
}

.wpf-testimony-nav-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #94a3b8;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	transition: all 0.2s ease;
	outline: none;
}

.wpf-testimony-nav-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.15);
	transform: scale(1.05);
}

/* ==========================================================================
   KLAVIYO-STYLE UPGRADES (FLOATING LABELS, TAKE-OVERS, SPLIT ALIGNMENTS)
   ========================================================================== */

/* Thinner constrained layout box fitting exactly in viewport */
.wp-funnel-box {
	max-width: 520px; /* Thinner standard card */
	padding: 30px;
}

/* Make box wider when split screen side-by-side image is active */
.wp-funnel-box.wp-funnel-box-split {
	max-width: 820px;
	padding: 0; /* Let split containers manage padding */
}

/* Full Page Take-over Mode */
.wp-funnel-layout-full-page {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 99999999 !important;
	background: #0a0807; /* Dark slate takeover */
	overflow-y: auto;
}

.wp-funnel-layout-full-page .wp-funnel-box {
	box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

/* Split Image/Form Side-by-Side Flex Layout */
.wpf-slide-split-container {
	display: flex;
	width: 100%;
	min-height: 400px;
	align-items: stretch;
}

.wpf-slide-split-container.image-left {
	flex-direction: row;
}

.wpf-slide-split-container.image-right {
	flex-direction: row-reverse;
}

.wpf-slide-split-image {
	flex: 1.1;
	position: relative;
	min-height: 320px;
	background-color: #111420;
}

.wpf-slide-split-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wpf-slide-split-content {
	flex: 0.9;
	padding: 35px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Thinner form elements fitting in viewport */
.wp-funnel-form-fields, .wp-funnel-poll-options, .wp-funnel-survey-options {
	max-width: 350px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Pure CSS Floating Labels input groups */
.wpf-input-group {
	position: relative;
	margin-bottom: 1.5rem;
	width: 100%;
	text-align: left;
}

.wpf-input-group input, 
.wpf-input-group textarea,
.wpf-input-group select {
	width: 100%;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border-radius: 10px;
	padding: 22px 14px 6px 14px; /* Room on top for the floating label */
	font-size: 14px;
	outline: none;
	font-family: inherit;
	transition: all 0.2s ease;
}

.wpf-input-group textarea {
	height: 80px;
	resize: none;
}

.wpf-input-group input:focus, 
.wpf-input-group textarea:focus,
.wpf-input-group select:focus {
	border-color: var(--wpf-accent);
	box-shadow: 0 0 0 3px rgba(var(--wpf-accent-rgb), 0.2);
	background: rgba(15, 23, 42, 0.85);
}

.wpf-input-group label {
	position: absolute;
	left: 14px;
	top: 14px; /* Vertically centered initially */
	color: #64748b;
	font-size: 14px;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
	transform-origin: left center;
}

/* Placeholder styling: hide when not focused so label doesn't overlap */
.wpf-input-group input::placeholder,
.wpf-input-group textarea::placeholder {
	color: transparent;
	transition: color 0.2s ease;
}

.wpf-input-group input:focus::placeholder,
.wpf-input-group textarea:focus::placeholder {
	color: #64748b;
}

/* Float label to top-left when focused or filled */
.wpf-input-group input:focus ~ label,
.wpf-input-group input:not(:placeholder-shown) ~ label,
.wpf-input-group textarea:focus ~ label,
.wpf-input-group textarea:not(:placeholder-shown) ~ label,
.wpf-input-group select:focus ~ label,
.wpf-input-group select ~ label {
	transform: translateY(-8px) scale(0.8);
	color: var(--wpf-accent);
	font-weight: 600;
}

/* Inlay Embedded Display Mode overrides */
.wp-funnel-inlay-mode {
	position: relative;
	width: 100%;
	display: block;
	padding: 0;
	z-index: 10;
}

.wp-funnel-inlay-mode .wp-funnel-box {
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	margin: 20px auto;
}

/* Responsive side-by-side collapses on mobile */
@media (max-width: 768px) {
	.wp-funnel-box.wp-funnel-box-split {
		max-width: 480px;
	}
	.wpf-slide-split-container {
		flex-direction: column !important;
		min-height: auto;
	}
	.wpf-slide-split-image {
		min-height: 200px;
		flex: none;
		width: 100%;
	}
	.wpf-slide-split-content {
		flex: none;
		width: 100%;
		padding: 25px;
	}
}

/* ==========================================================================
   MINIMIZED POPUP STATE STYLES (FLOATING LAUNCHER BUTTON)
   ========================================================================== */

/* Launcher element hidden by default */
.wpf-minimized-launcher {
	display: none;
}

/* Minimized Popup Floating Wrapper in Bottom Left Column */
.wp-funnel-wrapper.wpf-minimized {
	width: auto !important;
	height: auto !important;
	position: fixed !important;
	bottom: 25px !important;
	left: 25px !important;
	top: auto !important;
	right: auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 99999999 !important;
	pointer-events: auto !important;
}

/* Hide overlay in minimized state */
.wp-funnel-wrapper.wpf-minimized .wp-funnel-overlay {
	display: none !important;
}

/* Transform the glassmorphic card into a small circular launcher button */
.wp-funnel-wrapper.wpf-minimized .wp-funnel-box {
	max-width: 60px !important;
	max-height: 60px !important;
	width: 60px !important;
	height: 60px !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	background: linear-gradient(135deg, var(--wpf-accent) 0%, #4f46e5 100%) !important;
	border: 2px solid rgba(255, 255, 255, 0.2) !important;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
	animation: wpfPulse 2.5s infinite ease-in-out !important;
	overflow: hidden !important;
}

/* Gentle pulse invite animation */
@keyframes wpfPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(var(--wpf-accent-rgb), 0.5);
	}
	70% {
		box-shadow: 0 0 0 12px rgba(var(--wpf-accent-rgb), 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(var(--wpf-accent-rgb), 0);
	}
}

/* Hide all standard elements in the box when minimized */
.wp-funnel-wrapper.wpf-minimized .wp-funnel-box * {
	display: none !important;
}

/* Display only the launcher icon in minimized state */
.wp-funnel-wrapper.wpf-minimized .wp-funnel-box .wpf-minimized-launcher {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 100% !important;
}

.wp-funnel-wrapper.wpf-minimized .wp-funnel-box .wpf-minimized-launcher svg {
	display: block !important;
	width: 26px !important;
	height: 26px !important;
	stroke: #ffffff !important;
}


