/* Global Lead Form — form_style="2" (3-step quote form).
   Everything is scoped to .glf2 and uses glf2- class names so it can't affect style 1
   or the host theme. The card renders inline; when it sits inside a popup, the popup
   provides the backdrop and close button. Narrow layouts use @container queries
   (not @media) because popups are often narrower than the viewport. */
.glf2, .glf2 * { box-sizing: border-box; }

.glf2 {
	--glf2-navy: #141a3c;
	--glf2-navy-soft: #2a3163;
	--glf2-red: #c8102e;
	--glf2-red-dark: #a00d24;
	--glf2-ink: #1b1d26;
	--glf2-muted: #5b5f6e;
	--glf2-line: #dcdfe8;
	--glf2-tile: #f6f7fa;
	--glf2-white: #ffffff;
	--glf2-ok: #1e7a46;
	--glf2-focus: #4b6bff;
	position: relative;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	overflow: hidden;
	background: var(--glf2-white);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(10, 14, 40, .35);
	font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.4;
	color: var(--glf2-ink);
	text-align: left;
	container-type: inline-size;
}

.glf2 [hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
	.glf2 .glf2-panel.is-active { animation: glf2-fade .2s ease-out; }
	@keyframes glf2-fade { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
}

/* Header band */
.glf2 .glf2-head { padding: 24px 28px 22px; background: var(--glf2-navy); border-bottom: 4px solid var(--glf2-red); color: var(--glf2-white); }
.glf2 .glf2-step { margin: 0 0 8px; font-size: 14px; color: #c9cdea; }
.glf2 .glf2-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.glf2 .glf2-progress span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); transition: background .2s; }
.glf2 .glf2-progress span.on { background: var(--glf2-red); }
.glf2 .glf2-title { margin: 0; padding: 0; font-family: inherit; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-transform: none; color: var(--glf2-white); }
.glf2 .glf2-title:focus { outline: none; }
.glf2 .glf2-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: #d6d9ef; }

/* Body */
.glf2 .glf2-body { padding: 22px 28px 24px; }
.glf2 .glf2-panel { display: none; }
.glf2 .glf2-panel.is-active { display: block; }
.glf2 fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.glf2 legend { margin-bottom: 12px; padding: 0; font-size: 16px; font-weight: 700; color: var(--glf2-ink); }

/* Emergency strip */
.glf2 .glf2-emergency { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; background: #fff5f6; border: 2px solid var(--glf2-red); border-radius: 10px; }
.glf2 .glf2-emergency svg { flex: none; color: var(--glf2-red); }
.glf2 .glf2-emergency p { flex: 1; margin: 0; font-size: 15px; line-height: 1.35; color: var(--glf2-ink); }
.glf2 .glf2-emergency strong { display: block; font-size: 16px; }
.glf2 .glf2-call { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: var(--glf2-red); border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--glf2-white); text-decoration: none; white-space: nowrap; }
.glf2 .glf2-call:hover, .glf2 .glf2-call:focus { background: var(--glf2-red-dark); color: var(--glf2-white); }
.glf2 .glf2-call svg { color: currentColor; }

