/* Convert Genie styles — light theme, slick/compact modal.
   Colors are CSS custom properties so Settings > Convert Genie can override
   them at runtime via an inline <style> block (see cgenie_enqueue_assets()
   in convert-genie.php) without editing this file.
   IMPORTANT: several rules below use !important on text color specifically
   to stay legible regardless of the host theme/page-builder's own global
   typography settings (e.g. Elementor's global Kit color rules, which are
   often specific/late enough to override a plain descendant selector). This
   is intentional and should stay — removing it is what caused headings to
   inherit the wrong color previously. */

:root {
	--cgenie-accent: #E8530A;
	--cgenie-accent-dark: #C2440A;
	--cgenie-bg: #FFFFFF;
	--cgenie-surface: #F7F7F8;
	--cgenie-text: #14161A;
	--cgenie-text-muted: #6B7280;
	--cgenie-border: #E7E7EA;
	--cgenie-white: #FFFFFF;
}

/* ---------- Launcher (outer help pill + main button) ---------- */

/* Wraps both the outer help pill and the main launch button so they stack
   together as one unit, matching the two-tier floating pattern (small
   prompt above a main action button) rather than a single flat button. */
#cgenie-launcher {
	position: fixed;
	z-index: 99998;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Bottom-anchored: button stays pinned to the edge, help group stacks
   above it (first in DOM = renders higher in a normal column layout). */
#cgenie-launcher.cgenie-pos-bottom-right { bottom: 22px; right: 22px; align-items: flex-end; }
#cgenie-launcher.cgenie-pos-bottom-left  { bottom: 22px; left: 22px; align-items: flex-start; }

/* Top-anchored: button should stay pinned to the edge instead, so the
   stack is reversed — button renders first (closest to the edge), help
   group sits below it. */
#cgenie-launcher.cgenie-pos-top-right { top: 22px; right: 22px; align-items: flex-end; flex-direction: column-reverse; }
#cgenie-launcher.cgenie-pos-top-left  { top: 22px; left: 22px; align-items: flex-start; flex-direction: column-reverse; }

/* Help group: a small plain label on top ("Don't know what to pick?"),
   the actual clickable CTA ("Click here for help") right below it — same
   two-tier pattern as a typical chat-widget prompt (small context line
   above a bigger action button), kept as one visual unit so it stacks
   cleanly with the main launch button above. */
.cgenie-help-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

#cgenie-launcher.cgenie-pos-bottom-right .cgenie-help-group,
#cgenie-launcher.cgenie-pos-top-right .cgenie-help-group {
	align-items: flex-end;
}

#cgenie-launcher.cgenie-pos-bottom-left .cgenie-help-group,
#cgenie-launcher.cgenie-pos-top-left .cgenie-help-group {
	align-items: flex-start;
}

.cgenie-help-label {
	background: var(--cgenie-text) !important;
	color: var(--cgenie-white) !important;
	font-family: 'DM Sans', -apple-system, sans-serif;
	font-size: 11.5px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

/* Small pill above the main button — visible on the page itself, before
   the popup ever opens, so undecided visitors see help is available
   without having to click into the quiz first. */
#cgenie-help-outer-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--cgenie-accent) !important;
	color: var(--cgenie-white) !important;
	border: none;
	border-radius: 999px;
	padding: 9px 16px;
	font-family: 'DM Sans', -apple-system, sans-serif;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(232, 83, 10, 0.30);
	animation: cgenie-help-pulse 3s ease-in-out infinite;
}

#cgenie-help-outer-btn:hover {
	animation-play-state: paused;
	transform: translateY(-1px);
}

#cgenie-help-outer-btn::after {
	content: '';
	position: absolute;
	top: 0;
	left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
	animation: cgenie-help-shimmer 3s ease-in-out infinite;
}

.cgenie-help-pill-icon {
	font-size: 13px;
}

@keyframes cgenie-help-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.02); }
}

@keyframes cgenie-help-shimmer {
	0%   { left: -60%; }
	60%  { left: 130%; }
	100% { left: 130%; }
}

#cgenie-launch-btn {
	background: var(--cgenie-accent) !important;
	color: var(--cgenie-white) !important;
	border: none;
	border-radius: 999px;
	padding: 13px 20px;
	font-family: 'DM Sans', -apple-system, sans-serif;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(232, 83, 10, 0.30);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	animation: cgenie-pulse-glow 2.6s ease-in-out infinite;
}

