/* ==========================================================================
   LUXGAS Wholesale Funnel — frontend styles (v1.2)
   Design tokens come from admin settings as CSS custom properties on
   .lwf-root (brand gold, button colors/radius, typography, image sizing).
   Layout: centered column, consistent widths, Heyflow-like compact spacing.
   ========================================================================== */

.lwf-root {
	/* Defaults — overridden by inline vars from settings */
	--lwf-gold: #F2A900;
	--lwf-btn-bg: #000000;
	--lwf-btn-text: #F5B000;
	--lwf-btn-border: #F5B000;
	--lwf-btn-radius: 14px;
	--lwf-fs-h1: 38px;
	--lwf-fs-h1-m: 28px;
	--lwf-fs-p: 17px;
	--lwf-fs-btn: 18px;
	--lwf-fs-label: 16px;
	--lwf-logo-w: 170px;
	--lwf-logo-w-m: 140px;
	--lwf-header-pad-top: 24px;
	--lwf-header-pad-bottom: 18px;
	--lwf-header-pad-top-m: 18px;
	--lwf-header-pad-bottom-m: 14px;
	--lwf-icon-benefit-w: 78px;
	--lwf-icon-benefit-h: 72px;
	--lwf-icon-benefit-w-m: 70px;
	--lwf-icon-benefit-h-m: 66px;
	--lwf-icon-business-w: 112px;
	--lwf-icon-business-h: 104px;
	--lwf-icon-business-w-m: 88px;
	--lwf-icon-business-h-m: 82px;
	--lwf-icon-feedback-w: 70px;
	--lwf-icon-feedback-h: 64px;
	--lwf-icon-feedback-w-m: 64px;
	--lwf-icon-feedback-h-m: 58px;
	--lwf-slider-max: 820px;
	--lwf-slider-h: 430px;
	--lwf-slider-h-m: 300px;
	--lwf-pallet-w: 440px;
	--lwf-pallet-w-m: 300px;

	--lwf-text: #555555;
	--lwf-input-bg: #f3f3f3;
	--lwf-bar-active: #5B4DF0;
	--lwf-error: #c0392b;
	--lwf-content-w: 680px;  /* text column */
	--lwf-form-w: 520px;     /* form + buttons column */

	background: #ffffff;
	color: var(--lwf-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", "Helvetica Neue", Arial, sans-serif;
	font-size: var(--lwf-fs-p);
	line-height: 1.55;
	margin: 0 auto;
	max-width: 900px;
	padding: 0 20px 48px;
	box-sizing: border-box;
	overflow-x: hidden;
}
.lwf-root *, .lwf-root *::before, .lwf-root *::after { box-sizing: inherit; }
.lwf-root img { max-width: 100%; }
.lwf-root button { font-family: inherit; }

/* ---------- Header / logo (Critical Fix 7: compact, admin-controlled) ---------- */
.lwf-header {
	text-align: center;
	padding: var(--lwf-header-pad-top) 0 var(--lwf-header-pad-bottom);
	border-bottom: 1px solid #ececec;
	margin: 0 -20px 22px;
}
.lwf-logo {
	width: var(--lwf-logo-w);
	height: auto;
	display: inline-block;
	vertical-align: middle;
}

/* ---------- Typography ---------- */
.lwf-h1 {
	color: #000;
	font-weight: 800;
	font-size: var(--lwf-fs-h1);
	line-height: 1.15;
	letter-spacing: -0.5px;
	text-align: center;
	margin: 6px auto 18px;
	max-width: var(--lwf-content-w);
}
.lwf-h1--light {
	font-weight: 400;
	color: #6b6b6b;
	letter-spacing: 0;
	font-size: calc(var(--lwf-fs-h1) * 0.78);
}
.lwf-h2 {
	color: #000;
	font-weight: 800;
	font-size: calc(var(--lwf-fs-h1) * 0.7);
	line-height: 1.2;
	text-align: center;
	margin: 30px auto 10px;
	max-width: var(--lwf-content-w);
}
.lwf-h2--plain { font-weight: 700; color: #444; }
.lwf-h2--tight { margin-top: 2px; }
.lwf-gold { color: var(--lwf-gold); }

.lwf-sub, .lwf-body, .lwf-small, .lwf-mono {
	text-align: center;
	margin: 0 auto 14px;
	max-width: var(--lwf-content-w);
}
.lwf-sub   { font-size: calc(var(--lwf-fs-p) + 2px); }
.lwf-body  { font-size: var(--lwf-fs-p); }
.lwf-small { font-size: calc(var(--lwf-fs-p) - 1px); }
.lwf-mono, .lwf-mono-sm {
	font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: calc(var(--lwf-fs-p) - 2px);
	margin-bottom: 8px;
}
.lwf-mono-sm { font-size: calc(var(--lwf-fs-p) - 2.5px); margin: 0; }

/* ---------- Steps ---------- */
.lwf-step { padding-bottom: 6px; }
.lwf-step[hidden] { display: none !important; }
.lwf-step-icon { text-align: center; margin: 6px 0 14px; }
.lwf-step-icon img { max-width: 96px; max-height: 96px; height: auto; }

/* ---------- Slider (Issue 4: no cropping by default) ---------- */
.lwf-slider {
	position: relative;
	margin: 20px auto 8px;
	overflow: hidden;
	border-radius: 16px;
	width: 100%;
	max-width: var(--lwf-slider-max);
	background: #f7f7f7;
}
.lwf-slider__track {
	display: flex;
	align-items: stretch;
	transition: transform 0.35s ease;
	will-change: transform;
}
.lwf-slider__slide {
	flex: 0 0 100%;
	max-width: 100%;
}
.lwf-slider__slide img {
	display: block;
	width: 100%;
	border-radius: 16px;
	user-select: none;
	-webkit-user-drag: none;
	background: #f7f7f7;
}
/* auto mode: full image, natural height, nothing cut */
.lwf-slider--auto .lwf-slider__slide img { height: auto; }
/* fixed mode: uniform height, per-image object-fit from settings */
.lwf-slider--fixed .lwf-slider__slide img { height: var(--lwf-slider-h); }

.lwf-slider__bars {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 10px;
	display: flex;
	gap: 8px;
	z-index: 2;
}
.lwf-slider__bar {
	flex: 1 1 0;
	height: 6px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	padding: 0;
	transition: background 0.25s ease;
}
.lwf-slider__bar.is-active { background: var(--lwf-bar-active); }
.lwf-slider__bar:focus-visible { outline: 2px solid var(--lwf-gold); outline-offset: 2px; }

/* ---------- Benefits (Issue 5: aligned rows, tighter gaps) ---------- */
.lwf-benefits {
	margin: 18px auto 6px;
	max-width: var(--lwf-content-w);
}
.lwf-benefit {
	text-align: center;
	margin: 0 auto 22px;
	max-width: 420px;
}
.lwf-benefit__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lwf-icon-benefit-w);
	height: var(--lwf-icon-benefit-h);
	color: var(--lwf-gold);
	margin-bottom: 8px;
}
.lwf-benefit__icon svg { width: 100%; height: 100%; }
.lwf-benefit__icon .lwf-icon-img { max-width: var(--lwf-icon-benefit-w); max-height: var(--lwf-icon-benefit-h); object-fit: contain; }

