/**
 * Insurance Matching Cost Estimator
 * Self-contained UI. Does not inherit host theme colors or type.
 */

.mce {
	--mce-bg: #f2f4f7;
	--mce-paper: #ffffff;
	--mce-ink: #1c2430;
	--mce-muted: #3e4c5e;
	--mce-line: #d5dde6;
	--mce-input-border: #b7c3cf;
	--mce-accent: #1e4d78;
	--mce-accent-dark: #163a5c;
	--mce-focus: #0b57d0;
	--mce-danger: #8f1d1d;
	--mce-danger-bg: #fdecec;
	--mce-warn: #6a4b00;
	--mce-warn-bg: #fff6e0;
	box-sizing: border-box;
	max-width: 42rem;
	width: 100%;
	margin: 1.5rem auto;
	padding: 1.5rem 1.25rem 2.5rem;
	background: var(--mce-bg);
	color: var(--mce-ink);
	border: 1px solid var(--mce-line);
	color-scheme: light;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

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

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

.mce h2,
.mce h3,
.mce p,
.mce ul,
.mce ol,
.mce figure,
.mce table {
	color: inherit;
	font: inherit;
}

.mce h2 {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
	margin: 0 0 0.75rem;
}

.mce h3 {
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.5rem;
}

.mce p,
.mce ul,
.mce ol,
.mce figure {
	margin: 0 0 1rem;
}

.mce ul,
.mce ol {
	padding-left: 1.25rem;
}

.mce li {
	margin: 0 0 0.35rem;
}

.mce li:last-child {
	margin-bottom: 0;
}

.mce a {
	color: #1a4f86;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.mce a:hover {
	color: #0f3358;
}

.mce :focus {
	outline: 3px solid var(--mce-focus);
	outline-offset: 2px;
}

.mce-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mce-editorial section {
	margin: 0 0 2rem;
}

.mce-editorial {
	margin: 0 0 2rem;
}

.mce-tool {
	margin: 0 0 2.5rem;
}

.mce-lead,
.mce-help {
	color: var(--mce-muted);
}

.mce-progress {
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.mce-progress-track {
	height: 0.25rem;
	background: #e4eaf1;
	margin: 0 0 1.25rem;
}

.mce-progress-track span {
	display: block;
	height: 100%;
	width: calc(100% / 7);
	background: var(--mce-accent);
}

.mce.is-step-2 .mce-progress-track span { width: calc(200% / 7); }
.mce.is-step-3 .mce-progress-track span { width: calc(300% / 7); }
.mce.is-step-4 .mce-progress-track span { width: calc(400% / 7); }
.mce.is-step-5 .mce-progress-track span { width: calc(500% / 7); }
.mce.is-step-6 .mce-progress-track span { width: calc(600% / 7); }
.mce.is-step-7 .mce-progress-track span { width: calc(100%); }

.mce fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-inline-size: 0;
}

.mce legend {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0 0 0.75rem;
	float: none;
}

.mce legend h2 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0;
	font-size: 1.35rem;
}

.mce-choices {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
}

.mce-choices li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0 0 0.5rem;
	padding: 0.75rem;
	border: 1px solid var(--mce-line);
	background: var(--mce-paper);
}

.mce-choices li:has(input:checked) {
	border-color: var(--mce-accent);
	background: #eef3f8;
}

.mce-choices input {
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	flex: 0 0 auto;
	accent-color: var(--mce-accent);
}

.mce-choices label {
	flex: 1;
	cursor: pointer;
}

.mce-field {
	margin: 0.75rem 0 0.35rem;
}

.mce-label-line {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
	font-weight: 700;
}

.mce-field input,
.mce input[type="text"] {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.7rem 0.75rem;
	border: 1px solid var(--mce-input-border);
	border-radius: 2px;
	background: var(--mce-paper);
	color: var(--mce-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
}

.mce-money {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0.35rem 0 0.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--mce-input-border);
	border-radius: 2px;
	background: var(--mce-paper);
}

.mce-money-prefix {
	font-weight: 700;
}

.mce-money input[type="text"] {
	margin: 0;
	padding: 0.7rem 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	min-width: 0;
}

.mce-money input[type="text"]:focus {
	outline: none;
}