#cgenie-launch-btn:hover {
	transform: translateY(-2px) scale(1.02);
	animation-play-state: paused;
	box-shadow: 0 10px 26px rgba(232, 83, 10, 0.45);
}

@keyframes cgenie-pulse-glow {
	0%, 100% {
		box-shadow: 0 6px 20px rgba(232, 83, 10, 0.30), 0 0 0 0 rgba(232, 83, 10, 0.35);
	}
	50% {
		box-shadow: 0 6px 20px rgba(232, 83, 10, 0.30), 0 0 0 8px rgba(232, 83, 10, 0);
	}
}

.cgenie-launch-icon {
	font-size: 15px;
}

/* ---------- Modal shell ---------- */

#cgenie-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 20, 0.55);
	backdrop-filter: blur(2px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#cgenie-modal-overlay[hidden] {
	display: none;
}

#cgenie-modal {
	position: relative;
	background: var(--cgenie-bg) !important;
	color: var(--cgenie-text) !important;
	width: 100%;
	max-width: 420px;
	max-height: 82vh;
	overflow-y: auto;
	border-radius: 22px;
	padding: 26px 22px 22px;
	font-family: 'DM Sans', -apple-system, sans-serif;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	animation: cgenie-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cgenie-modal-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

#cgenie-close-btn {
	position: absolute;
	top: 14px;
	right: 16px;
	background: var(--cgenie-surface);
	border: none;
	color: var(--cgenie-text) !important;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

#cgenie-close-btn:hover {
	background: var(--cgenie-border);
}

/* ---------- Step content ---------- */

.cgenie-step {
	animation: cgenie-fade-slide-in 0.22s ease;
}

@keyframes cgenie-fade-slide-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cgenie-progress {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cgenie-accent) !important;
	font-weight: 700;
	margin-bottom: 6px;
}

#cgenie-modal .cgenie-step h3 {
	font-family: 'Syne', -apple-system, sans-serif;
	font-weight: 800;
	font-size: 19px;
	color: var(--cgenie-text) !important;
	margin: 0 0 10px;
	line-height: 1.3;
}

.cgenie-progress-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.cgenie-progress-row .cgenie-progress {
	margin-bottom: 0;
}

.cgenie-restart-link {
	background: none;
	border: none;
	padding: 0;
	font-family: 'DM Sans', -apple-system, sans-serif;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--cgenie-text-muted) !important;
	cursor: pointer;
	text-decoration: underline;
	white-space: nowrap;
}

.cgenie-restart-link:hover {
	color: var(--cgenie-accent) !important;
}

.cgenie-view-more {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: var(--cgenie-accent) !important;
	text-decoration: none;
	margin: -2px 0 4px;
}

.cgenie-view-more:hover {
	text-decoration: underline;
}

#cgenie-modal .cgenie-step h4 {
	font-family: 'Syne', -apple-system, sans-serif;
	font-weight: 800;
	font-size: 14px;
	color: var(--cgenie-text) !important;
	margin: 18px 0 10px;
}

#cgenie-modal .cgenie-step p {
	color: var(--cgenie-text) !important;
	font-size: 13px;
	line-height: 1.5;
	margin: 0 0 10px;
}

.cgenie-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cgenie-option-btn {
	background: var(--cgenie-surface) !important;
	color: var(--cgenie-text) !important;
	border: 1.5px solid transparent;
	border-radius: 12px;
	padding: 13px 14px;
	text-align: left;
	font-size: 14px;
	font-family: 'DM Sans', -apple-system, sans-serif;
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.1s ease;
}

.cgenie-option-btn:hover {
	border-color: var(--cgenie-accent);
	transform: translateX(2px);
}

.cgenie-options-checkbox {
	gap: 4px;
}

.cgenie-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	color: var(--cgenie-text) !important;
}

.cgenie-checkbox-label:hover {
	background: var(--cgenie-surface);
}

.cgenie-checkbox-label input {
	accent-color: var(--cgenie-accent);
	width: 16px;
	height: 16px;
}

.cgenie-nav-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 20px;
	gap: 10px;
}

.cgenie-primary-btn,
.cgenie-secondary-btn {
	font-family: 'DM Sans', -apple-system, sans-serif;
	font-weight: 700;
	font-size: 13px;
	border-radius: 999px;
	padding: 11px 18px;
	cursor: pointer;
	border: none;
}

.cgenie-primary-btn {
	background: var(--cgenie-accent) !important;
	color: var(--cgenie-white) !important;
	flex: 1;
}

