/* ==========================================================================
   WebNova SIP Calculator — styles
   Palette: ink #0E2A26, emerald #147D64, gold #C9A227, mint #F1F7F4, muted #5B6B67
   ========================================================================== */

.wsc-widget {
	--wsc-ink: #0E2A26;
	--wsc-emerald: #147D64;
	--wsc-emerald-dark: #0E5B49;
	--wsc-gold: #C9A227;
	--wsc-gold-soft: #E7C766;
	--wsc-mint: #F1F7F4;
	--wsc-muted: #5B6B67;
	--wsc-line: #DCE8E3;
	--wsc-white: #FFFFFF;
	--wsc-radius: 18px;
	--wsc-shadow: 0 20px 45px -20px rgba(14, 42, 38, 0.28);

	all: initial;
	*, *::before, *::after { box-sizing: border-box; }
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	display: block;
	max-width: 880px;
	margin: 2rem auto;
	color: var(--wsc-ink);
	-webkit-font-smoothing: antialiased;
}

.wsc-card {
	background: var(--wsc-white);
	border: 1px solid var(--wsc-line);
	border-radius: var(--wsc-radius);
	box-shadow: var(--wsc-shadow);
	overflow: hidden;
}

/* ---------- Header ---------- */
.wsc-head {
	padding: 2rem 2rem 1.25rem;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(201, 162, 39, 0.14), transparent 55%),
		linear-gradient(135deg, var(--wsc-ink) 0%, var(--wsc-emerald-dark) 100%);
	color: var(--wsc-white);
}

.wsc-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wsc-gold-soft);
	margin-bottom: 0.5rem;
}

.wsc-title {
	font-size: 1.6rem;
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 0.35rem;
	letter-spacing: -0.01em;
}

.wsc-subtitle {
	margin: 0;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.78);
	max-width: 46ch;
}

/* ---------- Body layout ---------- */
.wsc-body {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 2rem;
	padding: 2rem;
}

@media (max-width: 680px) {
	.wsc-body {
		grid-template-columns: 1fr;
		padding: 1.5rem;
		gap: 2.25rem;
	}
	.wsc-head { padding: 1.5rem 1.5rem 1rem; }
}

/* ---------- Controls / fields ---------- */
.wsc-controls {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
}

.wsc-field-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.55rem;
}

.wsc-field label {
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--wsc-ink);
}

.wsc-input-wrap {
	display: flex;
	align-items: center;
	background: var(--wsc-mint);
	border: 1px solid var(--wsc-line);
	border-radius: 10px;
	padding: 0.35rem 0.6rem;
	min-width: 118px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wsc-input-wrap:focus-within {
	border-color: var(--wsc-emerald);
	box-shadow: 0 0 0 3px rgba(20, 125, 100, 0.15);
}

.wsc-prefix,
.wsc-suffix {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wsc-muted);
	flex: 0 0 auto;
}

.wsc-number {
	all: unset;
	width: 100%;
	text-align: right;
	font-size: 0.95rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--wsc-ink);
	padding: 0 0.35rem;
	appearance: textfield;
}
.wsc-number::-webkit-outer-spin-button,
.wsc-number::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Range slider */
.wsc-range {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--wsc-emerald) 0%, var(--wsc-emerald) var(--wsc-fill, 40%), var(--wsc-line) var(--wsc-fill, 40%), var(--wsc-line) 100%);
	outline: none;
	cursor: pointer;
}

.wsc-range::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wsc-white);
	border: 3px solid var(--wsc-emerald);
	box-shadow: 0 2px 6px rgba(14, 42, 38, 0.25);
	cursor: pointer;
	transition: transform 0.12s ease;
}
.wsc-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.wsc-range::-webkit-slider-thumb:active { transform: scale(1.2); }

.wsc-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wsc-white);
	border: 3px solid var(--wsc-emerald);
	box-shadow: 0 2px 6px rgba(14, 42, 38, 0.25);
	cursor: pointer;
}
.wsc-range::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: var(--wsc-line);
}
.wsc-range::-moz-range-progress {
	height: 6px;
	border-radius: 999px;
	background: var(--wsc-emerald);
}

.wsc-range:focus-visible {
	outline: 2px solid var(--wsc-emerald);
	outline-offset: 3px;
}

/* ---------- Result / donut ---------- */
.wsc-result {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.4rem;
	background: var(--wsc-mint);
	border-radius: 14px;
	padding: 1.6rem 1.4rem;
}

.wsc-donut-wrap {
	position: relative;
	width: 220px;
	height: 220px;
}

.wsc-donut { display: block; }

.wsc-donut-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	pointer-events: none;
}

.wsc-donut-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wsc-muted);
	margin-bottom: 0.2rem;
}

.wsc-donut-value {
	font-size: 1.28rem;
	font-weight: 800;
	color: var(--wsc-ink);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.wsc-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.wsc-legend li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.86rem;
}

.wsc-legend-label {
	color: var(--wsc-muted);
	flex: 1;
}

.wsc-legend-value {
	font-weight: 700;
	color: var(--wsc-ink);
	font-variant-numeric: tabular-nums;
}

.wsc-legend-total {
	border-top: 1px dashed var(--wsc-line);
	padding-top: 0.65rem;
	margin-top: 0.15rem;
}
.wsc-legend-total .wsc-legend-label,
.wsc-legend-total .wsc-legend-value {
	color: var(--wsc-ink);
	font-weight: 700;
}

.wsc-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.wsc-dot--invested { background: var(--wsc-emerald); }
.wsc-dot--returns { background: var(--wsc-gold); }
.wsc-dot--total { background: var(--wsc-ink); }

/* ---------- Footer ---------- */
.wsc-foot {
	padding: 0.85rem 2rem;
	border-top: 1px solid var(--wsc-line);
	font-size: 0.74rem;
	color: var(--wsc-muted);
	text-align: right;
	background: var(--wsc-white);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.wsc-range::-webkit-slider-thumb,
	.wsc-donut-value {
		transition: none !important;
	}
}
