/* ==========================================================================
   One-step quote form (popup)
   ========================================================================== */

.quote-step {
	--qs-navy: #153b72;
	--qs-navy-deep: #122a42;
	--qs-teal: #28b3a3;
	--qs-accent: #4a8dff;

	--qs-surface: #ffffff;
	--qs-surface-pale: #eef6ff;
	--qs-surface-tile: #dce9fb;
	--qs-surface-alt: #e0efff;

	--qs-border: #cce5ff;
	--qs-border-strong: rgba(21, 59, 114, 0.35);

	--qs-text: var(--qs-navy-deep);
	--qs-text-muted: rgba(18, 42, 66, 0.5);
	--qs-text-faint: rgba(18, 42, 66, 0.3);

	--qs-btn-primary-bg: rgba(21, 59, 114, 0.5);
	--qs-btn-primary-fg: #ffffff;

	--qs-radius-card: 32px;
	--qs-radius-field: 15px;
	--qs-radius-tile: 12px;
	--qs-gap: 16px;
	--qs-gap-lg: 24px;

	background: var(--qs-surface-pale);
	font-family: var(--font-family, "Figtree", sans-serif);
	color: var(--qs-text);
}

/* ==========================================================================
   Card shell
   ========================================================================== */

.quote-step__card {
	/* .popup--form [data-fls-popup-body] already caps width at 77.5rem and
	   handles the responsive side padding, so the card just fills it. */
	width: 100%;
	margin-inline: auto;
	position: relative;
	overflow: hidden;
	border: 10px solid #ffffff;
	border-radius: var(--qs-radius-card);
	background-color: #ffffff;
	background-image: url("../img/quote-step/form-bg-mobile.png");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 100%;
	box-shadow: 0 30px 60px rgba(18, 42, 66, 0.12);
}

@media (min-width: 720px) {
	.quote-step__card {
		background-image: url("../img/quote-step/form-bg-pc.png");
	}
}

.quote-step__body {
	padding: 40px 40px 25px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.quote-step-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--qs-gap);
	flex-wrap: wrap;
	padding: 30px;
	border-bottom: 1px solid #ffffff;
}

.quote-step-header__logo-img {
	display: block;
	height: 30px;
	width: 218px;
	flex: 0 0 218px;
}

.quote-step-header__contact {
	text-align: right;
	min-width: 218px;
}

/* Below 720px the phone number moves out of the header (logo-only there) and
   reappears centered under the benefits strip — see form-mobile.png. */
.quote-step-footer-contact {
	display: none;
	text-align: center;
	padding: 24px 20px;
}

.quote-step-header__contact-label {
	margin-right: 6px;
	font-weight: 600;
	font-size: 20px;
	line-height: 140%;
	letter-spacing: -0.02em;
	text-align: right;
	color: #153b72;
}

.quote-step-header__contact-phone {
	font-weight: 600;
	font-size: 20px;
	line-height: 140%;
	letter-spacing: -0.02em;
	text-align: right;
	color: #28b3a3;
	text-decoration: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.quote-step__hero {
	text-align: center;
	padding: 0 0 25px;
}

.quote-step__title {
	font-weight: 600;
	font-size: 50px;
	line-height: 100%;
	letter-spacing: -0.04em;
	color: #122A42;
	margin-bottom: 30px;
}

.quote-step__title-accent {
	color: #28B3A3;
}

/* ==========================================================================
   Form — shared field primitives
   ========================================================================== */

.quote-form {
	display: block;
}

/* Positioning context for [data-fls-form-error] (position:absolute, see index.css)
   so inline errors anchor to their own field instead of the nearest positioned
   ancestor up the tree — same pattern as .popup__field on the old form. */
.quote-form__field {
	position: relative;
}

/* Override the global [data-fls-form-error] (index.css: bottom:0.25rem) so the
   inline error sits below the field instead of overlapping its bottom edge. */
.quote-form__field [data-fls-form-error] {
	position: absolute;
	bottom: -1rem;
	pointer-events: none;
}

.quote-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--qs-gap);
	margin-bottom: var(--qs-gap-lg);
}

.quote-form__label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	line-height: 100%;
	letter-spacing: -0.02em;
	color: #122a42;
	margin-bottom: 10px;
}
.quote-form__required {
	margin-left: 2px;
	color: #eb4f4f;
}

.quote-form__label::before {
    display: none;
}

/* readonly (chips-only): keep the approved placeholder/appearance, but drop
   the blinking caret so the field doesn't look typable. */
.quote-form__input[readonly] {
	cursor: pointer;
	caret-color: transparent;
}

