/**
 * Kiran Zakat Calculator — base styles.
 * All colours/typography are overridable from the Elementor Style tab; these
 * are sensible, neutral defaults. Selectors are scoped under .kzc-calc so the
 * widget never affects the rest of the page.
 */

.kzc-calc {
	--kzc-border: #e3e6ea;
	--kzc-muted: #6b7280;
	--kzc-accent: #1a7f5a;
	box-sizing: border-box;
	width: 100%;
	background: #fff;
	border: 1px solid var(--kzc-border);
	border-radius: 14px;
	padding: 28px;
}

.kzc-calc *,
.kzc-calc *::before,
.kzc-calc *::after {
	box-sizing: border-box;
}

.kzc-title {
	margin: 0 0 6px;
	font-size: 1.5rem;
	line-height: 1.2;
}

.kzc-subtitle {
	margin: 0 0 18px;
	color: var(--kzc-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

.kzc-nisab-note,
.kzc-rate-note {
	margin: 0 0 16px;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--kzc-muted);
}

.kzc-rate-note {
	font-weight: 600;
}

.kzc-section {
	margin-top: 20px;
}

.kzc-section-title {
	margin: 0 0 12px;
	padding: 8px 12px;
	font-size: 1rem;
	border-radius: 8px;
	background: #f4f6f8;
	color: #111827;
}

.kzc-field {
	margin-bottom: 14px;
}

.kzc-field label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #1f2937;
}

.kzc-field input {
	width: 100%;
	height: 44px;
	padding: 8px 12px;
	font-size: 1rem;
	color: #111827;
	background: #fff;
	border: 1px solid var(--kzc-border);
	border-radius: 8px;
	transition: border-color 0.15s ease;
	-moz-appearance: textfield;
}

.kzc-field input:focus {
	border-color: var(--kzc-accent);
	outline: none;
}

/* Hide number spinners for a cleaner look. */
.kzc-field input::-webkit-outer-spin-button,
.kzc-field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.kzc-help {
	display: block;
	margin-top: 4px;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--kzc-muted);
}

.kzc-basis-field select {
	width: 100%;
	height: 44px;
	padding: 8px 12px;
	font-size: 1rem;
	border: 1px solid var(--kzc-border);
	border-radius: 8px;
	background: #fff;
}

.kzc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.kzc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.kzc-btn-primary {
	background: var(--kzc-accent);
	color: #fff;
}

.kzc-btn-primary:hover {
	background: #156247;
	color: #fff;
}

.kzc-btn-secondary {
	background: #eef1f4;
	color: #374151;
}

.kzc-btn-secondary:hover {
	background: #e2e6ea;
}

.kzc-results {
	margin-top: 24px;
	padding: 18px 20px;
	background: #f9fafb;
	border-radius: 12px;
}

.kzc-result-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 7px 0;
	font-size: 0.95rem;
	color: #374151;
	border-bottom: 1px solid var(--kzc-border);
}

.kzc-result-row:last-of-type {
	border-bottom: none;
}

.kzc-result-value {
	font-weight: 600;
	white-space: nowrap;
}

.kzc-zakat-due {
	margin-top: 4px;
	padding-top: 12px;
	font-size: 1.05rem;
}

.kzc-zakat-due .kzc-result-value {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--kzc-accent);
}

.kzc-eligibility {
	margin: 12px 0 0;
	font-size: 0.85rem;
	line-height: 1.45;
}

.kzc-eligibility.kzc-above { color: #15803d; }
.kzc-eligibility.kzc-below { color: #b45309; }

.kzc-donate-wrap {
	margin-top: 18px;
}

.kzc-donate-btn {
	width: 100%;
}

/* Assets in two columns on desktop, single column on mobile (default). */
@media ( min-width: 768px ) {
	.kzc-assets {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 18px;
	}
	/* Section heading spans both columns. */
	.kzc-assets .kzc-section-title {
		grid-column: 1 / -1;
	}
	/* Field already carries its own bottom margin; keep it as the row gap. */
	.kzc-assets .kzc-field {
		margin-bottom: 14px;
	}
}

@media ( max-width: 480px ) {
	.kzc-calc { padding: 20px; }
	.kzc-actions { flex-direction: column; }
	.kzc-btn { width: 100%; }
}
