/*!
 * Alf Time Lost Calculator
 * Everything is scoped under .alf-calc so nothing leaks into the theme.
 *
 * Brand tokens, font and the .btn-next chevron are pulled verbatim from askalf.com's
 * live theme (--color-primary / --color-secondary / Outfit / .btn-arrow in their
 * wp-content/themes/alf/dist/style.css) so this matches the production site exactly.
 */

/* ==========================================================================
   1. Design tokens  →  sourced from askalf.com's theme CSS
   ========================================================================== */
.alf-calc {
	/* Brand */
	--alf-primary: #5b00f8;          /* buttons, progress, links — askalf --color-primary */
	--alf-primary-hover: #4a00c6;
	--alf-primary-soft: #f3eeff;     /* hover backgrounds, badges, progress track — askalf --accent-light */
	--alf-on-primary: #ffffff;

	/* Text */
	--alf-text: #10006e;             /* askalf --color-secondary / --color-neutral-content */
	--alf-text-muted: #4a5568;       /* askalf --alf-text-light */

	/* Surfaces */
	--alf-section-bg: #ffffff;       /* page sits flush white, same as askalf.com — no card chrome */
	--alf-card-bg: #ffffff;
	--alf-field-bg: #ffffff;
	--alf-border: #d7d7d7;           /* option-row border, sampled from the reference design */
	--alf-border-strong: #d7d7d7;

	/* "Time lost" signal (big result figure, errors) */
	--alf-signal: #d1432f;
	--alf-signal-soft: #fdf0ed;

	/* Typography — same Google Font as askalf.com (enqueued by the plugin) */
/* 	--alf-font-heading: 'Outfit', Helvetica, Arial, sans-serif;
	--alf-font-body: 'Outfit', Helvetica, Arial, sans-serif; */
	--alf-tracking-header: 0.08rem;

	/* Shape */
	--alf-radius-card: 20px;
	--alf-radius-control: 12px;
	--alf-radius-pill: 999px;
	--alf-shadow: 0 1px 2px rgba(20, 24, 58, 0.04), 0 12px 32px -12px rgba(20, 24, 58, 0.14);

	/* Layout */
	--alf-max-width: 760px;
	--alf-section-pad: clamp(40px, 7vw, 96px);
	--alf-panel-pad: clamp(22px, 4.5vw, 44px);
	--alf-control-h: 52px;
}

/* ==========================================================================
   2. Base + defensive resets (themes often style h1, button, input globally)
   ========================================================================== */
.alf-calc {
	background: var(--alf-section-bg);
	color: var(--alf-text);
	font-family: var(--alf-font-body);
	font-size: 16px;
	line-height: 1.55;
	padding: var(--alf-section-pad) 20px;
	-webkit-font-smoothing: antialiased;
}

.alf-calc *,
.alf-calc *::before,
.alf-calc *::after {
	box-sizing: border-box;
}

.alf-calc [hidden] {
	display: none !important;
}

.alf-calc h1,
.alf-calc h4,
.alf-calc p,
.alf-calc blockquote,
.alf-calc form {
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: normal;
}

.alf-calc button,
.alf-calc input,
.alf-calc select {
	font-family: inherit;
	font-size: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
}

.alf-calc a {
	color: var(--alf-primary);
}

.alf-calc .wrap {
	max-width: var(--alf-max-width);
	margin: 0 auto;
	padding: 0;
}

/* ==========================================================================
   3. Intro
   ========================================================================== */
.alf-calc .eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: var(--alf-radius-pill);
	background: var(--alf-primary-soft);
	color: var(--alf-primary);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 20px;
}

.alf-calc .eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.alf-calc h1 {
	font-family: var(--alf-font-heading);
	font-size: clamp(30px, 4.8vw, 48px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: normal;
	color: var(--alf-text);
	margin: 0 0 14px;
	text-wrap: balance;
	/* Reset themes that style every h1 as light gradient text (e.g. Stadia's
	   background-clip:text + transparent fill) — invisible on our white card. */
	background: none;
	-webkit-background-clip: initial;
	background-clip: initial;
	-webkit-text-fill-color: currentColor;
	opacity: 1;
}

.alf-calc .lede {
	color: var(--alf-text);
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 300;
	line-height: 1.33;
	max-width: 58ch;
}

.alf-calc #view-hero > .lede {
	margin-bottom: 32px;
}