/* Feedback icons get their own size (Critical Fix 4) */
.lwf-feedback .lwf-benefit__icon {
	width: var(--lwf-icon-feedback-w);
	height: var(--lwf-icon-feedback-h);
}
.lwf-feedback .lwf-benefit__icon .lwf-icon-img { max-width: var(--lwf-icon-feedback-w); max-height: var(--lwf-icon-feedback-h); }
.lwf-benefit h3 {
	color: #000;
	font-size: calc(var(--lwf-fs-p) + 1px);
	font-weight: 700;
	margin: 0 0 4px;
}
.lwf-benefit p { margin: 0; font-size: calc(var(--lwf-fs-p) - 1px); }

@media (min-width: 768px) {
	.lwf-benefits {
		display: flex;
		gap: 22px;
		justify-content: center;
		align-items: flex-start;
	}
	.lwf-benefit { flex: 1 1 0; margin-bottom: 8px; }
}

/* ---------- Pallet image (admin-controlled width) ---------- */
.lwf-pallet {
	display: block;
	margin: 18px auto 6px;
	width: min(var(--lwf-pallet-w), 100%);
	height: auto;
}

/* ---------- CTA buttons (admin-controlled colors) ---------- */
.lwf-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: var(--lwf-form-w);
	margin: 22px auto 8px;
	padding: 15px 24px;
	background: var(--lwf-btn-bg);
	color: var(--lwf-btn-text);
	border: 2px solid var(--lwf-btn-border);
	border-radius: var(--lwf-btn-radius);
	font-size: var(--lwf-fs-btn);
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lwf-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); }
.lwf-btn:active { transform: translateY(0); }
.lwf-btn:focus-visible { outline: 3px solid var(--lwf-gold); outline-offset: 3px; }
.lwf-btn:disabled { opacity: 0.65; cursor: wait; }
.lwf-btn__icon { display: inline-flex; width: 20px; height: 20px; }
.lwf-btn__icon svg { width: 100%; height: 100%; }
.lwf-btn.is-loading span:first-child { opacity: 0.6; }