.mce-money:focus-within {
	outline: 3px solid var(--mce-focus);
	outline-offset: 2px;
}

.mce-error,
.mce-warn {
	padding: 0.5rem 0.75rem;
	margin: 0.35rem 0 0.75rem;
}

.mce-error {
	color: var(--mce-danger);
	background: var(--mce-danger-bg);
}

.mce-warn {
	color: var(--mce-warn);
	background: var(--mce-warn-bg);
}

.mce-jargon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	color: var(--mce-muted);
	font-weight: 400;
}

.mce-jargon .mce-label-line {
	font-weight: 400;
}

.mce-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 1.25rem 0 0;
}

.mce-actions .mce-btn-primary {
	margin-left: auto;
}

.mce button.mce-btn {
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	min-height: 44px;
	padding: 0.6rem 1rem;
	border-radius: 2px;
	border: 1px solid var(--mce-accent);
	background: var(--mce-paper);
	color: var(--mce-accent);
	box-shadow: none;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.mce button.mce-btn-primary {
	background: var(--mce-accent);
	color: #ffffff;
}

.mce button.mce-btn:hover:not(:disabled),
.mce button.mce-btn:focus-visible {
	background: var(--mce-accent-dark);
	color: #ffffff;
}

.mce button.mce-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.mce-tip {
	width: 1.75rem;
	height: 1.75rem;
	min-width: 1.75rem;
	padding: 0;
	border: 1px solid var(--mce-input-border);
	border-radius: 50%;
	background: var(--mce-paper);
	color: var(--mce-accent);
	font: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.mce-tip-wrap {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	flex: 0 0 auto;
}

.mce-tip-bubble {
	position: absolute;
	z-index: 5;
	left: 0;
	top: calc(100% + 0.4rem);
	width: 1px;
	max-width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	background: var(--mce-ink);
	color: #ffffff;
	border-radius: 2px;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	white-space: normal;
}

.mce-tip-wrap.is-open .mce-tip-bubble {
	clip: auto;
	clip-path: none;
	height: auto;
	width: min(18rem, calc(100vw - 2rem));
	max-width: 18rem;
	padding: 0.5rem 0.75rem;
	overflow: visible;
}

.mce-results {
	margin-top: 1.5rem;
}

.mce-summary {
	margin: 0 0 1rem;
	padding-left: 0.75rem;
	border-left: 3px solid var(--mce-accent);
}

.mce-panel {
	margin: 1.5rem 0;
}

.mce-table-scroll {
	margin: 0 0 1rem;
	overflow-x: auto;
	max-width: 100%;
	-webkit-overflow-scrolling: touch;
}

.mce table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: 0.95rem;
}

.mce caption {
	caption-side: top;
	text-align: left;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.mce th,
.mce td {
	padding: 0.5rem 0.4rem;
	border-bottom: 1px solid var(--mce-line);
	vertical-align: top;
	text-align: left;
	background: transparent;
}

.mce thead th {
	border-bottom-width: 2px;
	font-weight: 700;
}

.mce tbody th,
.mce tfoot th {
	font-weight: 700;
}

.mce tfoot th,
.mce tfoot td {
	border-top: 2px solid var(--mce-line);
}

.mce .mce-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.mce meter {
	display: block;
	width: 100%;
	height: 0.85rem;
	margin: 0 0 0.75rem;
}

.mce-scale {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin: 0 0 0.75rem;
	color: var(--mce-muted);
	font-size: 0.95rem;
}

.mce-scale strong {
	color: var(--mce-ink);
}

.mce-disclaimer {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--mce-line);
	font-size: 1rem;
}

.mce-note {
	color: var(--mce-muted);
}

@media (max-width: 480px) {
	.mce {
		padding: 1rem 0.75rem 2rem;
	}

	.mce h2,
	.mce legend h2 {
		font-size: 1.25rem;
	}

	.mce-actions .mce-btn,
	.mce-actions .mce-btn-primary {
		flex: 1 1 100%;
		margin-left: 0;
	}

	.mce th,
	.mce td {
		padding: 0.4rem 0.25rem;
	}

	.mce table {
		font-size: 0.875rem;
	}
}