/* Step 1 option grid */
.glf2 .glf2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.glf2 .glf2-opt { position: relative; }
.glf2 .glf2-opt--wide { grid-column: 1 / -1; }
.glf2 .glf2-opt input, .glf2 .glf2-pill input { position: absolute; opacity: 0; pointer-events: none; }
.glf2 .glf2-opt label { display: flex; align-items: center; gap: 12px; min-height: 64px; margin: 0; padding: 12px 14px; background: var(--glf2-tile); border: 1.5px solid var(--glf2-line); border-radius: 10px; line-height: 1.3; cursor: pointer; transition: border-color .15s, background .15s; }
.glf2 .glf2-opt label:hover { background: var(--glf2-white); border-color: var(--glf2-navy-soft); }
.glf2 .glf2-ico { display: grid; flex: none; place-items: center; width: 40px; height: 40px; background: var(--glf2-white); border: 1px solid var(--glf2-line); border-radius: 8px; color: var(--glf2-navy); }
.glf2 .glf2-txt { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.glf2 .glf2-txt b { font-size: 15px; font-weight: 700; color: var(--glf2-ink); }
.glf2 .glf2-txt small { font-size: 13px; line-height: 1.3; color: var(--glf2-muted); }
.glf2 .glf2-check { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border: 2px solid #b4b8c7; border-radius: 50%; }
.glf2 .glf2-check svg { opacity: 0; }
.glf2 .glf2-opt input:checked + label { background: var(--glf2-white); border-color: var(--glf2-navy); box-shadow: 0 0 0 1px var(--glf2-navy); }
.glf2 .glf2-opt input:checked + label .glf2-ico { background: var(--glf2-navy); border-color: var(--glf2-navy); color: var(--glf2-white); }
.glf2 .glf2-opt input:checked + label .glf2-check { background: var(--glf2-navy); border-color: var(--glf2-navy); }
.glf2 .glf2-opt input:checked + label .glf2-check svg { opacity: 1; }
.glf2 .glf2-opt input:focus-visible + label { outline: 3px solid var(--glf2-focus); outline-offset: 2px; }

/* Selected-service chip (steps 2–3) */
.glf2 .glf2-chosen { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 10px 12px; background: var(--glf2-tile); border: 1px solid var(--glf2-line); border-radius: 10px; font-size: 14px; color: var(--glf2-muted); }
.glf2 .glf2-chosen b { color: var(--glf2-ink); }
.glf2 .glf2-chosen button,
.glf2 .glf2-chosen button:hover,
.glf2 .glf2-chosen button:focus { margin-left: auto; padding: 6px; background: none; border: 0; border-radius: 0; font: inherit; font-weight: 700; color: var(--glf2-navy); text-decoration: underline; text-underline-offset: 3px; text-transform: none; cursor: pointer; }

/* Fields */
.glf2 .glf2-field { margin-bottom: 20px; }
.glf2 .glf2-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.glf2 .glf2-label,
.glf2 .glf2-label label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--glf2-ink); }
.glf2 .glf2-label label { margin: 0; }
.glf2 .glf2-label .opt { font-weight: 500; color: var(--glf2-muted); }
.glf2 .glf2-input,
.glf2 .glf2-select,
.glf2 .glf2-textarea { display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 12px; background: var(--glf2-white); border: 1.5px solid var(--glf2-line); border-radius: 8px; box-shadow: none; font: inherit; font-size: 16px; line-height: 1.4; color: var(--glf2-ink); }
.glf2 .glf2-textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.glf2 .glf2-input:focus,
.glf2 .glf2-select:focus,
.glf2 .glf2-textarea:focus { outline: none; border-color: var(--glf2-navy); box-shadow: 0 0 0 3px rgba(42, 49, 99, .18); }
.glf2 .glf2-field.has-error .glf2-input,
.glf2 .glf2-field.has-error .glf2-select,
.glf2 .glf2-field.has-error .glf2-textarea { border-color: var(--glf2-red); }
.glf2 .glf2-error { display: none; margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--glf2-red); }
.glf2 .glf2-field.has-error .glf2-error { display: block; }
.glf2 .glf2-hint { margin: 6px 0 0; font-size: 13px; color: var(--glf2-muted); }

