/*
 * Find My Path.
 *
 * Two rules shape everything here:
 *
 * 1. The card sizes itself against its own container, not the viewport. The
 *    Elementor box it mounts into is 300px today and may be stretched at any
 *    time, and a layout keyed to the viewport would not notice.
 * 2. Colour and type come from the Elementor global kit through CSS variables,
 *    with the current kit values as fallbacks. If ICCI restyles the site, this
 *    card follows instead of drifting out of the brand.
 *
 * Orange is reserved for the one action that moves the visitor forward. It is
 * never decoration — that restraint is what keeps the card from reading as a
 * widget bolted onto the page.
 */

.icci-pf {
	container-type: inline-size;

	--pf-navy: var(--e-global-color-primary, #194c85);
	--pf-navy-deep: var(--e-global-color-secondary, #15375d);
	--pf-text: var(--e-global-color-text, #222222);
	--pf-orange: var(--e-global-color-bf5e98a, #e67702);
	--pf-blue: var(--e-global-color-7f0ca48, #0083d0);
	--pf-blue-deep: var(--e-global-color-f6d6513, #0166a1);
	--pf-blue-grad: var(--e-global-color-6a23fc1, #005d94);
	--pf-surface: var(--e-global-color-9325ff4, #f9f9f9);

	--pf-muted: #5a6673;
	--pf-line: #dde3ea;
	--pf-radius: 10px;
	--pf-gap: clamp(1rem, 2.5cqi, 1.5rem);

	color: var(--pf-text);
	font-family: var(--e-global-typography-text-font-family, Roboto), system-ui, sans-serif;
	line-height: 1.6;
	text-align: left;
}

.icci-pf *,
.icci-pf *::before,
.icci-pf *::after {
	box-sizing: border-box;
}

/*
 * Themes routinely set display on buttons and sections, which beats the
 * user-agent rule for [hidden] and leaves controls on screen that the script
 * believes it has hidden. Everything here is toggled by that attribute, so it
 * has to win inside this card.
 */
.icci-pf [hidden] {
	display: none !important;
}

/* --- The path ---------------------------------------------------------- */

/*
 * Four waypoints rather than a progress bar. The page is called Find My Path,
 * and a bar would only report how far along you are; the waypoints also carry
 * what you answered, so the journey stays legible and editable.
 */
.pf-path {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	margin: 0 0 clamp(1.5rem, 4cqi, 2.5rem);
	padding: 0;
	list-style: none;
}

.pf-path__step {
	flex: 1 1 8rem;
	min-width: 0;
}

/*
 * The whole waypoint is the hit target. Disabled until that question has an
 * answer, so it never promises a jump it cannot make.
 */
.pf-path__button {
	display: block;
	width: 100%;
	padding: 0.7rem 0 0;
	border: 0;
	border-top: 3px solid var(--pf-line);
	border-radius: 0;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.24s ease, opacity 0.18s ease;
}

/*
 * The background is neutralised in every state, disabled included. Writing this
 * as :hover:not([disabled]) left the disabled case — which is the step you are
 * currently on — with no rule at all, and the theme filled it magenta.
 */
.pf-path__button,
.pf-path__button:hover,
.pf-path__button:focus,
.pf-path__button:active,
.pf-path__button[disabled]:hover,
.pf-path__button[disabled]:focus {
	background: none;
}

.pf-path__button[disabled] {
	cursor: default;
}

/* Only an answered step you are not on advertises that it can be clicked. */
.pf-path__button:hover:not([disabled]),
.pf-path__button:focus-visible:not([disabled]) {
	border-top-color: var(--pf-blue);
}

.pf-path__button:hover:not([disabled]) .pf-path__answer,
.pf-path__button:focus-visible:not([disabled]) .pf-path__answer {
	color: var(--pf-blue-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pf-path__button:focus-visible {
	outline: 3px solid var(--pf-blue);
	outline-offset: 3px;
}

.pf-path__step[data-pf-state="done"] .pf-path__button {
	border-top-color: #9fb3c8;
}

/*
 * The step you are on is the loudest thing in the row: a full-weight navy rule
 * against the muted rules of the steps already answered. Without it, coming
 * back to change one answer looks identical to having answered all four.
 */
.pf-path__step[data-pf-state="current"] .pf-path__button {
	border-top-color: var(--pf-navy);
	border-top-width: 5px;
	padding-top: calc(0.7rem - 2px);
}

.pf-path__name {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #8a95a1;
}

.pf-path__step[data-pf-state="done"] .pf-path__name {
	color: #6c7c8c;
}

.pf-path__step[data-pf-state="current"] .pf-path__name {
	color: var(--pf-navy);
}

/*
 * Empty until answered, and it holds its height so the question below does not
 * jump down by a line the moment a chip appears.
 */
.pf-path__answer {
	display: block;
	min-height: 1.4em;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pf-navy-deep);
}

/* --- Questions --------------------------------------------------------- */

.pf-question {
	margin: 0;
	padding: 0;
	border: 0;
}

.pf-question[hidden] {
	display: none;
}

.pf-question__legend {
	padding: 0;
	margin: 0 0 var(--pf-gap);
	font-family: var(--e-global-typography-23db516-font-family, Inter), system-ui, sans-serif;
	font-size: clamp(1.375rem, 3.4cqi, 1.875rem);
	font-weight: 700;
	line-height: 1.25;
	color: var(--pf-navy);
}

.pf-options {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1fr;
}

/*
 * The card is a control, not prose. Left selectable, dragging or double-clicking
 * across it paints the label with the browser's selection highlight — a dark
 * band with inverted text that reads as a broken hover state, and it lingers
 * after the click that set it.
 */
.pf-option {
	position: relative;
	display: block;
	padding: clamp(1rem, 2.4cqi, 1.4rem);
	border: 2px solid var(--pf-line);
	border-radius: var(--pf-radius);
	background: #fff;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

/*
 * Hover states are declared in full rather than left to inherit. Styling only
 * one property is what let the theme paint the buttons in this card crimson.
 */
.pf-option:hover {
	border-color: var(--pf-blue);
	background: #f5fafe;
}

.pf-option:hover .pf-option__label {
	color: var(--pf-navy-deep);
}

.pf-option:hover .pf-option__help {
	color: var(--pf-muted);
}

/* Checked stays the heavier state: navy border against hover's blue. */
.pf-option:has(.pf-option__input:checked),
.pf-option:has(.pf-option__input:checked):hover {
	border-color: var(--pf-navy);
	background: var(--pf-surface);
}

.pf-option:has(.pf-option__input:focus-visible) {
	outline: 3px solid var(--pf-blue);
	outline-offset: 2px;
}

.pf-option__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.pf-option__label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: clamp(1.0625rem, 1.9cqi, 1.1875rem);
	font-weight: 600;
	color: var(--pf-navy-deep);
}

.pf-option__help {
	display: block;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--pf-muted);
}

.pf-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	margin-top: var(--pf-gap);
}

/*
 * Every state is declared, including hover and active. The theme paints bare
 * <button> elements crimson on hover, and styling only the resting state lets
 * that through — which is exactly what happened the first time.
 */
.pf-back,
.pf-resume {
	padding: 0.5rem 0;
	border: 0;
	border-radius: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	color: var(--pf-navy);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.18s ease;
}

.pf-back:hover,
.pf-back:active,
.pf-back:focus,
.pf-resume:hover,
.pf-resume:active,
.pf-resume:focus {
	background: none;
	color: var(--pf-blue-deep);
}

.pf-back:focus-visible,
.pf-resume:focus-visible {
	outline: 3px solid var(--pf-blue);
	outline-offset: 2px;
}

.pf-noscript {
	margin: var(--pf-gap) 0 0;
	color: var(--pf-muted);
}

/* --- Result ------------------------------------------------------------ */

.pf-result[hidden] {
	display: none;
}

.pf-result__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pf-blue);
}

.pf-result__title {
	margin: 0 0 clamp(1.25rem, 3cqi, 2rem);
	font-family: var(--e-global-typography-23db516-font-family, Inter), system-ui, sans-serif;
	font-size: clamp(1.5rem, 3.8cqi, 2.125rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--pf-navy);
}

.pf-result__title:focus-visible {
	outline: 3px solid var(--pf-blue);
	outline-offset: 4px;
}

.pf-result__body {
	display: grid;
	gap: clamp(1.5rem, 4cqi, 2.5rem);
	grid-template-columns: 1fr;
	align-items: start;
}

.pf-start {
	padding-bottom: var(--pf-gap);
	margin-bottom: var(--pf-gap);
	border-bottom: 1px solid var(--pf-line);
}

.pf-start__label {
	margin: 0 0 0.15rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

.pf-start__name {
	margin: 0;
	font-size: clamp(1.125rem, 2.4cqi, 1.375rem);
	font-weight: 700;
	color: var(--pf-navy-deep);
}

.pf-panel + .pf-panel {
	margin-top: var(--pf-gap);
	padding-top: var(--pf-gap);
	border-top: 1px solid var(--pf-line);
}

.pf-panel__title {
	margin: 0 0 0.75rem;
	font-family: var(--e-global-typography-23db516-font-family, Inter), system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--pf-navy);
}

.pf-facts {
	display: grid;
	gap: 0.75rem 1.5rem;
	grid-template-columns: 1fr;
	margin: 0;
}

.pf-fact[hidden] {
	display: none;
}

.pf-fact dt {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--pf-muted);
}

.pf-fact dd {
	margin: 0;
}

.pf-fact__value {
	font-size: clamp(1.25rem, 2.6cqi, 1.625rem);
	font-weight: 700;
	line-height: 1.3;
	color: var(--pf-navy-deep);
}

/*
 * Sits with the figures rather than under the button, because it is the figures
 * it is qualifying.
 */
.pf-caveat {
	margin: var(--pf-gap) 0 0;
	padding: 0.85rem 1rem;
	border-left: 3px solid var(--pf-orange);
	background: var(--pf-surface);
	font-size: 0.9375rem;
	color: var(--pf-navy-deep);
}

.pf-caveat[hidden] {
	display: none;
}

.pf-footnote {
	margin: var(--pf-gap) 0 0;
	font-size: 0.8125rem;
	color: var(--pf-muted);
}

.pf-result__figure {
	margin: 0;
}

.pf-result__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--pf-radius);
}

.pf-note {
	margin-top: clamp(1.5rem, 4cqi, 2.5rem);
	padding: clamp(1.25rem, 3cqi, 2rem);
	border-radius: var(--pf-radius);
	background: linear-gradient(135deg, var(--pf-blue-grad), var(--pf-blue-deep));
	color: #fff;
}

.pf-note p {
	margin: 0;
	font-size: clamp(1rem, 2cqi, 1.125rem);
}

.pf-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: center;
	margin-top: var(--pf-gap);
}

.pf-cta {
	display: inline-block;
	padding: 0.9rem 1.75rem;
	border-radius: 4px;
	background: var(--pf-orange);
	color: #fff;
	font-weight: 700;
	font-size: 1.0625rem;
	text-decoration: none;
	transition: filter 0.18s ease;
}

.pf-cta:hover,
.pf-cta:focus-visible {
	filter: brightness(0.93);
	color: #fff;
}

/*
 * Secondary on purpose. It competes with the orange call to action for the same
 * glance, so it is muted text with no underline until you reach for it.
 */
.pf-retake {
	padding: 0.9rem 0;
	border: 0;
	border-radius: 0;
	background: none;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--pf-muted);
	cursor: pointer;
	text-decoration: none;
	transition: color 0.18s ease;
}