.cgenie-secondary-btn {
	background: transparent !important;
	color: var(--cgenie-text) !important;
	border: 1.5px solid var(--cgenie-border);
}

/* ---------- Loading ---------- */

.cgenie-loading {
	text-align: center;
	padding: 34px 0;
}

.cgenie-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid var(--cgenie-border);
	border-top-color: var(--cgenie-accent);
	border-radius: 50%;
	margin: 0 auto 14px;
	animation: cgenie-spin 0.8s linear infinite;
}

@keyframes cgenie-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Results / product cards ---------- */

.cgenie-product-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 6px;
}

.cgenie-product-card {
	background: var(--cgenie-surface) !important;
	border-radius: 12px;
	padding: 9px;
	border: 1px solid var(--cgenie-border);
}

.cgenie-product-card img,
.cgenie-product-img-placeholder {
	width: 100%;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	background: var(--cgenie-border);
	margin-bottom: 7px;
}

.cgenie-product-title {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cgenie-text) !important;
	margin-bottom: 3px;
}

.cgenie-product-price {
	font-size: 11px;
	color: var(--cgenie-text-muted) !important;
	margin-bottom: 7px;
}

.cgenie-product-actions {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cgenie-view-btn,
.cgenie-cart-btn {
	display: block;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	border-radius: 999px;
	padding: 6px 8px;
	text-decoration: none;
}

.cgenie-view-btn {
	background: var(--cgenie-bg) !important;
	color: var(--cgenie-text) !important;
	border: 1px solid var(--cgenie-border);
}

.cgenie-cart-btn {
	background: var(--cgenie-text) !important;
	color: var(--cgenie-white) !important;
}

/* ---------- CTA ---------- */

/* Prominent version: shown at the TOP of the results screen, first thing a
   visitor sees the moment the quiz finishes — this is the one that used to
   only appear after scrolling past every product, easy to miss. It now has
   a subtle animated glowing border so it visually pulls the eye before any
   product grid does. */
.cgenie-cta-box.cgenie-cta-prominent {
	margin: 0 0 18px;
	padding: 18px;
	background: linear-gradient(135deg, rgba(232, 83, 10, 0.10), rgba(232, 83, 10, 0.04));
	border: 1.5px solid var(--cgenie-accent);
	border-radius: 16px;
	text-align: center;
	animation: cgenie-cta-glow 2.4s ease-in-out infinite;
}

@keyframes cgenie-cta-glow {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 83, 10, 0.25); }
	50%      { box-shadow: 0 0 0 6px rgba(232, 83, 10, 0); }
}

/* Compact version: repeated at the bottom for anyone who scrolls through
   the full product list before deciding. */
.cgenie-cta-box.cgenie-cta-compact {
	margin-top: 16px;
	padding: 14px;
	background: var(--cgenie-surface);
	border: 1px solid var(--cgenie-border);
	border-radius: 12px;
	text-align: center;
}

.cgenie-cta-box.cgenie-cta-plan {
	margin: 0 0 16px;
	padding: 16px;
	background: rgba(11, 122, 78, 0.08);
	border: 1.5px solid #0B7A4E;
	border-radius: 16px;
	text-align: center;
}

.cgenie-value-line {
	font-size: 12.5px;
	color: var(--cgenie-text) !important;
	margin: 0 0 12px;
	line-height: 1.5;
}

.cgenie-lifetime-btn {
	display: inline-block;
	background: var(--cgenie-accent) !important;
	color: var(--cgenie-white) !important;
	font-family: 'Syne', -apple-system, sans-serif;
	font-weight: 800;
	font-size: 14px;
	padding: 13px 22px;
	border-radius: 999px;
	text-decoration: none;
	transition: transform 0.12s ease;
}

.cgenie-lifetime-btn:hover {
	transform: scale(1.03);
}

.cgenie-lifetime-btn.cgenie-lifetime-btn-compact {
	font-size: 12.5px;
	padding: 10px 18px;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
	.cgenie-product-grid {
		grid-template-columns: 1fr 1fr;
	}
	#cgenie-launch-btn .cgenie-launch-text,
	#cgenie-help-outer-btn .cgenie-help-pill-text,
	.cgenie-help-label {
		display: none;
	}
	#cgenie-launch-btn {
		padding: 13px;
		border-radius: 50%;
	}
	#cgenie-help-outer-btn {
		padding: 9px;
		border-radius: 50%;
	}
	#cgenie-modal {
		max-width: 100%;
		border-radius: 18px;
	}
}
