/*
 * Quote calculator, scoped under .lqe. Themable via CSS custom properties;
 * the defaults below are deliberately neutral so the plugin looks clean on
 * any site. Host themes override the --lqe-* variables only.
 */
.lqe {
	--lqe-primary: #1f2937;
	--lqe-primary-contrast: #ffffff;
	--lqe-accent: #6b7280;
	--lqe-surface: #ffffff;
	--lqe-border: #d1d5db;
	--lqe-text: #111827;
	--lqe-text-soft: #4b5563;
	--lqe-error: #b91c1c;
	--lqe-radius: 8px;
	--lqe-font: inherit;
	--lqe-font-heading: inherit;

	font-family: var(--lqe-font);
	color: var(--lqe-text);
	max-width: 64rem;
	margin-inline: auto;
}

.lqe-form,
.lqe-result {
	background: var(--lqe-surface);
	border: 1px solid var(--lqe-border);
	border-radius: var(--lqe-radius);
	padding: 1.5rem;
}

.lqe-progress {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lqe-text-soft);
}

.lqe-progress-step {
	flex: 1;
	border-top: 3px solid var(--lqe-border);
	padding-top: 0.5rem;
}

.lqe-progress-step.is-active {
	border-top-color: var(--lqe-accent);
	color: var(--lqe-text);
}

.lqe-step {
	border: 0;
	margin: 0;
	padding: 0;
}

.lqe-legend {
	font-family: var(--lqe-font-heading);
	font-size: 1.5rem;
	font-weight: 500;
	margin-bottom: 1.25rem;
	padding: 0;
}

.lqe-choices {
	display: grid;
	gap: 0.75rem;
}

@media (min-width: 36rem) {
	.lqe-choices {
		grid-template-columns: 1fr 1fr;
	}
}

.lqe-choices-inline {
	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.lqe-choice {
	display: block;
	cursor: pointer;
}

.lqe-choice input {
	position: absolute;
	opacity: 0;
}

.lqe-choice span {
	display: block;
	padding: 1rem;
	border: 1px solid var(--lqe-border);
	border-radius: var(--lqe-radius);
	text-align: center;
	font-weight: 600;
	transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.lqe-choice:hover input:not(:checked) + span {
	border-color: var(--lqe-primary);
}

.lqe-choice input:checked + span {
	border-color: var(--lqe-primary);
	background: var(--lqe-primary);
	color: var(--lqe-primary-contrast);
}

.lqe-choice input:focus-visible + span {
	outline: 2px solid var(--lqe-accent);
	outline-offset: 2px;
}

.lqe-field {
	margin-bottom: 1rem;
}

.lqe-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.lqe input[type='text'],
.lqe input[type='email'],
.lqe input[type='tel'],
.lqe input[type='number'] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--lqe-border);
	border-radius: var(--lqe-radius);
	font: inherit;
	color: inherit;
	background: var(--lqe-surface);
}

.lqe-money {
	display: flex;
	align-items: center;
	border: 1px solid var(--lqe-border);
	border-radius: var(--lqe-radius);
	overflow: hidden;
}

.lqe-money span {
	padding: 0.6rem 0.75rem;
	background: color-mix(in srgb, var(--lqe-border) 35%, var(--lqe-surface));
	color: var(--lqe-text-soft);
}

.lqe-money input {
	border: 0 !important;
	border-radius: 0 !important;
	flex: 1;
}

.lqe-grid-2 {
	display: grid;
	gap: 1rem;
}

@media (min-width: 36rem) {
	.lqe-grid-2 {
		grid-template-columns: 1fr 1fr;
	}
}

.lqe-check {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	margin-bottom: 0.5rem;
	cursor: pointer;
}

.lqe-captcha {
	margin-top: 1rem;
}

.lqe-hp {
	display: none !important;
}

.lqe-nav {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.lqe-btn {
	font: inherit;
	font-weight: 600;
	padding: 0.65rem 1.5rem;
	border-radius: var(--lqe-radius);
	border: 1px solid var(--lqe-primary);
	background: var(--lqe-primary);
	color: var(--lqe-primary-contrast);
	cursor: pointer;
	transition: opacity 150ms ease;
}

.lqe-btn:hover {
	opacity: 0.9;
}

.lqe-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.lqe-btn-ghost {
	background: transparent;
	color: var(--lqe-primary);
}

.lqe-error {
	color: var(--lqe-error);
	margin-top: 1rem;
}

.lqe-result-title {
	font-family: var(--lqe-font-heading);
	font-weight: 500;
	margin: 0 0 1rem;
	font-size: 1.35rem;
}

.lqe-result:focus {
	outline: none;
}

.lqe-result-note {
	font-size: 0.85rem;
	color: var(--lqe-text-soft);
	margin-top: 0.75rem;
}

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

.lqe-hint {
	color: var(--lqe-text-soft);
	font-size: 0.95rem;
	margin: 0 0 1rem;
}

.lqe-leg {
	margin-bottom: 0.5rem;
}

.lqe-leg-title {
	font-family: var(--lqe-font-heading);
	font-size: 1.15rem;
	font-weight: 600;
	margin: 1.25rem 0 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--lqe-border);
}

.lqe-leg:first-of-type .lqe-leg-title {
	border-top: 0;
	padding-top: 0;
	margin-top: 0;
}

.lqe-conditions {
	display: grid;
	gap: 0.25rem 1rem;
}

@media (min-width: 36rem) {
	.lqe-conditions {
		grid-template-columns: 1fr 1fr;
	}
}

.lqe-field-narrow {
	max-width: 10rem;
}

.lqe select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--lqe-border);
	border-radius: var(--lqe-radius);
	font: inherit;
	color: inherit;
	background: var(--lqe-surface);
}

.lqe .lqe-invalid {
	border-color: var(--lqe-error) !important;
	outline: 1px solid var(--lqe-error);
}

.lqe-result-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.25rem;
	flex-wrap: wrap;
}
