/*
 * Calculador de crédito: solo la mecánica (disposición mínima y estados neutros).
 * Colores, tipografías y tamaños los pone el tema con las clases del contrato.
 * Todo va dentro de :where() para que el tema lo pise sin pelear por la especificidad.
 */
:where(.cen-calc) {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

:where(.cen-calc__entradas) {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

:where(.cen-calc__campo) {
	display: grid;
	gap: .4rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

:where(.cen-calc legend) {
	padding: 0;
	margin-bottom: .4rem;
}

:where(.cen-calc__control) {
	display: flex;
	align-items: center;
	gap: .35rem;
	min-width: 0;
}

:where(.cen-calc__input) {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	font: inherit;
}

:where(.cen-calc__rango) {
	display: flex;
	align-items: center;
	gap: .75rem;
	min-width: 0;
}

/* La etiqueta del deslizador queda para los lectores de pantalla; el valor se ve al lado. */
:where(.cen-calc__etiqueta-rango) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:where(.cen-calc__deslizador) {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	accent-color: currentColor;
}

:where(.cen-calc__pct) {
	flex: 0 0 auto;
	min-width: 3.5ch;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

:where(.cen-calc__ayuda) {
	font-size: .875em;
}

:where(.cen-calc__plazos) {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

:where(.cen-calc__plazo) {
	font: inherit;
	cursor: pointer;
	min-height: 44px;
	padding: .5rem .85rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
}

:where(.cen-calc__plazo[aria-pressed="true"]) {
	font-weight: 700;
	box-shadow: inset 0 0 0 2px currentColor;
}

:where(.cen-calc__plazo:focus-visible, .cen-calc__input:focus-visible, .cen-calc__deslizador:focus-visible, .cen-calc__cta:focus-visible) {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

:where(.cen-calc__resultado) {
	display: grid;
	gap: .75rem;
	min-width: 0;
}

:where(.cen-calc__cuota) {
	display: grid;
	gap: .15rem;
	margin: 0;
}

:where(.cen-calc__cuota-monto, .cen-calc__detalle dd, .cen-calc__precio) {
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

:where(.cen-calc__detalle) {
	display: grid;
	gap: .5rem;
	margin: 0;
}

:where(.cen-calc__dato) {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .25rem 1rem;
}

:where(.cen-calc__detalle dt, .cen-calc__detalle dd) {
	margin: 0;
}

:where(.cen-calc__leyenda) {
	margin: 0;
	font-size: .8em;
}

:where(.cen-calc__cta) {
	justify-self: start;
}

/* En escritorio, entradas y resultado lado a lado (salvo en la variante compacta). */
@media (min-width: 760px) {
	:where(.cen-calc:not(.cen-calc--compacto)) {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		align-items: start;
	}

	:where(.cen-calc:not(.cen-calc--compacto)) > :where(.cen-calc__leyenda, .cen-calc__cta) {
		grid-column: 1 / -1;
	}
}

/* Que el formulario no quede tapado por el encabezado fijo al bajar con «Pedir preaprobación». */
:where(form[data-cen-form]) {
	scroll-margin-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
	:where(.cen-calc *) {
		transition: none !important;
	}
}


/* «¿Qué autos te alcanzan?» (9/11) */
.cen-pres__autos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.cen-pres__auto { display: grid; gap: .15rem; padding: .5rem .5rem .7rem; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .03); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.cen-pres__auto:hover { border-color: rgba(237, 51, 56, .55); background: rgba(237, 51, 56, .06); }
.cen-pres__auto img { width: 100%; aspect-ratio: 4 / 3; margin-bottom: .35rem; border-radius: 8px; object-fit: cover; background: #1f1f23; }
.cen-pres__nombre { overflow: hidden; font-size: .88rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cen-pres__datos { color: var(--cen-suave, #a1a1aa); font-size: .78rem; }
.cen-pres__precio { color: var(--cen-rojo, #ed3338); font-size: .95rem; }
.cen-pres__vacio { margin: 1rem 0 0; color: var(--cen-claro, #d4d4d8); font-size: .9rem; }
.cen-pres__acciones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.cen-pres__acciones .cen-btn { flex: 1 1 200px; justify-content: center; }
@media (min-width: 640px) { .cen-pres__autos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cen-pres__autos, .cen-pres__vacio, .cen-pres__acciones { grid-column: 1 / -1; }
@media (min-width: 960px) { .cen-pres__autos { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cen-pres__acciones .cen-btn { flex: 0 1 auto; } }
