/**
 * Paycheck Calculator — compound-interest sidebar layout + take-home breakdown.
 */

.sn-pc-calc__mode-tab {
	border: none;
	cursor: pointer;
	font: inherit;
}

.sn-pc-calc__mode-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 1rem;
}

.sn-pc-calc__mode-tabs .sn-ci-calc__nav-tab {
	font-size: 0.8125rem;
	justify-content: center;
	line-height: 1.25;
	padding: 0.5rem 0.875rem;
	text-align: center;
	white-space: nowrap;
}

.sn-pc-calc .sn-ci-calc__nav-tabs.sn-pc-calc__nav-tabs {
	margin-bottom: 1rem;
}

.sn-pc-calc__nav-tabs {
	border-bottom: 1px solid var(--sn-ci-input-border, #e2e8f0);
	display: flex;
	flex-wrap: nowrap;
	gap: 0.3rem;
	overflow-x: auto;
	padding-bottom: 0.75rem;
	scrollbar-width: thin;
}

.sn-pc-calc__nav-tabs .sn-ci-calc__nav-tab {
	flex: 0 0 auto;
	font-size: 0.7rem;
	justify-content: center;
	line-height: 1.2;
	max-width: none;
	min-width: 0;
	padding: 0.4rem 0.55rem;
	text-align: center;
	white-space: nowrap;
}

/* Inputs sidebar + wide results (matches sn-ci-calc) */
.sn-pc-calc .sn-pc-calc__layout {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	width: 100%;
}

@media (min-width: 1024px) {
	.sn-pc-calc.sn-ci-calc .sn-pc-calc__layout {
		align-items: flex-start;
		flex-direction: row;
		gap: 2rem;
	}

	.sn-pc-calc.sn-ci-calc .sn-ci-calc__inputs {
		align-self: flex-start;
		flex-shrink: 0;
		max-width: 380px;
		width: 380px;
	}

	.sn-pc-calc.sn-ci-calc .sn-ci-calc__results {
		align-self: stretch;
		flex-grow: 1;
		max-width: none;
		min-width: 0;
		width: auto;
	}
}

.sn-pc-calc .sn-ci-calc__inputs {
	container-name: ci-inputs;
	container-type: inline-size;
	gap: 1.25rem;
}

.sn-pc-calc .sn-ci-calc__panel {
	margin-bottom: 0;
}

.sn-pc-calc .sn-ci-calc__panel-heading {
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.sn-pc-calc__section + .sn-pc-calc__section,
.sn-pc-calc .sn-ci-calc__panel-heading + .sn-pc-calc__section {
	margin-top: 1.25rem;
}

.sn-pc-calc .sn-ci-calc__row {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.sn-pc-calc .sn-ci-calc__row:last-child {
	margin-bottom: 0;
}

.sn-pc-calc .sn-ci-calc__label {
	flex-shrink: 0;
	font-size: 0.875rem;
	line-height: 1.35;
	min-width: 0;
	white-space: normal;
	width: 7.5rem;
}

.sn-pc-calc .sn-ci-calc__control {
	flex-grow: 1;
	justify-self: auto;
	max-width: none;
	min-width: 0;
	width: auto;
}

.sn-pc-calc .sn-ci-calc__control--compact,
.sn-pc-calc .sn-ci-calc__control--date {
	max-width: none;
}

.sn-pc-calc .sn-ci-calc__control .sn-ci-calc__form-select,
.sn-pc-calc .sn-ci-calc__control .sn-ci-calc__input-group {
	width: 100%;
}

/* Yes/No toggles — one per row in narrow sidebar */
.sn-pc-calc__yesno-grid {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	margin-bottom: 1rem;
}

.sn-pc-calc__yesno-grid--w4 {
	margin-bottom: 1rem;
}

.sn-pc-calc__yesno-grid--exempt {
	margin-bottom: 0;
	margin-top: 0.25rem;
}

.sn-pc-calc__yesno-row {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	min-width: 0;
	width: 100%;
}

.sn-pc-calc__yesno-label {
	color: var(--color-text, #1e293b);
	flex: 1 1 auto;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.4;
	min-width: 0;
}

.sn-pc-calc__yesno-control {
	flex: 0 0 auto;
}

.sn-pc-calc__yesno-toggle {
	display: inline-flex;
	flex-shrink: 0;
}

.sn-pc-calc__yesno-toggle .sn-ci-calc__toggle-btn {
	font-size: 0.8125rem;
	min-width: 2.625rem;
	padding: 0.4375rem 0.75rem;
}

/* Stacked money / select fields — single column in sidebar */
.sn-pc-calc__fields-grid {
	align-items: stretch;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	margin-bottom: 1rem;
}

.sn-pc-calc__fields-grid--federal {
	margin-bottom: 1rem;
}

.sn-pc-calc__fields-grid--federal .sn-ci-calc__form-select {
	width: 100%;
}

.sn-pc-calc__field-row--span2 {
	width: 100%;
}

.sn-pc-calc__field-row--state {
	margin-bottom: 0.5rem;
	max-width: none;
	width: 100%;
}

.sn-pc-calc__field-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.375rem;
	justify-content: flex-start;
	margin: 0;
	min-height: 0;
}

.sn-pc-calc__field-label {
	color: var(--color-text, #1e293b);
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.4;
	margin: 0;
	white-space: normal;
}

.sn-pc-calc__field-row .sn-ci-calc__control {
	flex-grow: 1;
	width: 100%;
}

.sn-pc-calc__state-select-row {
	align-items: stretch;
}

.sn-pc-calc__state-select-row .sn-ci-calc__control,
.sn-pc-calc__field-row--state .sn-ci-calc__control {
	max-width: none;
	width: 100%;
}

.sn-pc-calc__state-notice {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	color: #1e40af;
	font-size: 0.875rem;
	line-height: 1.5;
	margin-bottom: 1.125rem;
	margin-top: 0.875rem;
	padding: 0.875rem 1rem;
}

.sn-pc-calc__state-tax-fields {
	margin-bottom: 0.5rem;
}

.sn-pc-calc__state-common {
	margin-bottom: 1.125rem;
}

.sn-pc-calc__benefits-note {
	margin-bottom: 1rem;
}

.sn-pc-calc__benefits-list {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	margin-bottom: 1rem;
}

.sn-pc-calc__benefit-row {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.sn-pc-calc__benefit-fields {
	align-items: center;
	display: flex;
	gap: 0.625rem;
	justify-content: space-between;
	min-width: 0;
}

.sn-pc-calc__benefit-input {
	flex: 1 1 auto;
	min-width: 0;
}

.sn-pc-calc__include-net {
	align-items: center;
	color: var(--color-text, #1e293b);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.6875rem;
	font-weight: 500;
	gap: 0.3rem;
	line-height: 1.25;
	max-width: 5.5rem;
	white-space: normal;
}

.sn-pc-calc__include-net input {
	flex-shrink: 0;
}

.sn-pc-calc__include-net--grid {
	justify-content: center;
	justify-self: center;
	margin: 0;
	max-width: none;
	width: 100%;
}

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

/* Earnings / OT / retirement — one-line row grids in sidebar */
.sn-pc-calc__grid-block {
	min-width: 0;
	width: 100%;
}

.sn-pc-calc__grid-head,
.sn-pc-calc__grid-row {
	align-items: center;
	column-gap: 0.35rem;
	display: grid;
}

.sn-pc-calc__grid-head,
.sn-pc-calc__grid-row:not(.sn-pc-calc__grid-row--ot):not(.sn-pc-calc__grid-row--retire) {
	grid-template-columns: minmax(4.25rem, 0.85fr) minmax(4.5rem, 0.95fr) minmax(4.75rem, 1.15fr) auto;
}

.sn-pc-calc__grid-head--ot,
.sn-pc-calc__grid-row--ot {
	grid-template-columns: minmax(4.25rem, 0.85fr) minmax(3.25rem, 0.65fr) minmax(4.5rem, 1.15fr) auto;
}

.sn-pc-calc__grid-block:has( [data-pc-gross-up-earning-row] ) .sn-pc-calc__grid-head,
.sn-pc-calc__grid-row[data-pc-gross-up-earning-row] {
	grid-template-columns: minmax(3.5rem, 0.7fr) minmax(6rem, 1.4fr) minmax(3.75rem, 0.95fr) 0;
}

.sn-pc-calc__grid-row[data-pc-gross-up-earning-row] .sn-ci-calc__form-select {
	padding-right: 1.5rem;
}

.sn-pc-calc__grid-head--retire,
.sn-pc-calc__grid-row--retire {
	grid-template-columns: minmax(5rem, 1.1fr) minmax(4.75rem, 1fr) minmax(3.75rem, 0.85fr) auto;
}

.sn-pc-calc__grid-block--retire .sn-pc-calc__grid-rows {
	gap: 1rem;
}

.sn-pc-calc__retire-row {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sn-pc-calc__retire-include {
	align-items: center;
	display: inline-flex;
	font-size: 0.8125rem;
	gap: 0.4rem;
	line-height: 1.35;
	margin: 0;
	max-width: none;
	padding-left: 0.125rem;
	white-space: nowrap;
}

.sn-pc-calc__grid-block--retire .sn-pc-calc__grid-row--retire .sn-ci-calc__form-select {
	padding-right: 1.5rem;
}

.sn-pc-calc__grid-head {
	margin-bottom: 0.5rem;
}

.sn-pc-calc__grid-head span {
	background: #4a5568;
	border-radius: 0.375rem;
	color: #fff;
	font-size: 0.625rem;
	font-weight: 600;
	line-height: 1.2;
	min-width: 0;
	padding: 0.375rem 0.25rem;
	text-align: center;
	white-space: normal;
}

.sn-pc-calc__grid-head-spacer {
	background: transparent !important;
	padding: 0;
}

.sn-pc-calc__grid-row--ot .sn-ci-calc__form-control {
	min-width: 0;
	width: 100%;
}

.sn-pc-calc__grid-rows {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 0.875rem;
}

.sn-pc-calc__grid-row {
	align-items: center;
	background: transparent;
	border: 0;
	display: grid;
	padding: 0;
}

.sn-pc-calc__grid-row .sn-ci-calc__input-group,
.sn-pc-calc__grid-row .sn-ci-calc__form-control,
.sn-pc-calc__grid-row .sn-ci-calc__form-select {
	font-size: 0.8125rem;
	line-height: 1.35;
	min-width: 0;
	width: 100%;
}

.sn-pc-calc__grid-row .sn-ci-calc__form-select {
	padding: 0.3125rem 1.375rem 0.3125rem 0.375rem;
}

.sn-pc-calc__grid-row .sn-ci-calc__input-group .sn-ci-calc__form-control {
	padding: 0.3125rem 0.375rem;
}

.sn-pc-calc__grid-row .sn-ci-calc__input-addon {
	font-size: 0.8125rem;
	padding: 0 0.375rem;
}

.sn-pc-calc__grid-row > .sn-ci-calc__form-control {
	background-color: #fff;
	border: 1px solid var(--sn-ci-input-border, #ccc);
	border-radius: 6px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	padding: 0.3125rem 0.375rem;
}

.sn-pc-calc__grid-row > .sn-ci-calc__form-control:focus {
	border-color: #a0aec0;
	outline: 2px solid #e2e8f0;
}

.sn-pc-calc__grid-row .sn-pc-calc__add--icon,
.sn-pc-calc__grid-row .sn-pc-calc__remove {
	flex-shrink: 0;
	font-size: 1rem;
	height: 2rem;
	width: 2rem;
}

.sn-pc-calc__row-actions {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	flex-wrap: nowrap;
	gap: 0.25rem;
	justify-content: flex-end;
	min-width: 0;
}

.sn-pc-calc__remove {
	align-self: center;
	background: #fff;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #b91c1c;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 1.125rem;
	height: 2.25rem;
	line-height: 1;
	transition: background-color 0.15s ease, border-color 0.15s ease;
	width: 2.25rem;
}

.sn-pc-calc__remove:hover {
	background: #fef2f2;
	border-color: #f87171;
}

.sn-pc-calc__add[hidden],
.sn-pc-calc__remove[hidden] {
	display: none !important;
}

.sn-pc-calc__add {
	align-items: center;
	background: #fff;
	border: 1px dashed var(--sn-ci-accent, #2b7ddb);
	border-radius: 6px;
	color: var(--sn-ci-accent, #2b7ddb);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1;
	margin: 0;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sn-pc-calc__add--icon {
	flex-shrink: 0;
	font-size: 1.125rem;
	height: 2.25rem;
	padding: 0;
	width: 2.25rem;
}

.sn-pc-calc__add:hover {
	background: #eff6ff;
	border-color: #1e5a9e;
	color: #1e5a9e;
}

.sn-pc-calc__add-icon {
	font-size: inherit;
	font-weight: 700;
	line-height: 1;
}

.sn-pc-calc__empty {
	background: var(--sn-ci-panel-bg, #f8fafc);
	border: 1px dashed var(--sn-ci-input-border, #e2e8f0);
	border-radius: 8px;
	color: var(--color-text-muted, #64748b);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin-bottom: 0;
	padding: 1.5rem 1.25rem;
	text-align: center;
}

.sn-pc-calc__empty p {
	margin: 0;
}

.sn-pc-calc__input-summary {
	background: var(--sn-ci-panel-bg, #f8fafc);
	border: 1px solid var(--sn-ci-input-border, #e2e8f0);
	border-radius: 8px;
	margin-bottom: 1rem;
	padding: 0.75rem 0.875rem;
}

.sn-pc-calc__input-summary[hidden] {
	display: none !important;
}

.sn-pc-calc__input-summary-list {
	display: grid;
	font-size: 0.8125rem;
	gap: 0.4rem 0.75rem;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	line-height: 1.4;
	margin: 0;
}

.sn-pc-calc__input-summary-list dt {
	color: var(--color-text-muted, #64748b);
	font-weight: 500;
	margin: 0;
}

.sn-pc-calc__input-summary-list dd {
	color: var(--color-text, #0f172a);
	font-weight: 600;
	margin: 0;
	text-align: right;
	word-break: break-word;
}

.sn-pc-calc__chart-block {
	margin-bottom: 1.25rem;
}

.sn-pc-calc__takehome-display {
	border-bottom: 1px solid var(--sn-ci-input-border, #e2e8f0);
	margin-bottom: 0.875rem;
	padding-bottom: 0.75rem;
}

.sn-pc-calc__chart-row {
	align-items: center;
	display: flex;
	gap: 1.25rem;
}

.sn-pc-calc__donut-wrap {
	flex: 0 0 7.5rem;
	width: 7.5rem;
}

.sn-pc-calc__donut {
	line-height: 0;
	min-height: 0;
	width: 100%;
}

.sn-pc-calc__donut .sn-calc-chart__svg--pie,
.sn-pc-calc__donut .sn-calc-chart__svg--pie-large,
.sn-pc-calc__donut .sn-calc-chart__svg--pie-compact {
	display: block;
	height: auto;
	margin: 0;
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.sn-pc-calc__donut-label {
	color: var(--color-text-muted, #64748b);
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 0.25rem;
}

.sn-pc-calc__donut-value {
	color: var(--color-text, #0f172a);
	display: block;
	font-family: var(--font-heading, inherit);
	font-size: 1.375rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.15;
	white-space: nowrap;
}

.sn-pc-calc__legend {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.5rem;
	justify-content: center;
	min-width: 0;
}

.sn-pc-calc__legend-row {
	align-items: center;
	display: grid;
	gap: 0.5rem;
	grid-template-columns: 0.875rem 1fr auto;
}

.sn-pc-calc__legend-swatch {
	border-radius: 0.1875rem;
	display: block;
	height: 0.875rem;
	width: 0.875rem;
}

.sn-pc-calc__legend-label {
	color: var(--color-text, #0f172a);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
}

.sn-pc-calc__legend-pct {
	color: var(--color-text-muted, #64748b);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: right;
}

.sn-pc-calc__breakdown {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sn-pc-calc__breakdown-section {
	margin-bottom: 0.875rem;
}

.sn-pc-calc__breakdown-row,
.sn-pc-calc__breakdown-line {
	align-items: baseline;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.sn-pc-calc__breakdown-row {
	font-size: 0.9375rem;
	margin-bottom: 0.35rem;
}

.sn-pc-calc__breakdown-row--total strong,
.sn-pc-calc__breakdown-row--takehome strong {
	color: var(--color-text, #0f172a);
	font-family: var(--font-heading, inherit);
	font-size: 1rem;
	font-weight: 700;
}

.sn-pc-calc__breakdown-row--takehome {
	border-top: 1px solid #e2e8f0;
	font-size: 1rem;
	margin-top: 0.5rem;
	padding-top: 0.875rem;
}

.sn-pc-calc__breakdown-sub {
	color: var(--color-text-muted, #64748b);
	font-size: 0.875rem;
	margin: 0 0 0.25rem;
}

.sn-pc-calc__breakdown-line {
	margin-bottom: 0.25rem;
}

.sn-pc-calc__breakdown-line--state {
	padding-left: 0.75rem;
}

.sn-pc-calc__breakdown-state {
	color: var(--color-text-muted, #64748b);
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0.35rem 0 0.2rem;
}

.sn-pc-calc__breakdown-label {
	flex: 1 1 auto;
	min-width: 0;
}

.sn-pc-calc__breakdown-amount {
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.sn-pc-calc__breakdown-note {
	color: var(--color-text-muted, #94a3b8);
	display: block;
	font-size: 0.8125rem;
	font-weight: 400;
	margin-top: 0.1rem;
}

@media (max-width: 479px) {
	.sn-pc-calc__nav-tabs .sn-ci-calc__nav-tab,
	.sn-pc-calc__mode-tabs .sn-ci-calc__nav-tab {
		font-size: 0.72rem;
		padding: 0.5rem 0.35rem;
	}

	.sn-pc-calc .sn-ci-calc__label,
	.sn-pc-calc__field-label {
		white-space: normal;
	}
}

@media (max-width: 767px) {
	.sn-pc-calc__nav-tabs {
		flex-wrap: wrap;
	}

	.sn-pc-calc__nav-tabs .sn-ci-calc__nav-tab {
		font-size: 0.72rem;
		padding: 0.45rem 0.5rem;
	}
}
