/**
 * Digifom Lead Funnel — theme-isolated frontend styles.
 * All rules are scoped to .dlf-funnel only.
 */

/* ------------------------------------------------------------------ tokens */
.dlf-funnel {
	--dlf-brand: #e8430a;
	--dlf-brand-hover: #d63c06;
	--dlf-text: #181512;
	--dlf-muted: #6c625b;
	--dlf-line: #ebe6e2;
	--dlf-bg: #faf8f6;
	--dlf-soft: #fff3ef;
	--dlf-white: #fff;
	--dlf-focus: rgba(232, 67, 10, 0.14);
	--dlf-radius-sm: 12px;
	--dlf-radius-md: 14px;
	--dlf-radius-lg: 18px;
}

/* ------------------------------------------------------------------ local reset */
.dlf-funnel,
.dlf-funnel *,
.dlf-funnel *::before,
.dlf-funnel *::after {
	box-sizing: border-box;
}

.dlf-funnel {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 400;
	color: var(--dlf-text);
	text-align: left;
	background: transparent;
	border: 0;
	float: none;
	position: relative;
	overflow: visible;
}

.dlf-funnel h1,
.dlf-funnel h2,
.dlf-funnel h3,
.dlf-funnel h4,
.dlf-funnel p,
.dlf-funnel ul,
.dlf-funnel ol,
.dlf-funnel li,
.dlf-funnel label,
.dlf-funnel form,
.dlf-funnel section {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	list-style: none;
}

.dlf-funnel button,
.dlf-funnel input,
.dlf-funnel select,
.dlf-funnel textarea {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	outline: none;
	min-height: 0;
	width: auto;
	max-width: none;
}

.dlf-funnel button {
	cursor: pointer;
}

.dlf-funnel img,
.dlf-funnel svg {
	display: block;
	max-width: 100%;
	height: auto;
}

.dlf-funnel [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ layout */
.dlf-funnel .dlf-funnel__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.11em;
	font-size: 11px;
	font-weight: 700;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-percent {
	letter-spacing: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-progress {
	display: block;
	height: 5px;
	background: #efe9e4;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 16px;
}

.dlf-funnel .dlf-progress span {
	display: block;
	height: 100%;
	width: 25%;
	background: var(--dlf-brand);
	border-radius: 999px;
	transition: width 0.24s ease;
}

.dlf-funnel .dlf-card {
	display: block;
	width: 100%;
	max-width: 100%;
	background: var(--dlf-white);
	border: 1px solid var(--dlf-line);
	border-radius: var(--dlf-radius-lg);
	box-shadow: none;
	padding: 0;
	overflow: visible;
}

/* Step titles stay below landing page form heading (~22px) */
.dlf-funnel .dlf-step h2 {
	font-size: clamp(16px, 1.8vw, 20px);
	line-height: 1.25;
	font-weight: 650;
	letter-spacing: -0.02em;
	color: var(--dlf-text);
	margin-bottom: 6px;
}

.dlf-funnel .dlf-sub {
	font-size: 14px;
	line-height: 1.5;
	color: var(--dlf-muted);
	margin-bottom: 18px;
}

.dlf-funnel .dlf-step {
	display: block;
	width: 100%;
}

/* ------------------------------------------------------------------ card options */
.dlf-funnel .dlf-options {
	display: grid;
	gap: 10px;
}

.dlf-funnel .dlf-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	border: 1px solid var(--dlf-line);
	border-radius: var(--dlf-radius-md);
	padding: 14px 15px;
	background: var(--dlf-white);
	cursor: pointer;
	transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.dlf-funnel .dlf-option:hover {
	border-color: rgba(232, 67, 10, 0.42);
	transform: translateY(-1px);
}

.dlf-funnel .dlf-option input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	border: 2px solid #dfd7cf;
	border-radius: 50%;
	background: var(--dlf-white);
}

.dlf-funnel .dlf-option.is-selected,
.dlf-funnel .dlf-option:has(input:checked) {
	border-color: var(--dlf-brand);
	background: var(--dlf-soft);
}

.dlf-funnel .dlf-option input:checked {
	border: 5px solid var(--dlf-brand);
	background: var(--dlf-white);
}

.dlf-funnel .dlf-option strong {
	display: block;
	font-size: 15px;
	line-height: 1.25;
	font-weight: 650;
	color: var(--dlf-text);
}

.dlf-funnel .dlf-option small {
	display: block;
	color: var(--dlf-muted);
	font-size: 13px;
	line-height: 1.4;
	margin-top: 4px;
	font-weight: 400;
}

/* ------------------------------------------------------------------ fields */
.dlf-funnel .dlf-two-fields,
.dlf-funnel .dlf-grid,
.dlf-funnel .dlf-checkgrid {
	display: grid;
	gap: 12px;
}

.dlf-funnel .dlf-two-fields {
	grid-template-columns: 1fr 1fr;
}

.dlf-funnel .dlf-grid {
	grid-template-columns: 1fr 1fr;
}

.dlf-funnel .dlf-checkgrid {
	grid-template-columns: 1fr 1fr;
	margin-bottom: 14px;
}

.dlf-funnel .dlf-select-label,
.dlf-funnel .dlf-label,
.dlf-funnel .dlf-grid label {
	display: grid;
	gap: 7px;
	font-size: 13px;
	font-weight: 650;
	color: var(--dlf-text);
}

.dlf-funnel .dlf-select-label select,
.dlf-funnel .dlf-grid input,
.dlf-funnel .dlf-step textarea {
	display: block;
	width: 100%;
	border: 1px solid var(--dlf-line);
	border-radius: var(--dlf-radius-md);
	padding: 12px 14px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	background: var(--dlf-white);
	color: var(--dlf-text);
	min-height: 48px;
}

.dlf-funnel .dlf-select-label select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c625b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.dlf-funnel .dlf-step textarea {
	resize: vertical;
	min-height: 108px;
}

.dlf-funnel .dlf-textarea-label {
	margin-top: 6px;
}

.dlf-funnel .dlf-check {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: 1px solid var(--dlf-line);
	border-radius: var(--dlf-radius-md);
	padding: 13px 14px;
	background: var(--dlf-white);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	transition: border-color 0.16s ease, background 0.16s ease;
}

.dlf-funnel .dlf-check:hover {
	border-color: rgba(232, 67, 10, 0.42);
}

.dlf-funnel .dlf-check input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2px solid #dfd7cf;
	border-radius: 5px;
	background: var(--dlf-white);
}

