/* ============================================================
   FML Loan Calculator — Public Styles v1.0.0
   Author: Forward Multimedia Ltd
   ============================================================ */

.fml-lc-wrapper {
	--lc-left-bg:         #ffffff;
	--lc-left-text:       #1a1a1a;
	--lc-label-text:      #1a1a1a;
	--lc-slider-track:    #e0e0e0;
	--lc-slider-fill:     #9B1C1C;
	--lc-slider-thumb:    #9B1C1C;
	--lc-input-border:    #d1d5db;
	--lc-input-text:      #1a1a1a;
	--lc-input-bg:        #ffffff;
	--lc-right-bg:        #7F1D1D;
	--lc-right-text:      #ffffff;
	--lc-result-amount:   #ffffff;
	--lc-divider:         rgba(255,255,255,0.3);
	--lc-apply-btn-bg:    #D97706;
	--lc-apply-btn-text:  #ffffff;
	--lc-apply-btn-hover: #B45309;

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto;
}

.fml-lc-wrapper *,
.fml-lc-wrapper *::before,
.fml-lc-wrapper *::after {
	box-sizing: inherit;
}

/* ── Inner layout ─────────────────────────────────────────── */
.fml-lc-inner {
	display: flex;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 6px 32px rgba(0,0,0,0.12);
}

/* ── Left panel ────────────────────────────────────────────── */
.fml-lc-left {
	flex: 1 1 55%;
	background: var(--lc-left-bg);
	padding: 36px 40px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	color: var(--lc-left-text);
}

/* ── Field ──────────────────────────────────────────────────── */
.fml-lc-field {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fml-lc-field-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.fml-lc-label {
	font-size: 1rem;
	font-weight: 700;
	color: var(--lc-label-text);
	flex-shrink: 0;
}

/* ── Input box ──────────────────────────────────────────────── */
.fml-lc-input-wrap {
	display: flex;
	align-items: center;
	border: 1.5px solid var(--lc-input-border);
	border-radius: 6px;
	overflow: hidden;
	background: var(--lc-input-bg);
	min-width: 110px;
	max-width: 150px;
}

.fml-lc-input-wrap--unit {
	min-width: 120px;
}

.fml-lc-currency {
	padding: 0 8px;
	font-weight: 700;
	color: var(--lc-input-text);
	font-size: .95rem;
	background: var(--lc-input-bg);
	border-right: 1.5px solid var(--lc-input-border);
	height: 42px;
	display: flex;
	align-items: center;
	user-select: none;
}

.fml-lc-unit {
	padding: 0 8px;
	font-size: .85rem;
	color: var(--lc-input-text);
	background: var(--lc-input-bg);
	border-left: 1.5px solid var(--lc-input-border);
	height: 42px;
	display: flex;
	align-items: center;
	user-select: none;
	white-space: nowrap;
}

.fml-lc-input {
	border: none;
	outline: none;
	padding: 0 10px;
	font-size: .95rem;
	font-weight: 700;
	color: var(--lc-input-text);
	background: transparent;
	width: 100%;
	height: 42px;
	text-align: center;
	font-family: inherit;
	-moz-appearance: textfield;
}

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

/* ── Slider ─────────────────────────────────────────────────── */
.fml-lc-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 3px;
	outline: none;
	cursor: pointer;
	/* filled portion via JS background gradient */
	background: linear-gradient(
		to right,
		var(--lc-slider-fill) 0%,
		var(--lc-slider-fill) var(--lc-fill-pct, 0%),
		var(--lc-slider-track) var(--lc-fill-pct, 0%),
		var(--lc-slider-track) 100%
	);
}

.fml-lc-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--lc-slider-thumb);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
	transition: transform 0.15s;
}

.fml-lc-slider::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

.fml-lc-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--lc-slider-thumb);
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.fml-lc-range-labels {
	display: flex;
	justify-content: space-between;
	font-size: .78rem;
	color: var(--lc-left-text);
	opacity: 0.6;
	margin-top: -4px;
}

.fml-lc-hint {
	margin: 0;
	font-size: .8rem;
	color: var(--lc-left-text);
	opacity: 0.55;
}

/* ── Right panel ────────────────────────────────────────────── */
.fml-lc-right {
	flex: 0 0 42%;
	background: var(--lc-right-bg);
	color: var(--lc-right-text);
	padding: 36px 32px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.fml-lc-result-top {
	margin-bottom: 20px;
}

.fml-lc-result-heading {
	margin: 0 0 4px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--lc-right-text);
}

.fml-lc-result-amount {
	margin: 0 0 6px;
	font-size: 3.2rem;
	font-weight: 800;
	color: var(--lc-result-amount);
	line-height: 1;
	letter-spacing: -.02em;
}

.fml-lc-result-sub {
	margin: 0;
	font-size: .82rem;
	color: var(--lc-right-text);
	opacity: 0.75;
}

.fml-lc-divider {
	border: none;
	border-top: 1px solid var(--lc-divider);
	margin: 16px 0;
}

.fml-lc-result-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 4px;
}

.fml-lc-result-row-left {
	flex: 1;
}

.fml-lc-result-row-title {
	margin: 0 0 3px;
	font-size: .95rem;
	font-weight: 700;
	color: var(--lc-right-text);
}

.fml-lc-result-row-desc {
	margin: 0;
	font-size: .78rem;
	color: var(--lc-right-text);
	opacity: 0.7;
	line-height: 1.3;
}

.fml-lc-result-row-value {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--lc-right-text);
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── CTA ──────────────────────────────────────────────────── */
.fml-lc-cta {
	margin-top: auto;
	padding-top: 24px;
}

.fml-lc-cta-heading {
	margin: 0 0 4px;
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--lc-right-text);
}

.fml-lc-cta-sub {
	margin: 0 0 14px;
	font-size: .82rem;
	color: var(--lc-right-text);
	opacity: 0.8;
}

.fml-lc-apply-btn {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background: var(--lc-apply-btn-bg);
	color: var(--lc-apply-btn-text);
	text-align: center;
	text-decoration: none;
	font-size: .95rem;
	font-weight: 700;
	border-radius: 8px;
	transition: background 0.2s ease, transform 0.15s ease;
	border: none;
	cursor: pointer;
}

.fml-lc-apply-btn:hover,
.fml-lc-apply-btn:focus {
	background: var(--lc-apply-btn-hover);
	color: var(--lc-apply-btn-text);
	text-decoration: none;
	transform: translateY(-1px);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fml-lc-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.04); }
	100% { transform: scale(1); }
}
.fml-lc-result-amount.fml-updating {
	animation: fml-lc-pop 0.25s ease;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
	.fml-lc-inner {
		flex-direction: column;
	}

	.fml-lc-left,
	.fml-lc-right {
		flex: none;
		width: 100%;
		padding: 28px 24px;
	}

	.fml-lc-result-amount {
		font-size: 2.6rem;
	}

	.fml-lc-field-header {
		flex-wrap: wrap;
	}

	.fml-lc-input-wrap {
		max-width: 100%;
		min-width: 0;
		flex: 1;
	}
}

@media (max-width: 420px) {
	.fml-lc-left,
	.fml-lc-right {
		padding: 22px 18px;
	}

	.fml-lc-result-amount {
		font-size: 2.2rem;
	}
}