.quote-form__input {
	width: 100%;
	height: 60px;
	padding: 15px 20px;
	border: 1px solid var(--qs-border);
	border-radius: var(--qs-radius-field);
	background: var(--qs-surface);
	color: #122a42;
	font-family: inherit;
	font-weight: 400;
	font-style: normal;
	font-size: 16px;
	letter-spacing: -0.02em;
}

.quote-form__input::placeholder {
	font-weight: 400;
	font-style: italic;
	font-size: 16px;
	letter-spacing: -0.02em;
	color: rgba(18, 42, 66, 0.4);
}

/* ==========================================================================
   Consent
   ========================================================================== */

.quote-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 30px;
	position: relative;
}

/* Same fix as .quote-form__field above. */
.quote-form__consent [data-fls-form-error] {
	position: absolute;
	bottom: -1rem;
	pointer-events: none;
}

.quote-form__consent-input {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	margin-top: 2px;
	border: 1px solid #cce5ff;
	border-radius: 6px;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	cursor: pointer;
}

.quote-form__consent-input:checked {
	border-color: #28b3a3;
	background-color: #28b3a3;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='11' viewBox='0 0 12 11' fill='none'%3E%3Cpath d='M0.75 5.75L5.75 9.75L11.25 0.75' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 11px 9px;
}

.quote-form__consent-label {
	font-weight: 400;
	font-size: 13px;
	line-height: 140%;
	letter-spacing: -0.02em;
	color: #646a69;
}

.quote-form__consent-label a {
	color: #4a8dff;
	text-decoration: underline;
}

/* Full-bleed across .quote-step__card regardless of .quote-step__body's
   padding — the negative margins overflow the body, and the card's own
   overflow:hidden clips them back to exactly its width. */
.quote-form__divider {
	height: 1px;
	margin: 0 -1000px 25px;
	background: #ffffff;
}

/* ==========================================================================
   Bottom actions
   ========================================================================== */

.quote-step__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--qs-gap);
}

.quote-step__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 60px;
	width: 100%;
	padding: 6px 6px 6px 12px;
	border-radius: 18px;
	border: 1px solid transparent;
	font-family: inherit;
	font-weight: 500;
	font-size: 18px;
	letter-spacing: -0.42px;
	cursor: pointer;
}

.quote-step__btn--primary {
	border-radius: 18px;
	height: 60px;
	background: rgba(21, 59, 114, 0.5);
	transition: background-color 0.2s ease;
	font-weight: 500;
	font-size: 18px;
	letter-spacing: -0.02em;
	text-align: center;
	color: #fff;
	justify-content: space-between;
}

@media (hover: hover) {
	.quote-step__btn--primary.--is-ready:hover {
		opacity: 0.9;
		transition: opacity 0.4s ease;
	}
}

.quote-step__btn--primary:active {
	background: #153b72;
}

.quote-step__actions--single .quote-step__btn--primary {
	width: 275px;
	height: 60px;
	padding: 6px 6px 6px 12px;
}

.quote-step__btn-icon {
	flex: none;
	width: 48px;
	height: 48px;
	margin-left: auto;
	border-radius: 12px;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quote-step__btn-icon img {
	width: 24px;
	height: 24px;
}

/* ==========================================================================
   One-step form: "No Spam" notice
   ========================================================================== */

.quote-form__notice--nospam {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 30px 16px;
	padding: 30px;
	border: 1px solid #28b3a3;
	border-radius: 24px;
	margin-bottom: 25px;
}

.quote-form__notice-title {
	flex: none;
	font-weight: 600;
	font-size: 20px;
	line-height: 120%;
	letter-spacing: -0.04em;
	color: var(--qs-teal);
}

.quote-form__notice-text {
	flex: 1 1 320px;
	font-weight: 600;
	font-size: 16px;
	line-height: 160%;
	letter-spacing: -0.02em;
	color: #122a42;
}

/* ==========================================================================
   One-step form: submit row (label + button side by side)
   ========================================================================== */

.quote-step__actions--row {
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}

.quote-step__next-label {
	font-weight: 400;
	font-size: 20px;
	line-height: 100%;
	letter-spacing: -0.02em;
	color: #122a42;
	text-align: center;
}

.quote-step__actions--row .quote-step__btn--primary {
	width: 100%;
}

@media (min-width: 600px) {
	.quote-step__actions--row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
	}

	.quote-step__next-label {
		text-align: left;
	}

	.quote-step__actions--row .quote-step__btn--primary {
		width: auto;
		min-width: 300px;
	}
}

/* Button darkens as soon as every required field is valid — not only on hover. */
.quote-step__btn--primary:not(.--is-ready) {
	cursor: default;
}

.quote-step__btn--primary.--is-ready {
	background: #153b72;
}

