/* Simulador hipotecario — hereda la tipografía del tema */
.simhip {
	--simhip-color: #1f3a5f;
	--simhip-text: #1d2430;
	--simhip-muted: #6b7380;
	--simhip-border: #d9dde3;
	--simhip-bg: #ffffff;
	--simhip-soft: #f5f7fa;
	--simhip-radius: 10px;

	box-sizing: border-box;
	max-width: 760px;
	margin: 1.5em 0;
	padding: 28px;
	background: var(--simhip-bg);
	border: 1px solid var(--simhip-border);
	border-radius: calc(var(--simhip-radius) + 4px);
	color: var(--simhip-text);
	font-size: 15px;
	line-height: 1.45;
}
.simhip *, .simhip *::before, .simhip *::after { box-sizing: border-box; }

.simhip__title { margin: 0 0 4px; font-size: 1.35em; color: var(--simhip-color); }
.simhip__hint { margin: 0 0 20px; color: var(--simhip-muted); font-size: .9em; }

.simhip__grid { display: grid; gap: 14px; }

.simhip__row {
	display: grid;
	grid-template-columns: 190px 1fr 160px;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border-radius: var(--simhip-radius);
	transition: background-color .4s ease;
}
.simhip__row.is-result { animation: simhip-flash 1.2s ease; }
@keyframes simhip-flash {
	0%   { background: color-mix(in srgb, var(--simhip-color) 14%, transparent); }
	100% { background: transparent; }
}
.simhip__row--cuota { background: var(--simhip-soft); }

.simhip__label { font-weight: 600; font-size: .95em; }

.simhip__control--split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }

.simhip__input {
	display: flex;
	align-items: center;
	border: 1px solid var(--simhip-border);
	border-radius: var(--simhip-radius);
	background: #fff;
	overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.simhip__input:focus-within {
	border-color: var(--simhip-color);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--simhip-color) 18%, transparent);
}
.simhip .simhip__input input {
	flex: 1;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font: inherit;
	font-variant-numeric: tabular-nums;
	color: var(--simhip-text);
	text-align: right;
	outline: none;
}
.simhip__input span {
	padding: 0 12px 0 2px;
	color: var(--simhip-muted);
	font-size: .85em;
	white-space: nowrap;
}

.simhip__radios { display: flex; gap: 14px; flex-wrap: wrap; }
.simhip__radios label { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; font-size: .95em; }
.simhip__radios input { accent-color: var(--simhip-color); margin: 0; }

.simhip .simhip__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--simhip-color);
	border-radius: var(--simhip-radius);
	background: #fff;
	color: var(--simhip-color);
	font: inherit;
	font-size: .9em;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.simhip .simhip__btn:hover,
.simhip .simhip__btn:focus-visible { background: var(--simhip-color); color: #fff; }
.simhip .simhip__btn--primary { background: var(--simhip-color); color: #fff; }
.simhip .simhip__btn--primary:hover { filter: brightness(1.12); }
.simhip .simhip__btn--ghost { width: auto; border-color: var(--simhip-border); color: var(--simhip-muted); background: transparent; }
.simhip .simhip__btn--ghost:hover { background: var(--simhip-soft); color: var(--simhip-text); }

.simhip__actions { display: flex; justify-content: flex-end; margin-top: 12px; }

.simhip__msg {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-left: 3px solid #c0392b;
	background: #fdf1ef;
	border-radius: 6px;
	color: #8e2b20;
	font-size: .9em;
}

.simhip__variable,
.simhip__summary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 18px;
}
.simhip__variable[hidden], .simhip__summary[hidden], .simhip__msg[hidden] { display: none; }

.simhip__limit,
.simhip__summary > div {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border: 1px solid var(--simhip-border);
	border-radius: var(--simhip-radius);
}
.simhip__limit-label,
.simhip__summary span { font-size: .85em; color: var(--simhip-muted); }
.simhip__limit-label em { font-style: normal; white-space: nowrap; }
.simhip__limit strong,
.simhip__summary strong { font-size: 1.25em; font-variant-numeric: tabular-nums; color: var(--simhip-text); }

.simhip__disclaimer { margin: 18px 0 0; font-size: .78em; color: var(--simhip-muted); }

@media (max-width: 640px) {
	.simhip { padding: 18px; }
	.simhip__row { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
	.simhip__variable, .simhip__summary { grid-template-columns: 1fr; }
}