/* Dates (step 3) */
.glf2 .glf2-date-display { cursor: pointer; }
.glf2 .glf2-date-display::placeholder { color: #8b8fa0; opacity: 1; }
.glf2 .glf2-field.is-disabled { opacity: .45; }
.glf2 .glf2-field.is-disabled .glf2-input { cursor: not-allowed; }

/* Flatpickr calendar: portalled to <body>, so it is styled by its own glf2-cal class */
.flatpickr-calendar.glf2-cal { font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; border-radius: 10px; box-shadow: 0 12px 32px rgba(10, 14, 40, .18); }
.flatpickr-calendar.glf2-cal .flatpickr-day.selected,
.flatpickr-calendar.glf2-cal .flatpickr-day.selected:hover,
.flatpickr-calendar.glf2-cal .flatpickr-day.selected:focus { background: #141a3c; border-color: #141a3c; color: #fff; }
.flatpickr-calendar.glf2-cal .flatpickr-day.today { border-color: #c8102e; }
.flatpickr-calendar.glf2-cal .flatpickr-day.today:hover { background: #c8102e; border-color: #c8102e; color: #fff; }
.flatpickr-calendar.glf2-cal .flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) { background: #f6f7fa; border-color: #dcdfe8; }

/* Pills */
.glf2 .glf2-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.glf2 .glf2-pill { position: relative; }
.glf2 .glf2-pill label { display: inline-flex; align-items: center; min-height: 42px; margin: 0; padding: 0 16px; background: var(--glf2-tile); border: 1.5px solid var(--glf2-line); border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--glf2-ink); cursor: pointer; transition: border-color .15s, background .15s; }
.glf2 .glf2-pill label:hover { background: var(--glf2-white); border-color: var(--glf2-navy-soft); }
.glf2 .glf2-pill input:checked + label { background: var(--glf2-navy); border-color: var(--glf2-navy); color: var(--glf2-white); }
.glf2 .glf2-pill input:focus-visible + label { outline: 3px solid var(--glf2-focus); outline-offset: 2px; }
.glf2 .glf2-field.has-error .glf2-pill label { border-color: #e7a3ae; }

/* Success */
.glf2 .glf2-done { padding: 12px 4px 4px; text-align: center; }
.glf2 .glf2-done-ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; background: #e6f4ec; border-radius: 50%; color: var(--glf2-ok); }
.glf2 .glf2-done h3 { margin: 0 0 8px; font-family: inherit; font-size: 22px; font-weight: 800; color: var(--glf2-ink); }
.glf2 .glf2-done p { max-width: 44ch; margin: 0 auto 6px; line-height: 1.5; color: var(--glf2-muted); }
.glf2 .glf2-done a, .glf2 .glf2-alert a { color: inherit; }
.glf2 .glf2-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 20px 0 0; padding: 14px 16px; background: var(--glf2-tile); border: 1px solid var(--glf2-line); border-radius: 10px; font-size: 14px; text-align: left; }
.glf2 .glf2-summary:empty { display: none; }
.glf2 .glf2-summary dt { margin: 0; font-weight: 400; color: var(--glf2-muted); }
.glf2 .glf2-summary dd { margin: 0; font-weight: 600; color: var(--glf2-ink); }

.glf2 .glf2-alert { display: none; margin-top: 16px; padding: 12px 14px; background: #fff5f6; border: 1px solid #f0b7c0; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--glf2-red-dark); }
.glf2 .glf2-alert.show { display: block; }

/* Footer */
.glf2 .glf2-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.glf2 .glf2-trust { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--glf2-muted); }
.glf2 .glf2-trust li { display: flex; align-items: center; gap: 6px; margin: 0; }
.glf2 .glf2-trust svg { color: var(--glf2-navy); }
.glf2 .glf2-actions { display: flex; gap: 10px; margin-left: auto; }

/* Buttons (reset theme button styles explicitly) */
.glf2 .glf2-back,
.glf2 .glf2-next { min-height: 48px; margin: 0; border-radius: 8px; box-shadow: none; font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; }
.glf2 .glf2-back,
.glf2 .glf2-back:hover,
.glf2 .glf2-back:focus { padding: 0 20px; background: var(--glf2-white); border: 1.5px solid var(--glf2-line); color: var(--glf2-ink); }
.glf2 .glf2-back:hover { border-color: var(--glf2-navy-soft); }
.glf2 .glf2-next,
.glf2 .glf2-next:focus { padding: 0 26px; background: var(--glf2-red); border: 0; color: var(--glf2-white); }
.glf2 .glf2-next:hover:not(:disabled) { background: var(--glf2-red-dark); color: var(--glf2-white); }
.glf2 .glf2-next:disabled,
.glf2 .glf2-next:disabled:hover { background: #c9ccd6; color: var(--glf2-muted); cursor: not-allowed; }
.glf2 .glf2-next.is-loading { opacity: .75; cursor: progress; }
.glf2 .glf2-next:focus-visible,
.glf2 .glf2-back:focus-visible,
.glf2 .glf2-call:focus-visible { outline: 3px solid var(--glf2-focus); outline-offset: 2px; }

/* Narrow (same breakpoint as the HTML design, measured on the card itself) */
@container (max-width: 560px) {
	.glf2 .glf2-head { padding: 20px 20px 18px; }
	.glf2 .glf2-body { padding: 18px 20px 20px; }
	.glf2 .glf2-title { font-size: 22px; }
	.glf2 .glf2-grid,
	.glf2 .glf2-row { grid-template-columns: minmax(0, 1fr); }
	.glf2 .glf2-emergency { flex-wrap: wrap; }
	.glf2 .glf2-call { justify-content: center; width: 100%; }
	.glf2 .glf2-trust { display: none; }
	.glf2 .glf2-actions { width: 100%; }
	.glf2 .glf2-next { flex: 1; }
}