/* ---------- Business choice cards (Issue 7) ---------- */
.lwf-choices {
	display: flex;
	gap: 16px;
	justify-content: center;
	align-items: stretch;
	margin: 28px auto 16px;
	max-width: 560px;
}
.lwf-choice {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	background: #fff;
	border: 1px solid transparent;
	padding: 14px 8px 16px;
	cursor: pointer;
	text-align: center;
	border-radius: 14px;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.lwf-choice:hover { background: #faf6ec; }
.lwf-choice:focus-visible { outline: 3px solid var(--lwf-gold); outline-offset: 2px; }
.lwf-choice.is-selected { border-color: #f1e2bb; background: #fdf9ef; }
.lwf-choice__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lwf-icon-business-w);
	height: var(--lwf-icon-business-h);
	color: var(--lwf-gold);
	margin-bottom: 10px;
}
.lwf-choice__icon svg { width: 100%; height: 100%; }
.lwf-choice__icon .lwf-icon-img { max-width: var(--lwf-icon-business-w); max-height: var(--lwf-icon-business-h); object-fit: contain; }
.lwf-choice__label {
	display: block;
	color: #000;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.3px;
	margin-bottom: 12px;
	flex: 1 1 auto;
}
.lwf-choice__radio {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #e0e0e0;
	background: #fff;
	position: relative;
	transition: border-color 0.2s ease;
}
.lwf-choice.is-selected .lwf-choice__radio { border-color: var(--lwf-gold); }
.lwf-choice.is-selected .lwf-choice__radio::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: var(--lwf-gold);
}

/* ---------- Form (Issue 6) ---------- */
.lwf-form {
	max-width: var(--lwf-form-w);
	margin: 20px auto 0;
	text-align: left;
}
.lwf-field { margin-bottom: 18px; }
.lwf-field label {
	display: block;
	color: #1a1a1a;
	font-size: var(--lwf-fs-label);
	margin-bottom: 6px;
}
.lwf-field input[type="text"],
.lwf-field input[type="email"],
.lwf-field input[type="tel"],
.lwf-field textarea,
.lwf-field select {
	width: 100%;
	background: var(--lwf-input-bg);
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 13px 15px;
	font-size: calc(var(--lwf-fs-p) - 1px);
	font-family: inherit;
	line-height: 1.4;
	color: #222;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}
.lwf-field input[type="text"],
.lwf-field input[type="email"],
.lwf-field input[type="tel"],
.lwf-field select { height: 48px; padding-top: 0; padding-bottom: 0; }
.lwf-field textarea { min-height: 84px; resize: vertical; }
.lwf-field input::placeholder,
.lwf-field textarea::placeholder { color: #a5a5a5; }
.lwf-field input:focus,
.lwf-field textarea:focus,
.lwf-field select:focus {
	border-color: var(--lwf-gold);
	background: #fbfbfb;
}
.lwf-field.has-error input,
.lwf-field.has-error textarea,
.lwf-field.has-error select { border-color: var(--lwf-error); }
.lwf-error {
	display: block;
	color: var(--lwf-error);
	font-size: 13.5px;
	margin-top: 5px;
}
.lwf-error:empty { display: none; }
.lwf-select { position: relative; }
.lwf-select::after {
	content: "";
	position: absolute;
	right: 17px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #555;
	border-bottom: 2px solid #555;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

/* Compact privacy checkbox (Critical Fix 2: real, clickable, native input) */
.lwf-field--checkbox {
	background: #fff;
	border: 1px solid #e7e7e7;
	border-radius: 10px;
	padding: 12px 14px;
}
.lwf-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	margin: 0 !important;
}
.lwf-checkbox input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	min-width: 18px;
	min-height: 18px;
	margin: 1px 0 0;
	accent-color: var(--lwf-gold);
	cursor: pointer;
}
.lwf-checkbox input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--lwf-gold);
	outline-offset: 2px;
}
.lwf-checkbox__text {
	font-size: 14px;
	line-height: 1.45;
	color: #333;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.lwf-form-error {
	color: var(--lwf-error);
	text-align: center;
	font-size: 15px;
	margin: 4px 0 0;
}

/* ---------- Progress stepper (Issue 8) ---------- */
.lwf-stepper-holder { margin-top: 18px; }
.lwf-stepper {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	margin: 8px auto 0;
	max-width: 600px;
}
.lwf-stepper__item {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	text-align: center;
	padding-top: 2px;
}
.lwf-stepper__item::before {
	content: "";
	position: absolute;
	top: 13px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: #e8e8e8;
	z-index: 0;
}
.lwf-stepper__item:first-child::before { display: none; }
.lwf-stepper__item.is-done::before,
.lwf-stepper__item.is-active::before { background: var(--lwf-gold); }

