/*
 * acstech Conector — ventana del cotizador (desde 1.3.0; diseño nuevo en 1.3.1).
 * Colores y tipografía por variables: un tema los ajusta a su marca en su propia hoja, por ejemplo
 * .acstech-cot { --acstech-cot-acento: #0d3b66; --acstech-cot-total-fondo: #0d3b66; }.
 * Estructura: cabecera fija arriba, cuerpo con scroll y pie fijo abajo con los botones.
 */
.acstech-cot {
	--acstech-cot-acento: #1d4ed8;
	--acstech-cot-acento-hover: #1e40af;
	--acstech-cot-acento-suave: #eff4ff;
	--acstech-cot-acento-texto: #fff;
	--acstech-cot-fondo: #fff;
	--acstech-cot-texto: #111214;
	--acstech-cot-suave: #6b6c70;
	--acstech-cot-borde: #e4e4e2;
	--acstech-cot-zona: #f6f6f5;
	--acstech-cot-total-fondo: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
	--acstech-cot-total-borde: transparent;
	--acstech-cot-total-texto: #fff;
	--acstech-cot-cuota-fondo: #ecfdf3;
	--acstech-cot-cuota-borde: #a7e8c0;
	--acstech-cot-cuota-texto: #047857;
	--acstech-cot-whatsapp: #25d366;
	--acstech-cot-radio: 14px;
	--acstech-cot-fuente: inherit;
	--acstech-cot-fuente-titulo: inherit;

	width: min(600px, calc(100vw - 24px));
	max-height: calc(100dvh - 24px);
	padding: 0;
	border: 0;
	border-radius: var(--acstech-cot-radio);
	background: var(--acstech-cot-fondo);
	color: var(--acstech-cot-texto);
	font-family: var(--acstech-cot-fuente);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.acstech-cot[open] {
	display: flex;
	flex-direction: column;
	animation: acstech-cot-entra 0.22s ease-out;
}

.acstech-cot::backdrop {
	background: rgba(8, 9, 11, 0.6);
	backdrop-filter: blur(3px);
}

@keyframes acstech-cot-entra {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.acstech-cot svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

/* --- Cabecera --------------------------------------------------------------------------- */

.acstech-cot__cabecera {
	flex-shrink: 0;
	padding: 18px 22px 14px;
	border-bottom: 1px solid var(--acstech-cot-borde);
	background: var(--acstech-cot-fondo);
}

.acstech-cot__cabecera-fila {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.acstech-cot__eyebrow {
	display: block;
	color: var(--acstech-cot-suave);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.acstech-cot__titulo {
	margin: 4px 0 0;
	font-family: var(--acstech-cot-fuente-titulo);
	font-size: 18px;
	line-height: 1.3;
}

.acstech-cot__precio-ref {
	display: inline-block;
	margin-top: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--acstech-cot-zona);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.acstech-cot__cerrar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--acstech-cot-zona);
	color: var(--acstech-cot-texto);
	cursor: pointer;
	transition: background 0.15s;
}

.acstech-cot__cerrar:hover {
	background: var(--acstech-cot-borde);
}

.acstech-cot__pasos {
	display: flex;
	gap: 6px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.acstech-cot__paso {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	padding-top: 8px;
	border-top: 3px solid var(--acstech-cot-borde);
	color: var(--acstech-cot-suave);
	font-size: 12px;
	font-weight: 600;
	transition: border-color 0.2s, color 0.2s;
}

.acstech-cot__paso-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--acstech-cot-zona);
	font-size: 11px;
	font-weight: 700;
}

.acstech-cot__paso-num svg {
	width: 13px;
	height: 13px;
	stroke-width: 2.6;
}

.acstech-cot__paso--actual,
.acstech-cot__paso--hecho {
	border-top-color: var(--acstech-cot-acento);
	color: var(--acstech-cot-texto);
}

.acstech-cot__paso--actual .acstech-cot__paso-num,
.acstech-cot__paso--hecho .acstech-cot__paso-num {
	background: var(--acstech-cot-acento);
	color: var(--acstech-cot-acento-texto);
}

/* --- Cuerpo ----------------------------------------------------------------------------- */

.acstech-cot__cuerpo {
	flex: 1;
	min-height: 0;
	padding: 18px 22px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.acstech-cot__form,
.acstech-cot__resultado {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.acstech-cot__seccion {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.acstech-cot__seccion h3,
.acstech-cot__bloque h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
}

.acstech-cot__ayuda {
	margin: -4px 0 0;
	color: var(--acstech-cot-suave);
	font-size: 13px;
	line-height: 1.45;
}

/* Tarjetas de elección */
.acstech-cot__eleccion {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.acstech-cot__opcion {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border: 1.5px solid var(--acstech-cot-borde);
	border-radius: 12px;
	background: var(--acstech-cot-fondo);
	color: var(--acstech-cot-texto);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.acstech-cot__opcion:hover {
	border-color: var(--acstech-cot-suave);
}

.acstech-cot__opcion[aria-checked='true'] {
	border-color: var(--acstech-cot-acento);
	background: var(--acstech-cot-acento-suave);
	box-shadow: 0 0 0 1px var(--acstech-cot-acento);
}

.acstech-cot__opcion-icono {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--acstech-cot-zona);
	flex-shrink: 0;
}

.acstech-cot__opcion[aria-checked='true'] .acstech-cot__opcion-icono {
	background: var(--acstech-cot-acento);
	color: var(--acstech-cot-acento-texto);
}

.acstech-cot__opcion-textos strong {
	display: block;
	font-size: 14px;
}

.acstech-cot__opcion-textos small {
	display: block;
	margin-top: 2px;
	color: var(--acstech-cot-suave);
	font-size: 12px;
	line-height: 1.3;
}

.acstech-cot__sub {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	border-radius: 12px;
	background: var(--acstech-cot-zona);
}

.acstech-cot__sub[hidden] {
	display: none;
}

/* Chips (plazo y porcentajes de cuota inicial) */
.acstech-cot__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.acstech-cot__chip {
	padding: 7px 12px;
	border: 1.5px solid var(--acstech-cot-borde);
	border-radius: 999px;
	background: var(--acstech-cot-fondo);
	color: var(--acstech-cot-texto);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}

.acstech-cot__chip:hover {
	border-color: var(--acstech-cot-suave);
}

.acstech-cot__chip[aria-pressed='true'] {
	border-color: var(--acstech-cot-acento);
	background: var(--acstech-cot-acento);
	color: var(--acstech-cot-acento-texto);
}

/* Campos */
.acstech-cot__fila {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.acstech-cot__campo {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
}

.acstech-cot__campo small {
	color: var(--acstech-cot-suave);
	font-size: 12px;
	font-weight: 400;
}

.acstech-cot__campo input,
.acstech-cot__campo select {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1.5px solid var(--acstech-cot-borde);
	border-radius: 10px;
	background: var(--acstech-cot-fondo);
	color: var(--acstech-cot-texto);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.acstech-cot__campo input:focus,
.acstech-cot__campo select:focus {
	border-color: var(--acstech-cot-acento);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
	outline: none;
}

.acstech-cot__autoriza {
	display: flex;
	gap: 10px;
	color: var(--acstech-cot-suave);
	font-size: 12px;
	line-height: 1.45;
	cursor: pointer;
}

.acstech-cot__autoriza input {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--acstech-cot-acento);
}

.acstech-cot__error {
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 13px;
	font-weight: 600;
}

/* --- Resultado -------------------------------------------------------------------------- */

.acstech-cot__linea--total-doc {
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1.5px solid var(--acstech-cot-borde);
	font-size: 16px;
}

.acstech-cot__linea--total-doc span {
	color: var(--acstech-cot-texto);
	font-weight: 800;
}

.acstech-cot__linea--total-doc strong {
	font-size: 18px;
}

/* Total del negocio y cuota mensual: una franja al final de su recuadro. */
.acstech-cot__resaltado {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 12px -4px 2px;
	padding: 14px 16px;
	border: 1.5px solid var(--acstech-cot-borde);
	border-radius: 12px;
}

.acstech-cot__resaltado--total {
	border-color: var(--acstech-cot-total-borde);
	background: var(--acstech-cot-total-fondo);
	color: var(--acstech-cot-total-texto);
	box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
}

.acstech-cot__resaltado--cuota {
	border-color: var(--acstech-cot-cuota-borde);
	background: var(--acstech-cot-cuota-fondo);
	color: var(--acstech-cot-cuota-texto);
}

.acstech-cot__resaltado-etiqueta {
	display: block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.acstech-cot__resaltado-detalle {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	opacity: 0.8;
}

.acstech-cot__resaltado-valor {
	font-size: 22px;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.acstech-cot__bloque {
	padding: 14px 16px;
	border: 1px solid var(--acstech-cot-borde);
	border-radius: 12px;
}

.acstech-cot__bloque h3 {
	margin-bottom: 6px;
}

.acstech-cot__linea {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--acstech-cot-zona);
	font-size: 14px;
}

.acstech-cot__linea:last-child {
	border-bottom: 0;
}

.acstech-cot__linea span {
	color: var(--acstech-cot-suave);
}

.acstech-cot__linea strong {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.acstech-cot__linea--destacada span {
	color: var(--acstech-cot-texto);
	font-weight: 600;
}

.acstech-cot__linea--subtotal {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1.5px solid var(--acstech-cot-borde);
}

.acstech-cot__linea--subtotal span {
	color: var(--acstech-cot-texto);
	font-weight: 700;
}

.acstech-cot__promo {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--acstech-cot-suave);
}

.acstech-cot__promo-tag {
	padding: 2px 8px;
	border-radius: 999px;
	background: #fff4e5;
	color: #9a4d00;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.acstech-cot__nota {
	margin: 8px 0 0;
	color: var(--acstech-cot-suave);
	font-size: 12px;
	line-height: 1.45;
}

.acstech-cot__aviso {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--acstech-cot-zona);
	color: var(--acstech-cot-suave);
	font-size: 12px;
	line-height: 1.5;
}

.acstech-cot__aviso-icono {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--acstech-cot-acento);
	color: var(--acstech-cot-acento-texto);
	flex-shrink: 0;
}

.acstech-cot__aviso-icono svg {
	width: 13px;
	height: 13px;
	stroke-width: 2.6;
}

/* --- Pie fijo con los botones ------------------------------------------------------------- */

.acstech-cot__pie {
	display: flex;
	flex-shrink: 0;
	gap: 10px;
	padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--acstech-cot-borde);
	background: var(--acstech-cot-fondo);
	box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.05);
}

.acstech-cot__boton {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 12px 18px;
	border: 1.5px solid var(--acstech-cot-borde);
	border-radius: 12px;
	background: var(--acstech-cot-fondo);
	color: var(--acstech-cot-texto);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}

.acstech-cot__boton:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.acstech-cot__boton:active {
	transform: none;
	box-shadow: none;
}

.acstech-cot__boton--primario {
	border-color: var(--acstech-cot-acento);
	background: var(--acstech-cot-acento);
	color: var(--acstech-cot-acento-texto);
}

.acstech-cot__boton--primario:hover {
	background: var(--acstech-cot-acento-hover);
	box-shadow: 0 8px 18px rgba(29, 78, 216, 0.3);
}

.acstech-cot__boton--whatsapp {
	border-color: var(--acstech-cot-whatsapp);
	background: var(--acstech-cot-whatsapp);
	color: #fff;
}

.acstech-cot__boton--whatsapp:hover {
	box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
}

.acstech-cot__boton--secundario {
	flex: 0 1 auto;
}

.acstech-cot__boton:disabled {
	opacity: 0.7;
	cursor: default;
	transform: none;
	box-shadow: none;
}

.acstech-cot__boton--cargando::before {
	content: '';
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: acstech-cot-gira 0.7s linear infinite;
}

@keyframes acstech-cot-gira {
	to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
	.acstech-cot {
		width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		max-width: 100vw;
		margin: 0;
		border-radius: 0;
	}

	.acstech-cot__cabecera,
	.acstech-cot__cuerpo {
		padding-left: 16px;
		padding-right: 16px;
	}

	.acstech-cot__pie {
		padding-left: 16px;
		padding-right: 16px;
	}

	.acstech-cot__fila {
		grid-template-columns: 1fr;
	}

	.acstech-cot__opcion {
		flex-direction: column;
		align-items: flex-start;
	}

	.acstech-cot__paso > span:last-child {
		display: none;
	}

	.acstech-cot__resaltado-valor {
		font-size: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acstech-cot[open],
	.acstech-cot__boton--cargando::before {
		animation: none;
	}
}
