/**
 * I-FRESH quote request application.
 *
 * Every rule is scoped under .ifresh-quote-app or the page-level body class, * so nothing here can reach any other page of the site.
 *
 * Mobile first. Values follow the Figma nodes: mobile 390 / tablet 768 /
 * desktop 1440, with content widths of 358 / 680 / 920.
 */

.ifresh-quote-app {
	--ifqr-bg: #f5f7f2;
	--ifqr-surface: #ffffff;
	--ifqr-border: #d9e0d6;
	--ifqr-text: #2e3630;
	--ifqr-muted: #6e7570;
	--ifqr-accent: #85ba3d;
	--ifqr-primary: #4f7d33;
	--ifqr-selected: #f0f7e8;
	--ifqr-warn-bg: #fff5d6;
	--ifqr-warn-text: #785c12;
	--ifqr-danger: #b3261e;
	--ifqr-calendar: #84b93d;

	--ifqr-radius-card: 18px;
	--ifqr-radius-field: 10px;
	--ifqr-radius-button: 12px;

	--ifqr-shell: 358px;
	--ifqr-card-pad: 20px;
	--ifqr-gutter: 16px;

	direction: rtl;
	box-sizing: border-box;
	display: block;
	min-height: 100vh;
	margin: 0;
	padding: 24px var(--ifqr-gutter) 48px;
	background: var(--ifqr-bg);
	color: var(--ifqr-text);
	font-family: "Assistant", "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

body.ifqr-body {
	margin: 0;
	background: #f5f7f2;
}

.ifresh-quote-app *,
.ifresh-quote-app *::before,
.ifresh-quote-app *::after {
	box-sizing: inherit;
}

.ifresh-quote-app .ifqr-shell {
	width: 100%;
	max-width: var(--ifqr-shell);
	margin: 0 auto;
}

/* ---------------------------------------------------------- brand */

.ifresh-quote-app .ifqr-brand {
	text-align: center;
	margin-bottom: 56px;
}

.ifresh-quote-app .ifqr-brand__link {
	display: inline-block;
	text-decoration: none;
	line-height: 0;
}

.ifresh-quote-app .ifqr-brand__logo {
	display: block;
	width: auto;
	height: 64px;
	max-width: 100%;
	/* The asset is transparent, so it sits on the page background as artwork. */
	object-fit: contain;
}

.ifresh-quote-app .ifqr-brand__text {
	font-size: 26px;
	font-weight: 700;
	color: var(--ifqr-text);
	line-height: 1.2;
}

/* ---------------------------------------------------------- intro */

.ifresh-quote-app .ifqr-title {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ifqr-text);
}

.ifresh-quote-app .ifqr-lede {
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ifqr-muted);
}

.ifresh-quote-app .ifqr-stepline {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ifqr-muted);
}

.ifresh-quote-app .ifqr-progress {
	display: flex;
	gap: 6px;
	margin-bottom: 34px;
}

.ifresh-quote-app .ifqr-progress__bar {
	flex: 1 1 0;
	height: 6px;
	border-radius: 3px;
	background: var(--ifqr-border);
	transition: background-color 0.25s ease;
}

.ifresh-quote-app .ifqr-progress__bar.is-active {
	background: var(--ifqr-accent);
}

/* ---------------------------------------------------------- card */

.ifresh-quote-app .ifqr-card {
	background: var(--ifqr-surface);
	border: 1px solid var(--ifqr-border);
	border-radius: var(--ifqr-radius-card);
	padding: 28px var(--ifqr-card-pad);
	margin-bottom: 22px;
}

.ifresh-quote-app .ifqr-card__title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ifqr-text);
}

.ifresh-quote-app .ifqr-card__subtitle {
	margin: 0 0 26px;
	font-size: 14px;
	color: var(--ifqr-muted);
}

.ifresh-quote-app .ifqr-section {
	margin: 30px 0 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--ifqr-text);
}

/* ---------------------------------------------------------- fields */

.ifresh-quote-app .ifqr-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.ifresh-quote-app .ifqr-field {
	min-width: 0;
}

.ifresh-quote-app .ifqr-field[hidden] {
	display: none;
}

.ifresh-quote-app .ifqr-label {
	display: block;
	margin-bottom: 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ifqr-text);
}

.ifresh-quote-app .ifqr-required {
	color: var(--ifqr-primary);
}

.ifresh-quote-app .ifqr-input {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--ifqr-border);
	border-radius: var(--ifqr-radius-field);
	background: var(--ifqr-surface);
	color: var(--ifqr-text);
	font-family: inherit;
	font-size: 16px; /* 16px keeps iOS from zooming on focus. */
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ifresh-quote-app textarea.ifqr-input {
	min-height: 100px;
	resize: vertical;
}

.ifresh-quote-app .ifqr-input::placeholder {
	color: var(--ifqr-muted);
	opacity: 1;
}

.ifresh-quote-app .ifqr-input:focus-visible,
.ifresh-quote-app .ifqr-option__input:focus-visible + .ifqr-option__control {
	outline: 3px solid var(--ifqr-primary);
	outline-offset: 2px;
}