.lwf-stepper__dot {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	margin-top: 7px;
	border-radius: 50%;
	background: var(--lwf-gold);
	color: #fff;
	transition: all 0.2s ease;
}
.lwf-stepper__check { display: none; width: 12px; height: 12px; line-height: 0; }
.lwf-stepper__check svg { width: 100%; height: 100%; }

.lwf-stepper__item.is-done .lwf-stepper__dot {
	width: 24px;
	height: 24px;
	margin-top: 1px;
}
.lwf-stepper__item.is-done .lwf-stepper__check { display: inline-block; }

.lwf-stepper__item.is-active .lwf-stepper__dot {
	width: 30px;
	height: 30px;
	margin-top: -2px;
	background: color-mix(in srgb, var(--lwf-gold) 72%, #fff);
	box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--lwf-gold) 72%, #fff), inset 0 0 0 8px #ffffff;
}

.lwf-stepper__label {
	display: block;
	color: var(--lwf-gold);
	font-size: 13.5px;
	margin-top: 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0 3px;
}

/* Thank-you stepper: all completed, compact */
.lwf-stepper--done { max-width: 540px; }
.lwf-stepper--done .lwf-stepper__item::before { background: var(--lwf-gold); top: 12px; }
.lwf-stepper--done .lwf-stepper__dot { width: 24px; height: 24px; margin-top: 0; }
.lwf-stepper--done .lwf-stepper__check { display: inline-block; }
.lwf-stepper--done .lwf-stepper__label { font-size: 13px; }

/* ---------- Mobile (Issues 5/6/8 — tested 360/390/400/430) ---------- */
@media (max-width: 480px) {
	.lwf-root { padding: 0 16px 40px; }
	.lwf-header { padding: var(--lwf-header-pad-top-m) 0 var(--lwf-header-pad-bottom-m); margin: 0 -16px 18px; }
	.lwf-logo { width: var(--lwf-logo-w-m); }
	.lwf-h1 { font-size: var(--lwf-fs-h1-m); }
	.lwf-h1--light { font-size: calc(var(--lwf-fs-h1-m) * 0.82); }
	.lwf-h2 { font-size: calc(var(--lwf-fs-h1-m) * 0.82); margin-top: 24px; }
	.lwf-sub { font-size: var(--lwf-fs-p); }
	.lwf-btn { padding: 14px 16px; }
	.lwf-slider { border-radius: 13px; }
	.lwf-slider__slide img { border-radius: 13px; }
	.lwf-slider--fixed .lwf-slider__slide img { height: var(--lwf-slider-h-m); }
	.lwf-pallet { width: min(var(--lwf-pallet-w-m), 100%); }
	.lwf-choices { gap: 10px; }
	.lwf-choice__icon { width: var(--lwf-icon-business-w-m); height: var(--lwf-icon-business-h-m); }
	.lwf-choice__icon .lwf-icon-img { max-width: var(--lwf-icon-business-w-m); max-height: var(--lwf-icon-business-h-m); }
	.lwf-choice__label { font-size: 12.5px; }
	.lwf-benefit__icon { width: var(--lwf-icon-benefit-w-m); height: var(--lwf-icon-benefit-h-m); }
	.lwf-benefit__icon .lwf-icon-img { max-width: var(--lwf-icon-benefit-w-m); max-height: var(--lwf-icon-benefit-h-m); }
	.lwf-feedback .lwf-benefit__icon { width: var(--lwf-icon-feedback-w-m); height: var(--lwf-icon-feedback-h-m); }
	.lwf-feedback .lwf-benefit__icon .lwf-icon-img { max-width: var(--lwf-icon-feedback-w-m); max-height: var(--lwf-icon-feedback-h-m); }
	.lwf-field { margin-bottom: 16px; }
	.lwf-stepper__label { font-size: 11.5px; margin-top: 7px; }
	.lwf-stepper__item.is-active .lwf-stepper__dot { width: 26px; height: 26px; }
	.lwf-stepper--done .lwf-stepper__label { font-size: 10.5px; }
	.lwf-step-icon img { max-width: 76px; max-height: 76px; }
}

@media (max-width: 360px) {
	.lwf-choices { gap: 8px; }
	.lwf-stepper__label { font-size: 10.5px; }
	.lwf-stepper--done .lwf-stepper__label { font-size: 9.5px; }
}