/* ==========================================================================
   4. Card
   ========================================================================== */
.alf-calc .card {
	position: relative;
	background: var(--alf-card-bg);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}

.alf-calc .panel {
	padding: var(--alf-panel-pad);
}

/* Short reveal when a step appears (answers the user's click) */
.alf-calc section:not(#view-hero):not([hidden]) > .card {
	animation: alf-calc-in 0.28s ease-out;
}

@keyframes alf-calc-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* Hero card content */
.alf-calc .alf-hero-hook {
	font-family: var(--alf-font-heading);
	font-size: clamp(19px, 2.4vw, 22px);
	font-weight: 600;
	line-height: 1.4;
	color: var(--alf-text);
	margin: 0 0 10px;
}

.alf-calc .alf-hero-sub {
	margin-bottom: 26px;
}

.alf-calc .meta-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	font-size: 14px;
	color: var(--alf-text-muted);
}

.alf-calc .meta-row span {
	padding: 4px 12px;
	border: 1px solid var(--alf-border);
	border-radius: var(--alf-radius-pill);
	white-space: nowrap;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.alf-calc .btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--alf-control-h);
	padding: 14px 26px;
	border: 0;
	border-radius: var(--alf-radius-control);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.alf-calc .btn:active {
	transform: scale(0.985);
}

.alf-calc .btn:focus-visible,
.alf-calc .opt:focus-visible {
	outline: 3px solid var(--alf-primary);
	outline-offset: 3px;
}

.alf-calc .btn-primary,
.alf-calc .btn-primary:visited {
	background: var(--alf-primary);
	color: var(--alf-on-primary);
	/* Cut-corner octagon, same geometry as askalf.com's .box-cut-corner / CTA buttons */
	clip-path: polygon(
		14px 0%, calc(100% - 14px) 0%, 100% 14px,
		100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%,
		0% calc(100% - 14px), 0% 14px
	);
}

.alf-calc .btn-primary:hover {
	background: var(--alf-primary-hover);
	color: var(--alf-on-primary);
}

.alf-calc .btn-primary:disabled {
	opacity: 0.55;
	cursor: progress;
}

.alf-calc .btn-block {
	display: flex;
	width: 100%;
}

.alf-calc .btn-ghost {
	background: transparent;
	color: var(--alf-primary);
	min-height: 44px;
	padding: 10px 8px;
}

.alf-calc .btn-ghost:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ==========================================================================
   6. Quiz
   ========================================================================== */
/* Question counter sits above the progress bar, right-aligned (quiz step only) */
.alf-calc #view-quiz .q-num {
	text-align: right;
	color: var(--alf-text);
	font-weight: 400;
	margin-bottom: 10px;
}

/* One continuous bar — the markup still has one <i> per question (for the
   JS), but with no gap between them they read as a single flat progress
   line with a hard colour transition, matching the reference exactly. */
.alf-calc .progress {
	display: flex;
	gap: 0;
	height: 3px;
	border-radius: var(--alf-radius-pill);
	overflow: hidden;
	margin: 0 0 24px;
}

.alf-calc .progress i {
	flex: 1;
	height: 100%;
	background: var(--alf-primary-soft);
	transition: background-color 0.25s ease;
}

.alf-calc .progress i.done {
	background: var(--alf-primary);
}

.alf-calc .q-num {
	font-size: 14px;
	font-weight: 600;
	color: var(--alf-text-muted);
}

.alf-calc .q-text {
	font-family: var(--alf-font-heading);
	font-size: clamp(21px, 3vw, 26px);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--alf-text);
	margin: 8px 0 24px;
	text-wrap: balance;
}

.alf-calc .opts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