.ifresh-quote-app .ifqr-input:focus {
	border-color: var(--ifqr-accent);
	box-shadow: 0 0 0 3px rgba(133, 186, 61, 0.18);
}

.ifresh-quote-app .ifqr-field.has-error .ifqr-input,
.ifresh-quote-app .ifqr-field.has-error .ifqr-option {
	border-color: var(--ifqr-danger);
}

.ifresh-quote-app .ifqr-error {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--ifqr-danger);
}

.ifresh-quote-app .ifqr-error[hidden] {
	display: none;
}

.ifresh-quote-app .ifqr-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

/* ---------------------------------------------------------- options */

.ifresh-quote-app .ifqr-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ifresh-quote-app .ifqr-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--ifqr-border);
	border-radius: var(--ifqr-radius-field);
	background: var(--ifqr-surface);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ifresh-quote-app .ifqr-option__text {
	font-size: 14px;
	font-weight: 400;
	color: var(--ifqr-text);
}

.ifresh-quote-app .ifqr-option__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ifresh-quote-app .ifqr-option__control {
	position: relative;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 1px solid var(--ifqr-border);
	background: var(--ifqr-surface);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ifresh-quote-app .ifqr-option[data-control="square"] .ifqr-option__control {
	border-radius: 5px;
}

.ifresh-quote-app .ifqr-option[data-control="round"] .ifqr-option__control {
	border-radius: 50%;
}

.ifresh-quote-app .ifqr-option:has(.ifqr-option__input:checked),
.ifresh-quote-app .ifqr-option.is-selected {
	background: var(--ifqr-selected);
	border-color: var(--ifqr-accent);
}

.ifresh-quote-app .ifqr-option:has(.ifqr-option__input:checked) .ifqr-option__text,
.ifresh-quote-app .ifqr-option.is-selected .ifqr-option__text {
	font-weight: 600;
}

.ifresh-quote-app .ifqr-option:has(.ifqr-option__input:checked) .ifqr-option__control,
.ifresh-quote-app .ifqr-option.is-selected .ifqr-option__control {
	background: var(--ifqr-accent);
	border-color: var(--ifqr-accent);
}

/* A shape as well as a colour, so colour is never the only signal. */
.ifresh-quote-app .ifqr-option[data-control="square"].is-selected .ifqr-option__control::after,
.ifresh-quote-app .ifqr-option[data-control="square"]:has(.ifqr-option__input:checked) .ifqr-option__control::after {
	content: "";
	position: absolute;
	inset-inline-start: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ifresh-quote-app .ifqr-option[data-control="round"].is-selected .ifqr-option__control::after,
.ifresh-quote-app .ifqr-option[data-control="round"]:has(.ifqr-option__input:checked) .ifqr-option__control::after {
	content: "";
	position: absolute;
	inset: 5px;
	border-radius: 50%;
	background: #ffffff;
}

/* ---------------------------------------------------------- date */

.ifresh-quote-app .ifqr-date {
	position: relative;
}

.ifresh-quote-app .ifqr-date .ifqr-input {
	padding-inline-start: 46px;
}

.ifresh-quote-app .ifqr-date__icon {
	position: absolute;
	inset-inline-start: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ifqr-calendar);
	pointer-events: none;
}

.ifresh-quote-app .ifqr-date__placeholder {
	position: absolute;
	inset-inline-end: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	font-weight: 600;
	color: var(--ifqr-text);
	pointer-events: none;
}

/* Once a date exists the native value is shown instead of the placeholder. */
.ifresh-quote-app .ifqr-date.is-filled .ifqr-date__placeholder {
	display: none;
}

.ifresh-quote-app .ifqr-date:not(.is-filled) .ifqr-input::-webkit-datetime-edit {
	color: transparent;
}

.ifresh-quote-app .ifqr-date .ifqr-input::-webkit-calendar-picker-indicator {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	width: 56px;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}

.ifresh-quote-app .ifqr-date .ifqr-input:disabled {
	background: #f4f6f2;
	color: var(--ifqr-muted);
	cursor: not-allowed;
}

.ifresh-quote-app .ifqr-date__note {
	position: absolute;
	inset-inline-end: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: var(--ifqr-muted);
	pointer-events: none;
}

.ifresh-quote-app .ifqr-date__note[hidden] {
	display: none;
}

/* ---------------------------------------------------------- notices */

.ifresh-quote-app .ifqr-notice {
	margin: 24px 0 0;
	padding: 16px 18px;
	border-radius: var(--ifqr-radius-field);
	background: var(--ifqr-selected);
	color: var(--ifqr-primary);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
}

.ifresh-quote-app .ifqr-notice--warn {
	background: var(--ifqr-warn-bg);
	color: var(--ifqr-warn-text);
}

.ifresh-quote-app .ifqr-formerror {
	margin: 0 0 16px;
	padding: 14px 16px;
	border: 1px solid var(--ifqr-danger);
	border-radius: var(--ifqr-radius-field);
	background: #fdecea;
	color: var(--ifqr-danger);
	font-size: 14px;
	font-weight: 600;
}

.ifresh-quote-app .ifqr-formerror[hidden] {
	display: none;
}

/* ---------------------------------------------------------- actions */

.ifresh-quote-app .ifqr-actions {
	display: flex;
	gap: 12px;
}

.ifresh-quote-app .ifqr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--ifqr-radius-button);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.ifresh-quote-app .ifqr-btn:focus-visible {
	outline: 3px solid var(--ifqr-primary);
	outline-offset: 2px;
}

