/* ============================================================
   TRUMP ACCOUNT / INVEST AMERICA CALCULATOR
   Shortcode: [trump_account_calculator]
   Everything is scoped under .gw-calc so nothing leaks into the
   host page, and the container's specificity neutralizes theme
   base rules (e.g. layout.css `label {}`) bleeding back in.
   ============================================================ */

/* ===== SCOPED RESET ===== */
.gw-calc,
.gw-calc *,
.gw-calc *::before,
.gw-calc *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ===== TOKENS + CONTAINER BASE ===== */
.gw-calc {
	/* Brand tokens (scoped — do not rely on / collide with theme vars) */
	--copper: #bc8466;
	--copper-light: #d4a68a;
	--clearwater: #083a5b;
	--atlantic: #041c2f;
	--stone: #000000;
	--stone-light: #000000;
	--surface: #ffffff;
	--surface-alt: #f5f2ee;
	--surface-row: #f0ede8;
	--border: #e2ddd6;
	--radius: 8px;
	--radius-lg: 12px;
	--shadow-md: 0 4px 16px rgba(4, 28, 47, 0.08);
	--transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
	--font-display: "Playfair Display", Georgia, serif;
	--font-sub: "bicyclette", sans-serif;
	--font-body: "DM Sans", -apple-system, "Segoe UI", sans-serif;

	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--atlantic);
	background: var(--surface-alt);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Neutralize inbound theme base styles on elements we use */
.gw-calc label,
.gw-calc h2 {
	text-transform: none;
	letter-spacing: normal;
	font-family: var(--font-body);
	color: inherit;
}
.gw-calc a {
	text-decoration: none;
}

/* ===== PAGE LAYOUT ===== */
.gw-calc .calc-wrap {
	max-width: 880px;
	margin: 0 auto;
	padding: 40px 24px 60px 24px;
}

.gw-calc .border-bottom {
	background: url(../images/border-bottom01.svg) top left no-repeat;
	background-size: contain;
	height: 18px;
	width: 100%;
	margin-bottom: 25px;
}

/* ===== HEADING + OPTIONAL INTRO ===== */
.gw-calc .calc-heading {
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--copper);
	margin-bottom: 12px;
}

.gw-calc .calc-intro {
	max-width: 720px;
	margin: 0 0 16px;
	text-align: left;
	font-size: 16px;
	line-height: 1.8;
	color: var(--stone);
}

/* ===== CALCULATOR CARD ===== */
.gw-calc .calc-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	overflow: hidden;
}

.gw-calc .calc-inputs {
	padding: 32px 32px 28px;
}
.gw-calc .calc-inputs h2 {
	font-family: var(--font-display);
	font-size: 2.5em;
	font-weight: 400;
	line-height: 1.2em;
	color: var(--copper);
	margin-bottom: 0.75rem;
}

.gw-calc .field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
@media (max-width: 560px) {
	.gw-calc .field-grid {
		grid-template-columns: 1fr;
	}
}

.gw-calc .field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gw-calc .field label {
	font-size: 13px;
	font-weight: 500;
	color: var(--copper);
	letter-spacing: 0.2px;
}
.gw-calc .field .hint {
	font-size: 12px;
	color: var(--stone-light);
	margin-top: -2px;
}

.gw-calc .input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}
.gw-calc .input-prefix {
	position: absolute;
	left: 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--stone-light);
	pointer-events: none;
}
.gw-calc .input-suffix {
	position: absolute;
	right: 14px;
	font-size: 13px;
	color: var(--stone-light);
	pointer-events: none;
}

.gw-calc input[type="number"] {
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius);
	font-size: 15px;
	font-weight: 500;
	color: var(--atlantic);
	-moz-appearance: textfield;
	background: #fff;
	border: 1px solid var(--border);
	transition:
		border 250ms ease,
		box-shadow 250ms ease;
	font-family: var(--font-body);
}
.gw-calc input[type="number"]::-webkit-outer-spin-button,
.gw-calc input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.gw-calc input[type="number"]:focus {
	outline: none;
	border: 1px solid var(--copper);
	box-shadow: 0 0 0 3px rgba(188, 132, 102, 0.15);
}
.gw-calc input.has-prefix {
	padding-left: 28px;
}
.gw-calc input.has-suffix {
	padding-right: 60px;
}