.alf-calc .opt {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 64px;
	padding: 16px 20px;
	background: var(--alf-field-bg);
	border: 2px solid var(--alf-border);
	border-radius: 8px;
	color: var(--alf-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	box-shadow: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Radio-style indicator */
.alf-calc .opt::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--alf-border-strong);
	background: var(--alf-field-bg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.alf-calc .opt:focus-visible {
	border-color: var(--alf-primary);
	background: var(--alf-primary-soft);
	color: var(--alf-text);
}

.alf-calc .opt:focus-visible::before {
	border-color: var(--alf-primary);
}

@media (hover: hover) {
	.alf-calc .opt:hover {
		border-color: var(--alf-primary);
		background: var(--alf-primary-soft);
		color: var(--alf-text);
	}

	.alf-calc .opt:hover::before {
		border-color: var(--alf-primary);
	}
}

.alf-calc .opt:active::before {
	box-shadow: inset 0 0 0 4px var(--alf-field-bg), inset 0 0 0 10px var(--alf-primary);
}

/* Confirmed answer (persists until the user picks a different option) */
.alf-calc .opt.selected {
	border-color: var(--alf-primary);
	background: var(--alf-card-bg);
	color: var(--alf-text);
}

.alf-calc .opt.selected::before {
	border-color: var(--alf-primary);
	background: var(--alf-primary);
	box-shadow: inset 0 0 0 4px var(--alf-field-bg);
}

.alf-calc .opt.selected:hover {
	background: var(--alf-card-bg);
}

/* ==========================================================================
   6b. Quiz navigation (back + next)
   ========================================================================== */
.alf-calc .quiz-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
}

.alf-calc .btn-back {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 52px;
	height: 52px;
	padding: 0;
	background: var(--alf-field-bg);
	border: 1.5px solid var(--alf-border-strong);
	border-radius: var(--alf-radius-control);
	color: var(--alf-primary);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.alf-calc .btn-back:hover {
	border-color: var(--alf-primary);
	background: var(--alf-primary-soft);
}

.alf-calc .btn-back:focus-visible {
	outline: 3px solid var(--alf-primary);
	outline-offset: 3px;
}

/* askalf.com's .btn-arrow shape, sized up to read as the primary CTA of the step
   (the production nav button this is based on is a small compact pill by comparison). */
.alf-calc .btn-next {
	flex: none;
	width: auto;
	min-height: 45px;
	padding: 0 70px;
	font-size: 1rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--alf-tracking-header);
	border-radius: 0;
	clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);

}

/* ==========================================================================
   7. Lead form
   ========================================================================== */
.alf-calc form.leadform {
	display: grid;
	gap: 18px;
}

.alf-calc .two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

@media (max-width: 560px) {
	.alf-calc .two-col {
		grid-template-columns: 1fr;
	}
}

.alf-calc label {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--alf-text);
	text-transform: none;
	letter-spacing: normal;
}

.alf-calc .alf-optional {
	font-weight: 400;
	color: var(--alf-text-muted);
}

.alf-calc input[type="text"],
.alf-calc input[type="email"],
.alf-calc select {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: var(--alf-control-h);
	padding: 0 16px;
	background-color: var(--alf-field-bg);
	border: 1.5px solid var(--alf-border);
	border-radius: var(--alf-radius-control);
	color: var(--alf-text);
	font-size: 16px; /* 16px avoids iOS zoom on focus */
	line-height: 1.2;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.alf-calc select {
	padding-right: 44px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6178' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
}

.alf-calc input[type="text"]:hover,
.alf-calc input[type="email"]:hover,
.alf-calc select:hover {
	border-color: var(--alf-border-strong);
}

.alf-calc input[type="text"]:focus,
.alf-calc input[type="email"]:focus,
.alf-calc select:focus {
	outline: none;
	border-color: var(--alf-primary);
	box-shadow: 0 0 0 4px var(--alf-primary-soft);
}

.alf-calc input:user-invalid,
.alf-calc select:user-invalid {
	border-color: var(--alf-signal);
}

/* Consent checkbox */
.alf-calc label.consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 4px 0 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--alf-text-muted);
	cursor: pointer;
}

.alf-calc label.consent input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	-webkit-appearance: none;
	appearance: none;
	background: #ffffff;
	border: 1px solid var(--alf-border-strong);
	border-radius: 4px;
	accent-color: var(--alf-primary);
	cursor: pointer;
}