.ifresh-quote-app .ifqr-btn--primary {
	flex: 1 1 auto;
	background: var(--ifqr-primary);
	color: #ffffff;
}

.ifresh-quote-app .ifqr-btn--primary:hover {
	background: #456d2c;
}

.ifresh-quote-app .ifqr-btn--ghost {
	flex: 0 0 116px;
	background: var(--ifqr-surface);
	border-color: var(--ifqr-primary);
	color: var(--ifqr-primary);
}

.ifresh-quote-app .ifqr-btn--ghost:hover {
	background: var(--ifqr-selected);
}

.ifresh-quote-app .ifqr-btn--block {
	flex: 1 1 auto;
	width: 100%;
}

.ifresh-quote-app .ifqr-btn[hidden] {
	display: none;
}

.ifresh-quote-app .ifqr-btn[disabled],
.ifresh-quote-app .ifqr-btn.is-busy {
	opacity: 0.72;
	cursor: progress;
}

.ifresh-quote-app .ifqr-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: ifqr-spin 0.7s linear infinite;
}

.ifresh-quote-app .ifqr-spinner[hidden] {
	display: none;
}

@keyframes ifqr-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------------------------------------------------------- success */

.ifresh-quote-app .ifqr-success {
	background: var(--ifqr-surface);
	border: 1px solid var(--ifqr-border);
	border-radius: var(--ifqr-radius-card);
	padding: 50px var(--ifqr-card-pad) 40px;
	text-align: center;
}

.ifresh-quote-app .ifqr-success[hidden] {
	display: none;
}

.ifresh-quote-app .ifqr-success__ring {
	position: relative;
	width: 72px;
	height: 72px;
	margin: 0 auto 34px;
}

.ifresh-quote-app .ifqr-success__check {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	font-weight: 700;
	color: var(--ifqr-accent);
	line-height: 1;
}

.ifresh-quote-app .ifqr-success__title {
	margin: 0 0 16px;
	font-size: 28px;
	font-weight: 700;
	color: var(--ifqr-text);
}

/*
 * The heading is focused programmatically so screen readers announce the
 * result. It is not keyboard reachable, so a focus ring on it would only be
 * visual noise.
 */
.ifresh-quote-app .ifqr-success__title:focus {
	outline: none;
}

.ifresh-quote-app .ifqr-success__text {
	margin: 0 auto 28px;
	max-width: 286px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ifqr-muted);
}

.ifresh-quote-app .ifqr-success__note {
	margin: 0 0 30px;
	padding: 18px;
	border-radius: var(--ifqr-radius-button);
	background: var(--ifqr-selected);
	color: var(--ifqr-primary);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

/* ---------------------------------------------------------- honeypot */

.ifresh-quote-app .ifqr-honeypot {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------------------------------------------------------- tablet */

@media (min-width: 768px) {
	.ifresh-quote-app {
		--ifqr-shell: 680px;
		--ifqr-card-pad: 28px;
		padding: 24px 44px 64px;
	}

	.ifresh-quote-app .ifqr-brand__logo {
		height: 76px;
	}

	.ifresh-quote-app .ifqr-progress {
		gap: 8px;
	}

	.ifresh-quote-app .ifqr-title {
		font-size: 34px;
	}

	.ifresh-quote-app .ifqr-lede {
		font-size: 16px;
	}

	.ifresh-quote-app .ifqr-card__title {
		font-size: 24px;
	}

	.ifresh-quote-app .ifqr-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 24px;
	}

	/*
	 * The schema order is the reading order. In RTL the first half width field
	 * lands in the right hand column, which is the true RTL behaviour the brief
	 * asks for. The Figma frames place it on the left, and that is a design
	 * side LTR artefact rather than an intent.
	 */
	.ifresh-quote-app .ifqr-field--full {
		grid-column: 1 / -1;
	}

	/*
	 * From the tablet breakpoint up the action row lines up with the card's
	 * content column rather than its outer edge, matching the Figma tablet and
	 * desktop frames.
	 */
	.ifresh-quote-app .ifqr-actions {
		justify-content: flex-start;
		padding-inline: var(--ifqr-card-pad);
	}

	.ifresh-quote-app .ifqr-btn--primary {
		flex: 0 0 232px;
	}
}

/* ---------------------------------------------------------- desktop */

@media (min-width: 1200px) {
	.ifresh-quote-app {
		--ifqr-shell: 920px;
		padding: 24px 32px 80px;
	}
}

/* ---------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
	.ifresh-quote-app *,
	.ifresh-quote-app *::before,
	.ifresh-quote-app *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