.gw-calc .rate-display {
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius);
	font-size: 15px;
	font-weight: 500;
	color: var(--atlantic);
	background: var(--surface-row);
}
.gw-calc .rate-btn-group {
	display: flex;
	gap: 6px;
	width: 100%;
}
.gw-calc .rate-btn {
	flex: 1;
	padding: 10px 0;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: #fff;
	color: var(--stone);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition:
		border-color 200ms ease,
		background 200ms ease,
		color 200ms ease;
	font-family: var(--font-body);
}
.gw-calc .rate-btn:hover {
	border-color: var(--copper);
	color: var(--atlantic);
}
.gw-calc .rate-btn.active {
	background: var(--copper);
	border-color: var(--copper);
	color: #fff;
}

/* ===== ELIGIBILITY CHECKBOXES ===== */
.gw-calc .eligibility-section {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}
.gw-calc .eligibility-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--copper);
	letter-spacing: 0.2px;
	margin-bottom: 14px;
}
.gw-calc .eligibility-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.gw-calc .eligibility-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--radius);
	cursor: pointer;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	transition: border 250ms ease;
}
.gw-calc .eligibility-option:hover {
	border-color: var(--copper);
}
.gw-calc .eligibility-option.checked {
	background: rgba(188, 132, 102, 0.08);
	border-color: var(--copper-light);
}

/* Custom radio/checkbox appearance */
.gw-calc .eligibility-option input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 2px solid var(--stone-light);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	position: relative;
	margin-top: 1px;
	transition:
		border-color var(--transition),
		background var(--transition);
}
.gw-calc .eligibility-option input[type="checkbox"]:checked {
	border-color: var(--copper);
	background: var(--copper);
}
.gw-calc .eligibility-option input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	background: white;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}
.gw-calc .eligibility-option input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--copper);
	outline-offset: 2px;
}

.gw-calc .eligibility-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.gw-calc .eligibility-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--copper);
	display: flex;
	align-items: center;
	gap: 8px;
}
.gw-calc .eligibility-amount {
	font-size: 13px;
	font-weight: 600;
	color: var(--atlantic);
}
.gw-calc .eligibility-note {
	font-size: 12px;
	line-height: 1.5;
	color: var(--stone);
}
.gw-calc .eligibility-note a {
	color: var(--copper);
}
.gw-calc .eligibility-note a:hover {
	text-decoration: underline;
}

.gw-calc .initial-total {
	margin-top: 16px;
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius);
	font-size: 15px;
	font-weight: 500;
	color: var(--atlantic);
	background: var(--surface-row);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.gw-calc .initial-total-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--atlantic);
}
.gw-calc .initial-total-value {
	font-size: 17px;
	font-weight: 600;
	color: var(--copper);
}

/* ===== CALCULATE BUTTON ===== */
.gw-calc .calc-action {
	padding: 0 32px 32px;
}
.gw-calc .btn-calculate {
	width: 100%;
	padding: 14px 24px;
	background: var(--copper);
	color: #fff;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: none;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition:
		background var(--transition),
		transform var(--transition);
}
.gw-calc .btn-calculate:hover {
	background: var(--copper-light);
}
.gw-calc .btn-calculate:active {
	transform: scale(0.985);
}

/* ===== RESULTS ===== */
.gw-calc .calc-results {
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--surface-alt);
	padding: 32px;
	display: none;
}
.gw-calc .calc-results.visible {
	display: block;
}

.gw-calc .result-hero {
	text-align: center;
	margin-bottom: 28px;
}
.gw-calc .result-hero-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--stone);
	margin-bottom: 4px;
}
.gw-calc .result-hero-value {
	font-family: var(--font-display);
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
	font-weight: 700;
	color: var(--copper);
	line-height: 1.1;
}
.gw-calc .result-hero-sub {
	font-size: 13px;
	color: var(--stone-light);
	margin: 10px auto;
	max-width: 500px;
}

