/* Loan Calculator - Front-end styles */

.lc-calculator {
	max-width: 720px;
	margin: 1.5em auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
	font-size: 15px;
	color: #1a1a1a;
	box-sizing: border-box;
}

.lc-calculator *,
.lc-calculator *::before,
.lc-calculator *::after {
	box-sizing: inherit;
}

/* Input section */
.lc-inputs {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 1.5rem 1.5rem 1.25rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lc-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-bottom: 1.25rem;
}

.lc-row:last-of-type {
	margin-bottom: 0;
}

.lc-field-full {
	grid-column: 1 / -1;
}

.lc-label {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-bottom: 0.5em;
	font-weight: 600;
	color: #333;
}

.lc-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1em;
	height: 1.1em;
	font-size: 0.85em;
	font-style: italic;
	font-weight: 700;
	color: #666;
	background: #eee;
	border-radius: 50%;
	cursor: help;
}

.lc-info:hover {
	background: #e0e0e0;
	color: #333;
}

.lc-input-wrap {
	display: flex;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.lc-currency-wrap .lc-currency-symbol,
.lc-term-wrap .lc-term-suffix {
	padding: 0.5rem 0.65rem;
	background: #f5f5f5;
	color: #555;
	font-weight: 500;
	border-right: 1px solid #ddd;
}

.lc-term-wrap .lc-term-suffix {
	border-right: none;
	border-left: 1px solid #ddd;
}

.lc-input {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: none;
	font-size: 1em;
	color: #1a1a1a;
	background: transparent;
}

.lc-input:focus {
	outline: none;
}

.lc-input.lc-readonly {
	background: #f9f9f9;
	color: #555;
	cursor: default;
}

.lc-term-wrap .lc-input {
	text-align: center;
}

/* Sliders */
.lc-slider {
	display: block;
	width: 100%;
	height: 8px;
	margin-top: 0.6rem;
	-webkit-appearance: none;
	appearance: none;
	background: linear-gradient(to right, #2c5282, #4299e1);
	border-radius: 4px;
}

/* WebKit: thumb runs full track length */
.lc-slider::-webkit-slider-runnable-track {
	width: 100%;
	height: 8px;
	background: linear-gradient(to right, #2c5282, #4299e1);
	border-radius: 4px;
}

.lc-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	margin-top: -6px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #2c5282;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Firefox: thumb runs full track length */
.lc-slider::-moz-range-track {
	width: 100%;
	height: 8px;
	background: linear-gradient(to right, #2c5282, #4299e1);
	border-radius: 4px;
}

.lc-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #2c5282;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lc-slider-readonly {
	position: relative;
	height: 8px;
	background: linear-gradient(to right, #2c5282, #4299e1);
	cursor: default;
	border-radius: 4px;
}

.lc-rate-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 4px 0 0 4px;
	transition: width 0.2s ease;
}

/* Results panel */
.lc-results {
	background: linear-gradient(135deg, #e8f4fc 0%, #d6ebf7 100%);
	border: 1px solid #b8d9ed;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lc-result-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	gap: 1rem;
}

.lc-result-row:not(:last-child) {
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.lc-result-label {
	font-weight: 500;
	color: #333;
}

.lc-result-value {
	font-weight: 700;
	color: #1a365d;
	white-space: nowrap;
}

/* Responsive */
@media (max-width: 560px) {
	.lc-row {
		grid-template-columns: 1fr;
	}

	.lc-inputs,
	.lc-results {
		padding: 1rem;
	}
}