.dlf-funnel .dlf-check.is-selected,
.dlf-funnel .dlf-check:has(input:checked) {
	border-color: var(--dlf-brand);
	background: var(--dlf-soft);
}

.dlf-funnel .dlf-check input:checked {
	background: var(--dlf-brand);
	border-color: var(--dlf-brand);
	box-shadow: inset 0 0 0 3px var(--dlf-white);
}

/* ------------------------------------------------------------------ focus (single indicator — no stacked border + shadow + outline) */
.dlf-funnel *:focus-visible {
	outline: none;
}

.dlf-funnel input:focus,
.dlf-funnel input:focus-visible,
.dlf-funnel select:focus,
.dlf-funnel select:focus-visible,
.dlf-funnel textarea:focus,
.dlf-funnel textarea:focus-visible {
	outline: none;
	box-shadow: none;
	background: var(--dlf-white);
}

.dlf-funnel .dlf-select-label select:focus,
.dlf-funnel .dlf-select-label select:focus-visible,
.dlf-funnel .dlf-grid input:focus,
.dlf-funnel .dlf-grid input:focus-visible,
.dlf-funnel .dlf-step textarea:focus,
.dlf-funnel .dlf-step textarea:focus-visible {
	border-color: var(--dlf-brand);
}

.dlf-funnel .dlf-option:focus-within,
.dlf-funnel .dlf-check:focus-within {
	outline: none;
	box-shadow: none;
}

.dlf-funnel .dlf-option:focus-within:not(:has(input:checked)),
.dlf-funnel .dlf-check:focus-within:not(:has(input:checked)) {
	border-color: rgba(232, 67, 10, 0.65);
}

.dlf-funnel .dlf-option:has(input:checked),
.dlf-funnel .dlf-option:has(input:checked):focus-within,
.dlf-funnel .dlf-check:has(input:checked),
.dlf-funnel .dlf-check:has(input:checked):focus-within {
	outline: none;
	box-shadow: none;
}