.gw-calc .result-breakdown {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 16px;
	margin-bottom: 28px;
}
@media (max-width: 560px) {
	.gw-calc .result-breakdown {
		grid-template-columns: 1fr;
	}
}
.gw-calc .result-stat {
	border: 1px solid var(--border);
	background: #fff;
	border-radius: var(--radius);
	padding: 16px;
	text-align: center;
}
.gw-calc .result-stat-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--stone);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 4px;
}
.gw-calc .result-stat-value {
	font-size: 20px;
	font-weight: 600;
	color: var(--copper);
}

/* ===== GROWTH CHART ===== */
.gw-calc .chart-container {
	padding: 20px;
	margin-bottom: 24px;
}
.gw-calc .chart-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--copper);
	margin-bottom: 16px;
}
.gw-calc canvas {
	width: 100%;
	height: 300px;
}

/* ===== MILESTONES ===== */
.gw-calc .milestones {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}
.gw-calc .milestone {
	border: 1px solid var(--border);
	background: #fff;
	border-radius: var(--radius);
	padding: 16px;
	text-align: center;
}
.gw-calc .milestone-age {
	font-size: 11px;
	font-weight: 600;
	color: var(--stone);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 2px;
}
.gw-calc .milestone-value {
	font-size: 19px;
	font-weight: 600;
	color: var(--copper);
}
.gw-calc .milestone-label {
	font-size: 11px;
	color: var(--stone-light);
	margin-top: 2px;
}

/* ===== DISCLAIMER ===== */
.gw-calc .calc-disclaimer {
	margin-top: 20px;
	padding: 18px 22px;
	font-size: 12px;
	color: var(--stone);
	line-height: 1.65;
}
.gw-calc .calc-disclaimer strong {
	color: var(--atlantic);
	font-weight: 600;
}

/* ===== AGE ERROR / DISABLED STATE ===== */
.gw-calc .age-error {
	margin-top: 12px;
	padding: 14px 18px;
	background: rgba(188, 132, 102, 0.08);
	border: 1px solid var(--copper-light);
	border-radius: var(--radius);
	font-size: 14px;
	color: var(--copper);
	line-height: 1.6;
	display: none;
}
.gw-calc .age-error.visible {
	display: block;
}
.gw-calc .btn-calculate:disabled {
	background: var(--stone-light);
	cursor: not-allowed;
	opacity: 0.6;
}
.gw-calc .btn-calculate:disabled:hover {
	background: var(--stone-light);
	transform: none;
}
.gw-calc .calc-inputs.disabled-state .field input:not(#gwc-childAge),
.gw-calc .calc-inputs.disabled-state .eligibility-option {
	opacity: 0.4;
	pointer-events: none;
}
.gw-calc .calc-inputs.disabled-state .rate-display {
	opacity: 0.4;
	pointer-events: none;
}
.gw-calc .eligibility-option.disabled {
	opacity: 0.4;
	pointer-events: none;
	cursor: not-allowed;
}
.gw-calc .ineligible-msg {
	display: none;
	font-size: 11px;
	font-style: italic;
	color: var(--stone-light);
	margin-top: 4px;
}
.gw-calc .eligibility-option.disabled .ineligible-msg {
	display: block;
}

/* ===== ADVISOR CALLOUT ===== */
.gw-calc .advisor-callout {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 28px 24px;
	margin-top: 24px;
	text-align: center;
}
.gw-calc .advisor-callout p {
	font-size: 15px;
	color: var(--stone);
	margin: 0;
}
.gw-calc .advisor-callout a {
	color: var(--copper);
	font-weight: 500;
}
.gw-calc .advisor-callout a:hover {
	text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
	.gw-calc .calc-wrap {
		padding: 32px 16px;
	}
	.gw-calc .calc-inputs {
		padding: 24px 20px 20px;
	}
	.gw-calc .calc-action {
		padding: 0 20px 24px;
	}
	.gw-calc .calc-results {
		padding: 24px 20px;
	}
}