.alf-calc label.consent input[type="checkbox"]:checked {
	background: var(--alf-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
	border-color: var(--alf-primary);
}

.alf-calc label.consent a {
	color: var(--alf-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.alf-calc .error-text {
	padding: 12px 14px;
	border-radius: var(--alf-radius-control);
	background: var(--alf-signal-soft);
	color: var(--alf-signal);
	font-size: 14px;
	font-weight: 500;
}

.alf-calc #btn-submit {
	margin-top: 6px;
}

/* Honeypot: hidden from people, visible to bots */
.alf-calc .alf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   8. Result
   ========================================================================== */
.alf-calc #r-hello {
	text-align: center;
}

.alf-calc .result-figure {
	text-align: center;
	padding: 10px 0 14px;
}

.alf-calc .result-figure .n {
	font-family: var(--alf-font-heading);
	font-size: clamp(72px, 16vw, 120px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--alf-signal);
	font-variant-numeric: tabular-nums;
}

.alf-calc .result-figure .u {
	margin-top: 8px;
	font-size: 16px;
	font-weight: 500;
	color: var(--alf-text-muted);
}

.alf-calc .result-headline {
	max-width: 30em;
	margin: 0 auto 8px;
	font-family: var(--alf-font-heading);
	font-size: clamp(18px, 2.4vw, 21px);
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-wrap: balance;
}

.alf-calc .alf-r-days {
	max-width: 46ch;
	margin: 0 auto 28px;
	font-size: 15px;
	text-align: center;
}

/* Cost: the one dark block on the page */
.alf-calc .cost-box {
	margin: 0 0 32px;
	padding: 24px 22px;
	border-radius: 16px;
	background: var(--alf-primary);
	color: var(--alf-on-primary);
	text-align: center;
}

.alf-calc .cost-box .amount {
	font-family: var(--alf-font-heading);
	font-size: clamp(28px, 5vw, 38px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.alf-calc .cost-box .sub {
	max-width: 52ch;
	margin: 8px auto 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.82;
}

/* Recommendations (ranked, so numbered) */
.alf-calc .recs {
	display: grid;
	gap: 0;
	margin: 0 0 28px;
	border-top: 1px solid var(--alf-border);
}

.alf-calc .rec {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--alf-border);
}

.alf-calc .rec .dot {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--alf-primary-soft);
	color: var(--alf-primary);
	font-size: 15px;
	font-weight: 700;
}

.alf-calc .rec h4 {
	margin: 4px 0 4px;
	font-family: var(--alf-font-heading);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--alf-text);
}

.alf-calc .rec p {
	font-size: 15px;
	line-height: 1.55;
	color: var(--alf-text-muted);
}

/* Founder quote */
.alf-calc blockquote {
	margin: 0 0 28px;
	padding: 22px 24px;
	border: 0;
	border-left: 4px solid var(--alf-primary);
	border-radius: 0 14px 14px 0;
	background: var(--alf-section-bg);
	color: var(--alf-text);
	font-size: 16px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.6;
	quotes: none;
}

.alf-calc blockquote::before,
.alf-calc blockquote::after {
	content: none;
}

.alf-calc blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	font-style: normal;
	font-weight: 600;
	color: var(--alf-text-muted);
}

.alf-calc .alf-secondary-cta {
	margin-top: 10px;
	text-align: center;
}

/* ==========================================================================
   9. Footer line
   ========================================================================== */
.alf-calc .foot {
	margin-top: 28px;
	font-size: 14px;
	text-align: center;
	color: var(--alf-text-muted);
}

/* ==========================================================================
   10. Small screens + motion preferences
   ========================================================================== */
@media (max-width: 480px) {
	.alf-calc {
		padding-left: 16px;
		padding-right: 16px;
	}

	.alf-calc .card {
		border-radius: 16px;
	}

	.alf-calc blockquote {
		padding: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alf-calc *,
	.alf-calc *::before,
	.alf-calc *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* 12-10-2026 */
.page-id-13427 .gradient-footer.z-1 { display: none; }

.alf-calc #view-hero .card, .page-id-13360 #view-hero .panel, .page-id-13360 #view-quiz .card,
.alf-calc #view-quiz .panel, .alf-calc #view-form .card, .alf-calc #view-form .panel, .alf-calc #view-result .card, .alf-calc #view-result .panel { padding: 0px; }

.alf-calc #view-hero .panel, .alf-calc #view-quiz .panel, .alf-calc #view-form .panel, .alf-calc #view-result .panel { padding: 40px 0px; }

.alf-calc #view-hero .card:after, .alf-calc #view-quiz .card:after, .alf-calc #view-form .card:after, .alf-calc #view-result .card:after { display: none; }
