/**
 * Self-Employment Tax Calculator — module styles.
 *
 * Inherits the shared design tokens (--bf-primary, --bf-accent, --bf-ink,
 * --bf-muted, --bf-border, --bf-bg-soft, --bf-radius, --bf-shadow) from
 * assets/css/frontend.css. Everything is scoped to .setax so nothing leaks into
 * the host theme. Mobile-first; splits into two columns at ≥780px. Print block
 * renders a clean, ink-friendly summary.
 */

.setax {
	--setax-ss: var(--bf-primary, #4f46e5);
	--setax-med: var(--bf-accent, #0ea5e9);
	--setax-addl: #f43f5e;
	color: var(--bf-ink, #0f172a);
	font-size: 16px;
	line-height: 1.5;
}
.setax *,
.setax *::before,
.setax *::after { box-sizing: border-box; }

.setax__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: start;
}
@media (min-width: 780px) {
	.setax__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

/* --------------------------------------------------------------- inputs */

.setax__inputs {
	border: 1px solid var(--bf-border, #e5e7eb);
	border-radius: var(--bf-radius, 16px);
	background: #fff;
	padding: 22px;
	margin: 0;
	min-width: 0;
}
.setax__field { margin-top: 18px; }
.setax__field:first-child { margin-top: 0; }
.setax__field--split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
@media (max-width: 430px) {
	.setax__field--split { grid-template-columns: 1fr; }
}

.setax__label {
	display: block;
	font-weight: 700;
	font-size: 13.5px;
	margin-bottom: 7px;
	color: var(--bf-ink, #0f172a);
}

.setax__money,
.setax__select {
	display: flex;
	align-items: center;
	border: 1px solid var(--bf-border, #e5e7eb);
	border-radius: 11px;
	background: var(--bf-bg-soft, #f8fafc);
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.setax__money:focus-within,
.setax__select:focus-within {
	border-color: var(--bf-primary, #4f46e5);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bf-primary, #4f46e5) 18%, transparent);
	background: #fff;
}
.setax__sym {
	flex: 0 0 auto;
	padding: 0 11px;
	font-weight: 700;
	color: var(--bf-muted, #64748b);
	font-size: 14px;
	border-right: 1px solid var(--bf-border, #e5e7eb);
}
.setax__money input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 11px 13px;
	font: inherit;
	font-weight: 700;
	font-size: 16px;
	color: var(--bf-ink, #0f172a);
	-moz-appearance: textfield;
}
.setax__money input:focus { outline: none; }
.setax__money input::-webkit-outer-spin-button,
.setax__money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.setax__select select {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 11px 13px;
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	color: var(--bf-ink, #0f172a);
	cursor: pointer;
}
.setax__select select:focus { outline: none; }

.setax__slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	margin-top: 12px;
	border-radius: 999px;
	background: var(--bf-border, #e5e7eb);
	outline: none;
	cursor: pointer;
}
.setax__slider::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--bf-primary, #4f46e5); border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .25); cursor: pointer;
}
.setax__slider::-moz-range-thumb {
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--bf-primary, #4f46e5); border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .25); cursor: pointer;
}
.setax__slider:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bf-primary, #4f46e5) 30%, transparent); }

.setax__hint {
	margin: 8px 0 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--bf-muted, #64748b);
}

.setax__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--bf-border, #e5e7eb);
}

/* -------------------------------------------------------------- results */

.setax__results { min-width: 0; }

.setax__hero {
	text-align: center;
	padding: 26px 22px;
	border-radius: var(--bf-radius, 16px);
	background: linear-gradient(135deg, color-mix(in srgb, var(--setax-ss) 12%, #fff), color-mix(in srgb, var(--setax-med) 10%, #fff));
	border: 1px solid var(--bf-border, #e5e7eb);
	margin-bottom: 16px;
}
.setax__hero-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--bf-muted, #64748b);
}
.setax__hero-value {
	display: block;
	margin: 6px 0 4px;
	font-size: clamp(34px, 7vw, 52px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.02em;
	color: var(--setax-ss);
	font-variant-numeric: tabular-nums;
}
.setax__hero-note {
	display: block;
	font-size: 13.5px;
	color: var(--bf-muted, #64748b);
}
.setax__hero-note strong { color: var(--bf-ink, #0f172a); }

/* Composition bar. */
.setax__bar {
	display: flex;
	height: 16px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--bf-border, #e5e7eb);
}
.setax__bar-seg { height: 100%; transition: width .25s ease; }
.setax__bar-seg--ss { background: var(--setax-ss); }
.setax__bar-seg--med { background: var(--setax-med); }
.setax__bar-seg--addl { background: var(--setax-addl); }

.setax__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 12px 0 18px;
	font-size: 12.5px;
	color: var(--bf-muted, #64748b);
}
.setax__legend span { display: inline-flex; align-items: center; gap: 6px; }
.setax__dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.setax__dot--ss { background: var(--setax-ss); }
.setax__dot--med { background: var(--setax-med); }
.setax__dot--addl { background: var(--setax-addl); }

.setax__metrics {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-bottom: 16px;
}
@media (min-width: 520px) {
	.setax__metrics { grid-template-columns: repeat(3, 1fr); }
}
.setax__metric {
	border: 1px solid var(--bf-border, #e5e7eb);
	border-radius: 12px;
	background: #fff;
	padding: 12px 14px;
	text-align: center;
}
.setax__metric-label {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--bf-muted, #64748b);
	line-height: 1.3;
}
.setax__metric-value {
	display: block;
	margin-top: 4px;
	font-size: 19px;
	font-weight: 800;
	color: var(--bf-ink, #0f172a);
	font-variant-numeric: tabular-nums;
}

.setax__breakdown {
	border: 1px solid var(--bf-border, #e5e7eb);
	border-radius: 12px;
	background: var(--bf-bg-soft, #f8fafc);
	padding: 4px 16px;
}
.setax__break-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px dashed var(--bf-border, #e5e7eb);
	font-size: 14px;
}
.setax__break-row:last-child { border-bottom: 0; }
.setax__break-row span { color: var(--bf-muted, #64748b); }
.setax__break-row strong {
	color: var(--bf-ink, #0f172a);
	font-weight: 800;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.setax__break-row--accent strong { color: var(--setax-ss); font-size: 17px; }

/* Notes. */
.setax__notes {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.setax__notes:empty { display: none; }
.setax__note {
	padding: 11px 14px 11px 38px;
	border: 1px solid var(--bf-border, #e5e7eb);
	border-radius: 10px;
	background: #fff;
	font-size: 13.5px;
	color: var(--bf-muted, #64748b);
	position: relative;
	line-height: 1.45;
}
.setax__note::before {
	content: "ℹ";
	position: absolute;
	left: 14px; top: 10px;
	font-size: 14px;
	color: var(--setax-ss);
	font-weight: 700;
}

/* --------------------------------------------------------------- trust */

.setax__trust { margin-top: 22px; }
.setax__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 12px 0 0;
	font-size: 12.5px;
	color: var(--bf-muted, #64748b);
}
.setax__meta a { color: var(--bf-primary, #4f46e5); font-weight: 700; text-decoration: none; }
.setax__meta a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- print */

@media print {
	.setax__inputs,
	.setax__actions,
	.setax__slider {
		display: none !important;
	}
	.setax__grid { grid-template-columns: 1fr; }
	.setax__hero { background: #fff; }
	.setax__hero-value { color: #000; }
	.setax { color: #000; font-size: 11pt; }
	.setax__bar { border: 1px solid #999; }
	.setax__metric, .setax__breakdown, .setax__note { break-inside: avoid; }
}
