/* ── CuracaoJobs Salary Growth Calculator — salary-growth.css ──
   Styles the dynamic year-by-year tool: mode toggle, anchor year
   input, JS-generated year rows, simple-mode fallback, target row,
   and the full results block (verdict, metrics, insight, chart,
   year-by-year table). Matches the CuracaoJobs.co design system —
   teal #2E8B72 / navy #174035 — not the Dushi Guide orange used in
   the original salary calculator (v2.4.0) build. */

.cjg-calculator {
	font-family: inherit;
	font-size: 0.95rem;
	color: #174035;
	max-width: 720px;
	margin: 0 auto;
}

.cjg-error {
	display: none;
	margin: 1rem 0;
	padding: 10px 12px;
	border: 1px solid #F7B4A0;
	border-radius: 8px;
	background: #FFF4F0;
	color: #B93816;
	font-size: 0.85rem;
	line-height: 1.4;
}

.cjg-error.is-visible {
	display: block;
}

/* ── Mode toggle ────────────────────────────────────────────── */
.cjg-mode-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
}

.cjg-mode-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #174035;
}

.cjg-mode-label span {
	font-size: 0.72rem;
	font-weight: 500;
	color: #8a9aaa;
	margin-left: 6px;
}

.cjg-mode-toggle-btn {
	font-size: 0.78rem;
	font-weight: 600;
	color: #2E8B72;
	background: none;
	border: none;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.cjg-mode-toggle-btn:hover { color: #207A61; }

/* ── Shared field styles ────────────────────────────────────── */
.cjg-field { display: flex; flex-direction: column; gap: 6px; }

.cjg-field label {
	font-size: 0.7rem;
	font-weight: 700;
	color: #8a9aaa;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cjg-field.cjg-required label::after { content: ' *'; color: #2E8B72; }

.cjg-field input[type="number"] {
	background: #F4F8F6;
	border: 0.5px solid #D8E8E4;
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #174035;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s, background 0.15s;
}

.cjg-field input[type="number"]:focus { border-color: #2E8B72; background: #fff; }
.cjg-field input::placeholder { color: #c0ccc8; font-weight: 400; }

/* ── Anchor row (start year) ────────────────────────────────── */
.cjg-anchor-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 1rem;
	align-items: flex-end;
	margin-bottom: 1.25rem;
}

.cjg-anchor-hint {
	font-size: 0.78rem;
	color: #8a9aaa;
	line-height: 1.5;
	padding-bottom: 2px;
}

/* ── Year rows (dynamically built by JS) ────────────────────── */
.cjg-year-rows-wrap { margin-bottom: 1.25rem; }

.cjg-year-rows-header {
	display: grid;
	grid-template-columns: 64px 1fr 80px;
	gap: 8px;
	padding: 0 2px;
	margin-bottom: 6px;
}

.cjg-year-rows-header span {
	font-size: 0.62rem;
	font-weight: 700;
	color: #aab0bb;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.cjg-year-rows {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cjg-year-row {
	display: grid;
	grid-template-columns: 64px 1fr 80px;
	gap: 8px;
	align-items: center;
}

.cjg-year-tag {
	font-size: 0.75rem;
	font-weight: 700;
	color: #174035;
	background: #F4F8F6;
	border-radius: 7px;
	padding: 8px 10px;
	text-align: center;
}

.cjg-year-tag.cjg-anchor { background: #E6F3EF; color: #2E8B72; }

.cjg-year-row .cjg-input-wrap {
	position: relative;
	display: block;
	border: none;
	background: none;
	overflow: visible;
}

.cjg-year-row .cjg-currency {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.7rem;
	font-weight: 600;
	color: #aab0bb;
	border-right: none;
	background: none;
	padding: 0;
	pointer-events: none;
}

.cjg-year-input {
	width: 100%;
	background: #F4F8F6;
	border: 0.5px solid #D8E8E4;
	border-radius: 9px;
	padding: 9px 12px 9px 44px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #174035;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s, background 0.15s;
}

.cjg-year-input:focus { border-color: #2E8B72; background: #fff; }
.cjg-year-input::placeholder { color: #c0ccc8; font-weight: 400; font-style: italic; font-size: 0.72rem; }
.cjg-year-input.cjg-is-anchor { border-color: #B8DDD5; background: #F8FCFA; }

.cjg-year-badge-col { display: flex; justify-content: flex-end; }

.cjg-badge-real {
	font-size: 0.62rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 4px;
	white-space: nowrap;
}

.cjg-badge-start { background: #E6F3EF; color: #2E8B72; }
.cjg-badge-now   { background: #174035; color: #fff; }

/* ── Simple mode fallback ───────────────────────────────────── */
.cjg-simple-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

/* ── Generic input-wrap (target row, simple mode) ───────────── */
.cjg-input-wrap {
	display: flex;
	align-items: center;
	flex: 1;
	border: 0.5px solid #D8E8E4;
	border-radius: 7px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.15s;
}

.cjg-input-wrap:focus-within { border-color: #2E8B72; }

.cjg-input-wrap .cjg-currency {
	padding: 0 10px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #8a9aaa;
	border-right: 0.5px solid #D8E8E4;
	white-space: nowrap;
	background: #F4F8F6;
}

.cjg-input-wrap input {
	flex: 1;
	border: none;
	outline: none;
	padding: 9px 10px;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: inherit;
	background: transparent;
	min-width: 0;
	color: #174035;
}

.cjg-input-wrap input::placeholder { color: #aab8c2; font-weight: 400; }

/* ── Target row ──────────────────────────────────────────────── */
.cjg-target-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #F4F8F6;
	border: 0.5px solid #D8E8E4;
	border-radius: 9px;
	padding: 10px 14px;
	margin-bottom: 0;
}

.cjg-target-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #174035;
	white-space: nowrap;
}

.cjg-target-hint {
	font-size: 0.75rem;
	color: #8a9aaa;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Calculate button ───────────────────────────────────────── */
.cjg-calculate-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px;
	background: #2E8B72;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	margin-top: 1.25rem;
	transition: background 0.15s;
}

.cjg-calculate-btn:hover { background: #207A61; }
.cjg-calculate-btn i { font-size: 1rem; }

/* ── Results section ────────────────────────────────────────── */
.cjg-results {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 0.5px solid #D8E8E4;
}

.cjg-results-heading {
	font-size: 0.7rem;
	font-weight: 700;
	color: #8a9aaa;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

/* ── Verdict ─────────────────────────────────────────────────── */
.cjg-verdict {
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
	display: flex;
	align-items: center;
	gap: 14px;
}

.cjg-verdict.cjg-winning { background: #E6F3EF; border: 1px solid #B8DDD5; }
.cjg-verdict.cjg-losing  { background: #FEF3C7; border: 1px solid #FDE68A; }

.cjg-verdict-icon { font-size: 1.75rem; flex-shrink: 0; }
.cjg-verdict.cjg-winning .cjg-verdict-icon { color: #2E8B72; }
.cjg-verdict.cjg-losing  .cjg-verdict-icon { color: #D97706; }

.cjg-verdict-title { font-size: 1.05rem; font-weight: 700; color: #174035; margin-bottom: 3px; }
.cjg-verdict.cjg-losing .cjg-verdict-title { color: #92400E; }

.cjg-verdict-sub { font-size: 0.8rem; color: #4a5a6a; line-height: 1.4; }

/* ── Metrics ─────────────────────────────────────────────────── */
.cjg-metrics-row { display: grid; gap: 10px; margin-bottom: 10px; }
.cjg-metrics-row.cjg-top { grid-template-columns: repeat(3, 1fr); }
.cjg-metrics-row.cjg-bottom-2 { grid-template-columns: repeat(2, 1fr); }
.cjg-metrics-row.cjg-bottom-3 { grid-template-columns: repeat(3, 1fr); }

.cjg-metric {
	background: #F4F8F6;
	border-radius: 10px;
	padding: 14px;
}

.cjg-metric-label { font-size: 0.7rem; color: #8a9aaa; margin-bottom: 4px; }
.cjg-metric-value { font-size: 1.25rem; font-weight: 700; color: #174035; letter-spacing: -0.3px; line-height: 1; }
.cjg-metric-sub { font-size: 0.7rem; font-weight: 600; color: #8a9aaa; margin-top: 3px; }
.cjg-metric-unit { font-size: 0.7rem; font-weight: 500; color: #8a9aaa; margin-top: 2px; }

.cjg-metric.cjg-teal { background: #E6F3EF; }
.cjg-metric.cjg-teal .cjg-metric-value { color: #2E8B72; }
.cjg-metric.cjg-teal .cjg-metric-sub { color: #2E8B72; opacity: 0.8; }

.cjg-metric.cjg-amber { background: #FEF3C7; }
.cjg-metric.cjg-amber .cjg-metric-value { color: #D97706; }

.cjg-metrics-bottom-wrap { margin-bottom: 1.5rem; }

/* ── Insight ─────────────────────────────────────────────────── */
.cjg-insight {
	background: #174035;
	color: #fff;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.cjg-insight i { font-size: 1rem; color: #2E8B72; flex-shrink: 0; margin-top: 1px; }
.cjg-insight-text { font-size: 0.8rem; line-height: 1.5; }
.cjg-insight-text strong { color: #A7DFD0; }

/* ── Chart ───────────────────────────────────────────────────── */
.cjg-chart-wrap { margin-bottom: 1.5rem; }

.cjg-chart-label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	flex-wrap: wrap;
	gap: 6px;
}

.cjg-chart-title { font-size: 0.75rem; font-weight: 600; color: #174035; }

.cjg-chart-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cjg-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: #8a9aaa; }

.cjg-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

.cjg-chart-canvas { width: 100% !important; border-radius: 8px; }

.cjg-cbs-note {
	font-size: 0.7rem;
	color: #aab0bb;
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.cjg-cbs-note i { font-size: 0.75rem; }

/* ── Year-by-year table ─────────────────────────────────────── */
.cjg-proj-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }

.cjg-proj-table th {
	font-size: 0.62rem;
	font-weight: 700;
	color: #8a9aaa;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	text-align: left;
	padding: 8px 8px;
	border-bottom: 0.5px solid #D8E8E4;
}

.cjg-proj-table td {
	padding: 8px 8px;
	border-bottom: 0.5px solid #F4F8F6;
	color: #4a5a6a;
}

.cjg-proj-table tr:last-child td { border-bottom: none; }

.cjg-proj-table tr.cjg-now-row td { background: #F4F8F6; font-weight: 600; color: #174035; }
.cjg-proj-table tr.cjg-tgt-row td { background: #E6F3EF; font-weight: 700; }
.cjg-proj-table tr.cjg-interp-row td { color: #aab0bb; font-style: italic; }

.cjg-proj-table td.cjg-sal-col { font-weight: 600; color: #174035; }
.cjg-proj-table tr.cjg-interp-row td.cjg-sal-col { color: #aab0bb; font-weight: 400; }
.cjg-proj-table tr.cjg-tgt-row td.cjg-sal-col { color: #2E8B72; }

.cjg-tbadge {
	display: inline-block;
	background: #D8E8E4;
	color: #174035;
	font-size: 0.62rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 4px;
}

.cjg-tbadge.cjg-green { background: #2E8B72; color: #fff; }
.cjg-tbadge.cjg-muted { background: #F4F8F6; color: #aab0bb; font-style: italic; font-weight: 400; }

/* ── Colour utilities ───────────────────────────────────────── */
.cjg-pos { color: #2E8B72; font-weight: 700; }
.cjg-neg { color: #DC2626; font-weight: 700; }

/* ── Disclaimer ──────────────────────────────────────────────── */
.cjg-disclaimer {
	margin-top: 1.25rem;
	font-size: 0.7rem;
	color: #8a9aaa;
	line-height: 1.5;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.cjg-anchor-row { grid-template-columns: 1fr; }
	.cjg-simple-grid { grid-template-columns: 1fr; }
	.cjg-metrics-row.cjg-top { grid-template-columns: 1fr; }
	.cjg-metrics-row.cjg-bottom-3 { grid-template-columns: 1fr 1fr; }
	.cjg-year-rows-header span:last-child { display: none; }
	.cjg-year-row { grid-template-columns: 56px 1fr 0; }
	.cjg-year-badge-col { display: none; }
	.cjg-mode-toggle { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
	.cjg-target-row { flex-wrap: wrap; }
}
