/* ─── Loan Calculator Modal ─── */

.loan-calc-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.loan-calc-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.loan-calc-modal {
	background: #fff;
	border-radius: 16px;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 2.5rem;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	transform: translateY(12px);
	transition: transform 0.25s ease;
}

.loan-calc-overlay.is-open .loan-calc-modal {
	transform: translateY(0);
}

.loan-calc-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 36px;
	height: 36px;
	border: none;
	background: #f7f7f7;
	border-radius: 50%;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	color: #444;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.loan-calc-close:hover {
	background: #e0e0e0;
}

.loan-calc-title {
	font-size: 1.5rem;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0 0 0.25rem;
}

.loan-calc-subtitle {
	font-size: 0.9375rem;
	color: #666;
	margin: 0 0 1.75rem;
}

/* ─── Form ─── */

.loan-calc-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.loan-calc-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.loan-calc-field label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #444;
}

.loan-calc-field select,
.loan-calc-field input {
	width: 100%;
	padding: 0.7rem 0.875rem;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-family: inherit;
	color: #1a1a1a;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
}

.loan-calc-field select:focus,
.loan-calc-field input:focus {
	outline: none;
	border-color: #5B2D8E;
	box-shadow: 0 0 0 3px rgba(91, 45, 142, 0.12);
}

.loan-calc-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	padding-right: 2.5rem;
}

.loan-calc-row {
	display: flex;
	gap: 0.75rem;
}

.loan-calc-field--half {
	flex: 1;
}

/* ─── Divider ─── */

.loan-calc-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.25rem 0;
}

.loan-calc-divider::before,
.loan-calc-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e0e0e0;
}

.loan-calc-divider span {
	font-size: 0.75rem;
	color: #999;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

/* ─── Button ─── */

.loan-calc-btn {
	width: 100%;
	padding: 0.8rem;
	border: none;
	border-radius: 50px;
	background: #5B2D8E;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	margin-top: 0.25rem;
}

.loan-calc-btn:hover {
	background: #3F1F63;
	transform: translateY(-1px);
}

.loan-calc-btn:active {
	transform: translateY(0);
}

/* ─── Results ─── */

.loan-calc-result {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
	margin-top: 0;
}

.loan-calc-result.is-visible {
	max-height: 300px;
	opacity: 1;
	margin-top: 0.5rem;
}

.loan-calc-result-main {
	text-align: center;
	padding: 1.5rem;
	background: #F3EDF8;
	border-radius: 12px;
	margin-bottom: 0.75rem;
}

.loan-calc-result-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #5B2D8E;
	margin-bottom: 0.35rem;
}

.loan-calc-result-amount {
	display: block;
	font-size: 2.25rem;
	font-weight: 800;
	color: #1a1a1a;
	line-height: 1;
}

.loan-calc-result-details {
	display: flex;
	gap: 0.75rem;
}

.loan-calc-result-detail {
	flex: 1;
	text-align: center;
	padding: 0.75rem;
	background: #f7f7f7;
	border-radius: 8px;
}

.loan-calc-result-detail span {
	display: block;
	font-size: 0.6875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	margin-bottom: 0.2rem;
}

.loan-calc-result-detail strong {
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a1a;
}

.loan-calc-cta {
	display: block;
	text-align: center;
	margin-top: 1rem;
	padding: 0.75rem;
	background: #5B2D8E;
	color: #fff !important;
	border-radius: 50px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s, transform 0.15s;
}

.loan-calc-cta:hover {
	background: #3F1F63;
	transform: translateY(-1px);
}

.loan-calc-error {
	text-align: center;
	color: #c0392b;
	font-size: 0.875rem;
	font-weight: 500;
	margin: 0;
	padding: 0.75rem;
	background: #fdf0ef;
	border-radius: 8px;
}

/* ─── Disclaimer ─── */

.loan-calc-disclaimer {
	font-size: 0.6875rem;
	color: #999;
	line-height: 1.5;
	margin: 1.25rem 0 0;
	text-align: center;
}

/* ─── Responsive ─── */

@media (max-width: 480px) {
	.loan-calc-modal {
		padding: 1.75rem 1.25rem;
	}

	.loan-calc-row {
		flex-direction: column;
	}

	.loan-calc-result-amount {
		font-size: 1.75rem;
	}
}