.dlf-funnel .dlf-btn:focus-visible {
	outline: 2px solid var(--dlf-brand);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ actions */
.dlf-funnel .dlf-turnstile {
	display: flex;
	justify-content: flex-start;
	margin-top: 18px;
	min-height: 65px;
}

.dlf-funnel .dlf-turnstile[hidden] {
	display: none !important;
}

.dlf-funnel .dlf-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 20px;
}

.dlf-funnel .dlf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 13px 18px;
	border-radius: var(--dlf-radius-sm);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dlf-funnel .dlf-btn:hover {
	transform: translateY(-1px);
}

.dlf-funnel .dlf-btn--primary {
	background: var(--dlf-brand);
	color: var(--dlf-white);
	border: 1px solid var(--dlf-brand);
	box-shadow: 0 10px 22px rgba(232, 67, 10, 0.18);
}

.dlf-funnel .dlf-btn--primary:hover,
.dlf-funnel .dlf-btn--primary:focus-visible {
	background: var(--dlf-brand-hover);
	border-color: var(--dlf-brand-hover);
	color: var(--dlf-white);
}

.dlf-funnel .dlf-btn--primary:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.dlf-funnel .dlf-btn--secondary {
	background: var(--dlf-white);
	color: var(--dlf-text);
	border: 1px solid var(--dlf-line);
	box-shadow: none;
}

.dlf-funnel .dlf-btn--secondary:hover,
.dlf-funnel .dlf-btn--secondary:focus-visible {
	background: var(--dlf-bg);
	color: var(--dlf-text);
	border-color: #ddd7cf;
}

.dlf-funnel .dlf-actions .dlf-btn--primary {
	order: 1;
}

.dlf-funnel .dlf-actions .dlf-btn--secondary {
	order: 2;
}

.dlf-funnel .dlf-req {
	color: var(--dlf-brand);
	font-weight: 700;
}

.dlf-funnel .dlf-step-note {
	margin: -10px 0 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-optional {
	font-size: 12px;
	font-weight: 500;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-select-label span,
.dlf-funnel .dlf-label span,
.dlf-funnel .dlf-grid label > span {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
	flex-wrap: wrap;
}

.dlf-funnel .dlf-privacy {
	margin: 14px 0 0;
	text-align: center;
	font-size: 12px;
	line-height: 1.55;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-privacy a {
	color: var(--dlf-brand);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.dlf-funnel .dlf-privacy a:hover {
	color: var(--dlf-brand-hover);
}

.dlf-funnel .dlf-secure {
	margin: 8px 0 0;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--dlf-muted);
}

.dlf-funnel .dlf-message {
	min-height: 22px;
	margin-top: 10px;
	color: var(--dlf-brand);
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.dlf-funnel .dlf-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
	.dlf-funnel .dlf-two-fields,
	.dlf-funnel .dlf-grid,
	.dlf-funnel .dlf-checkgrid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.dlf-funnel {
		font-size: 15px;
	}

	.dlf-funnel .dlf-step h2 {
		font-size: clamp(15px, 3.8vw, 17px);
		line-height: 1.2;
	}

	.dlf-funnel .dlf-sub {
		font-size: 13px;
		margin-bottom: 16px;
	}

	.dlf-funnel .dlf-option {
		padding: 13px 14px;
	}

	.dlf-funnel .dlf-option strong {
		font-size: 14px;
	}
}

@media (max-width: 430px) {
	.dlf-funnel .dlf-option small {
		display: none;
	}

	.dlf-funnel .dlf-select-label select,
	.dlf-funnel .dlf-grid input,
	.dlf-funnel .dlf-step textarea {
		min-height: 46px;
		font-size: 16px; /* prevents iOS zoom */
	}
}

@media (max-width: 375px) {
	.dlf-funnel .dlf-btn {
		min-height: 46px;
		padding-inline: 14px;
	}
}

@media (min-width: 1024px) {
	.dlf-funnel .dlf-actions {
		grid-template-columns: 1fr 1fr;
	}

	.dlf-funnel .dlf-card:not(.is-final) .dlf-btn--primary[data-dlf-next] {
		grid-column: 2;
	}

	.dlf-funnel .dlf-actions .dlf-btn--primary,
	.dlf-funnel .dlf-actions .dlf-btn--secondary {
		order: unset;
	}
}
