/* Geoffrey Mortgage Calculator
   All rules are scoped under .gmc-wrap and deliberately assertive so the
   widget survives being dropped into arbitrary WordPress themes. */

.gmc-wrap {
	--gmc-ink: #16232e;        /* deep slate ink */
	--gmc-paper: #ffffff;
	--gmc-mist: #f2f5f7;       /* input backgrounds */
	--gmc-line: #d9e0e5;
	--gmc-accent: #0e7c66;     /* eucalyptus green */
	--gmc-accent-ink: #0a5a4a;
	--gmc-interest: #c9d4db;   /* muted slate for interest share */
	--gmc-warn-bg: #fdf3e3;
	--gmc-warn-ink: #7a5410;
	--gmc-radius: 14px;

	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
	color: var(--gmc-ink);
	line-height: 1.45;
	max-width: 860px;
	margin: 0 auto;
}

.gmc-wrap *,
.gmc-wrap *::before,
.gmc-wrap *::after {
	box-sizing: inherit;
	font-family: inherit;
}

.gmc-card {
	background: var(--gmc-paper);
	border: 1px solid var(--gmc-line);
	border-radius: var(--gmc-radius);
	padding: 28px;
	box-shadow: 0 10px 30px rgba(22, 35, 46, 0.06);
}

/* ---------- Header ---------- */

.gmc-header { margin-bottom: 22px; }

.gmc-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gmc-accent-ink);
	margin-bottom: 4px;
}

.gmc-wrap .gmc-heading {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	padding: 0;
	color: var(--gmc-ink);
	line-height: 1.2;
}

/* ---------- Layout ---------- */

.gmc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	align-items: start;
}

@media (max-width: 680px) {
	.gmc-grid { grid-template-columns: 1fr; }
	.gmc-card { padding: 20px; }
}

/* ---------- Inputs ---------- */

.gmc-inputs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.gmc-field { grid-column: 1 / -1; }
.gmc-field-half { grid-column: auto; }

.gmc-wrap label,
.gmc-wrap .gmc-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 6px;
	color: var(--gmc-ink);
}

.gmc-input-group {
	display: flex;
	align-items: center;
	background: var(--gmc-mist);
	border: 1px solid var(--gmc-line);
	border-radius: 10px;
	padding: 0 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gmc-input-group:focus-within {
	border-color: var(--gmc-accent);
	box-shadow: 0 0 0 3px rgba(14, 124, 102, 0.15);
}

.gmc-wrap input[type="text"],
.gmc-wrap input[type="number"] {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 17px;
	font-weight: 600;
	color: var(--gmc-ink);
	padding: 11px 4px;
	margin: 0;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.gmc-wrap input::-webkit-outer-spin-button,
.gmc-wrap input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.gmc-prefix,
.gmc-suffix {
	font-size: 15px;
	font-weight: 600;
	color: #5c6b76;
	flex: 0 0 auto;
}

/* ---------- Quick deposit + toggles ---------- */

.gmc-quick {
	display: flex;
	gap: 6px;
	margin-top: 8px;
}

.gmc-wrap .gmc-quick button,
.gmc-wrap .gmc-toggle button,
.gmc-wrap .gmc-freq button {
	appearance: none;
	border: 1px solid var(--gmc-line);
	background: var(--gmc-paper);
	color: var(--gmc-ink);
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

.gmc-wrap .gmc-quick button:hover,
.gmc-wrap .gmc-toggle button:hover,
.gmc-wrap .gmc-freq button:hover {
	border-color: var(--gmc-accent);
	color: var(--gmc-accent-ink);
	background: var(--gmc-paper);
}

.gmc-wrap .gmc-toggle button.is-active,
.gmc-wrap .gmc-freq button.is-active {
	background: var(--gmc-ink);
	border-color: var(--gmc-ink);
	color: #fff;
}

.gmc-wrap button:focus-visible {
	outline: 3px solid rgba(14, 124, 102, 0.4);
	outline-offset: 2px;
}

.gmc-toggle,
.gmc-freq {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.gmc-lvr {
	font-size: 13px;
	color: #5c6b76;
	margin: 8px 0 0;
}

.gmc-lvr strong { color: var(--gmc-ink); }

/* ---------- Results ---------- */

.gmc-results {
	background: var(--gmc-mist);
	border: 1px solid var(--gmc-line);
	border-radius: 12px;
	padding: 20px;
}

.gmc-freq { margin-bottom: 16px; }

.gmc-payment { margin-bottom: 16px; }

.gmc-payment-figure {
	display: block;
	font-size: 42px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--gmc-accent-ink);
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.gmc-payment-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #5c6b76;
	margin-top: 4px;
}

.gmc-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--gmc-interest);
	overflow: hidden;
	margin-bottom: 8px;
}

.gmc-bar-principal {
	display: block;
	height: 100%;
	width: 50%;
	background: var(--gmc-accent);
	border-radius: 999px 0 0 999px;
	transition: width 0.3s ease;
}

.gmc-bar-legend {
	display: flex;
	gap: 16px;
	font-size: 12px;
	color: #5c6b76;
	margin-bottom: 16px;
}

.gmc-bar-legend span { display: inline-flex; align-items: center; gap: 6px; }

.gmc-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
}

.gmc-dot-principal { background: var(--gmc-accent); }
.gmc-dot-interest { background: var(--gmc-interest); }

.gmc-wrap .gmc-summary {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--gmc-line);
}

.gmc-summary > div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 10px 0;
	border-bottom: 1px solid var(--gmc-line);
}

.gmc-summary dt {
	font-size: 13.5px;
	font-weight: 500;
	color: #5c6b76;
	margin: 0;
}

.gmc-summary dd {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.gmc-lmi {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--gmc-warn-bg);
	color: var(--gmc-warn-ink);
	font-size: 13px;
	line-height: 1.45;
}

/* ---------- Disclaimer ---------- */

.gmc-disclaimer {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--gmc-line);
	font-size: 12px;
	line-height: 1.55;
	color: #6b7a85;
}

@media (prefers-reduced-motion: reduce) {
	.gmc-wrap * { transition: none !important; }
}