/* ==========================================================================
   One-step form: benefits footer strip
   ========================================================================== */

.quote-benefits {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 40px;
	background: #e2edff;
	border-radius: 0 0 20px 20px;
}

.quote-benefits__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.quote-benefits__icon {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 2px;
}

.quote-benefits__icon img {
	width: 100%;
	height: 100%;
}

.quote-benefits__text {
	font-weight: 600;
	font-size: 20px;
	line-height: 120%;
	letter-spacing: -0.02em;
	color: #153b72;
}

@media (min-width: 768px) {
	.quote-benefits {
		flex-direction: row;
		justify-content: space-between;
		padding: 40px;
	}

	.quote-benefits__item {
		flex: 1 1 0;
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 599px) {
	.quote-step-header__inner {
		padding: 30px 20px;
	}

	.quote-step__body {
		padding: 35px 20px 30px;
	}

	.quote-step__title {
		font-size: 40px;
	}

	.quote-benefits {
		padding: 30px 20px;
	}
}

@media (max-width: 619px) {
	.quote-step-header__contact {
		display: none;
	}

	.quote-step-footer-contact {
		display: block;
	}

	.quote-step-header__inner {
		flex-direction: column;
	}

	.quote-step__title {
		font-size: 30px;
	}

	.quote-form__notice--nospam {
		display: block;
		padding: 20px;
	}

	.quote-form__notice-title {
		flex: initial;
		margin-bottom: 10px;
		font-weight: 600;
	}

	.quote-form__notice-text {
		flex: initial;
		font-weight: 600;
		font-size: 12px;
		line-height: 160%;
		letter-spacing: -0.02em;
		color: #122a42;
	}

	.quote-form__consent-label {
		font-size: 12px;
	}

	.quote-step__actions--row {
		align-items: center;
	}

	.quote-step__actions--row .quote-step__btn--primary {
		width: auto;
	}

	.quote-step__next-label {
		font-weight: 400;
		font-size: 20px;
		line-height: 100%;
		letter-spacing: -0.02em;
		text-align: center;
		color: #122a42;
	}
}

@media (max-width: 829px) {
	.quote-step__btn--primary {
		width: 100%;
		max-width: 420px;
	}
}

@media (max-width: 479px) {
	.quote-step__body {
		padding: 30px 10px 25px;
	}

	.quote-step__title {
		font-size: 36px;
		margin-bottom: 25px;
	}
}

@media (min-width: 600px) {
	.quote-form__grid--contact {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 619px) {
	.quote-form__grid--contact {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 768px) {
	.quote-step__body {
		padding: 40px 40px 20px;
	}

	.quote-step-header__inner {
		padding: 20px 40px;
	}

	.quote-step__title {
		font-size: 44px;
	}

	.quote-step__actions--single {
		align-items: center;
	}
}

@media (min-width: 992px) {
	.quote-step__title {
		font-size: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.quote-step * {
		transition: none !important;
	}

	.quote-calendly__spinner {
		animation: none !important;
	}
}

/* ==========================================================================
   Calendly inline widget — replaces the form inside the popup after submit
   ========================================================================== */

.quote-calendly {
	/* Calendly's recommended height, capped so the widget still fits a laptop
	   viewport; the widget scrolls its own content when it needs more room. */
	--qs-calendly-height: min(700px, 85vh);

	position: relative;
	width: 100%;
	min-width: 320px;
	height: var(--qs-calendly-height);
	/* Guard: the Calendly widget writes a measured height onto this element as an
	   inline style in some states, which beats the rule above and collapses the
	   popup. An inline height cannot override min-height, so the box holds. */
	min-height: var(--qs-calendly-height);
	overflow: hidden;
	border-radius: var(--qs-radius-card, 32px);
	background: #ffffff;
}

/* Shown while the Calendly iframe itself is still loading/rendering after
   initInlineWidget() runs; hidden by the "--loaded" modifier in
   assets/js/quote-step.js once the widget posts its first postMessage event
   (or after the safety timeout, whichever comes first). */
.quote-calendly__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 3px solid #e5e7eb;
	border-top-color: var(--main-color, #153b72);
	border-radius: 50%;
	animation: quote-calendly-spin 0.8s linear infinite;
}

.quote-calendly--loaded .quote-calendly__spinner {
	display: none;
}

@keyframes quote-calendly-spin {
	to {
		transform: rotate(360deg);
	}
}

/* The hidden attribute alone loses to any display rule the popup sets on its
   children, so state it at attribute specificity rather than relying on the
   user-agent default. */
.quote-calendly[hidden],
.quote-form[hidden] {
	display: none;
}