.pf-retake:hover,
.pf-retake:active,
.pf-retake:focus {
	background: none;
	color: var(--pf-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pf-retake:focus-visible {
	outline: 3px solid var(--pf-blue);
	outline-offset: 2px;
}

/* --- Email this path --------------------------------------------------- */

.pf-lead {
	margin-top: clamp(1.5rem, 4cqi, 2.25rem);
	padding-top: var(--pf-gap);
	border-top: 1px solid var(--pf-line);
}

.pf-lead__label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--pf-navy-deep);
}

.pf-lead__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pf-lead__input {
	flex: 1 1 14rem;
	padding: 0.75rem 0.9rem;
	border: 2px solid var(--pf-line);
	border-radius: 4px;
	font: inherit;
	color: var(--pf-text);
}

.pf-lead__input:focus-visible {
	outline: 3px solid var(--pf-blue);
	outline-offset: 1px;
}

.pf-lead__submit {
	padding: 0.75rem 1.5rem;
	border: 2px solid var(--pf-navy);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-weight: 700;
	color: var(--pf-navy);
	cursor: pointer;
}

.pf-lead__submit:hover {
	background: var(--pf-surface);
}

.pf-lead__consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin-top: 0.75rem;
	font-size: 0.9375rem;
	color: var(--pf-muted);
}

.pf-lead__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pf-lead__status {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	color: var(--pf-navy-deep);
}

.pf-lead__status[data-pf-state="error"] {
	color: #a4262c;
}

/* --- Container breakpoints --------------------------------------------- */

@container (min-width: 680px) {
	.pf-options {
		grid-template-columns: repeat(3, 1fr);
	}

	.pf-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * 800px, not 900px: the Elementor box on Find My Path measures 880px wide, so a
 * 900px threshold would keep the two-column result permanently switched off in
 * the one place it actually runs.
 */
@container (min-width: 800px) {
	.pf-result__body {
		grid-template-columns: 1.15fr 0.85fr;
	}
}

/* --- Motion ------------------------------------------------------------ */

.pf-question:not([hidden]),
.pf-result:not([hidden]) {
	animation: pf-rise 0.2s ease-out both;
}

@keyframes pf-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.icci-pf *,
	.icci-pf *::before,
	.icci-pf *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
