/**
 * Lomito Inversionista - Vitrina de calculadoras.
 *
 * Los paneles son oscuros en las dos modalidades, como la tarjeta del test:
 * por eso los tonos de adentro van fijos y no salen de las variables del tema.
 */

.lmt-vit__fila {
	display: flex;
	gap: 10px;
	height: 500px;
}

.lmt-vit__panel {
	position: relative;
	display: flex;
	flex: 0 0 76px;
	min-width: 0;
	overflow: hidden;
	border-radius: var(--lmt-radius-lg, 24px);
	background:
		radial-gradient(120% 90% at 85% 15%, rgba(110, 231, 183, .10), transparent 60%),
		linear-gradient(160deg, #102a43, #0b1b2b 70%);
	border: 1px solid rgba(255, 255, 255, .06);
	color: #e9f1f5;
	transition: flex-grow .5s cubic-bezier(.2, .7, .2, 1), flex-basis .5s cubic-bezier(.2, .7, .2, 1);
}

.lmt-vit__panel.esta-abierto {
	flex: 1 1 auto;
}

/* La franja cerrada: todo el panel es el boton. */
.lmt-vit__tab {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0 0 26px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.lmt-vit__panel.esta-abierto .lmt-vit__tab {
	pointer-events: none;
	opacity: 0;
}

.lmt-vit__tab:focus-visible {
	outline: 3px solid #6ee7b7;
	outline-offset: -5px;
	border-radius: inherit;
}

.lmt-vit__tab-txt {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--lmt-font-display);
	font-size: 1.12rem;
	font-weight: 800;
	letter-spacing: -.01em;
	white-space: nowrap;
}

.lmt-vit__panel:not(.esta-abierto):hover {
	border-color: rgba(110, 231, 183, .45);
}

/* El panel abierto. */
.lmt-vit__cuerpo {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr);
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	width: 100%;
	min-width: 660px;
	padding: clamp(26px, 3.4vw, 44px);
	animation: lmt-vit-entra .45s ease both;
}

.lmt-vit__cuerpo[hidden] { display: none; }

@keyframes lmt-vit-entra {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.lmt-vit__titulo {
	margin: 0 0 10px;
	font-family: var(--lmt-font-display);
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.02em;
	color: #ffffff;
}

.lmt-vit__desc {
	margin: 0 0 14px;
	font-size: 1rem;
	line-height: 1.55;
	color: #cfdde5;
}

.lmt-vit__ej {
	margin: 0 0 22px;
	padding-left: 12px;
	border-left: 3px solid #6ee7b7;
	font-size: .93rem;
	line-height: 1.5;
	color: #e9f1f5;
}

.lmt-vit__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	background: #6ee7b7;
	color: #06251a !important;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
	transition: transform .16s ease, filter .16s ease;
}

.lmt-vit__cta svg { width: 18px; height: 18px; }
.lmt-vit__cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.lmt-vit__cta:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

.lmt-vit__vista svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 320px;
}

.lmt-vit__nota {
	margin: 16px 0 0;
	font-size: .88rem;
	color: var(--lmt-text-muted);
	text-align: center;
}

.lmt-vit__nota a {
	margin-left: 6px;
	font-weight: 700;
	color: var(--lmt-af-strong, var(--lmt-emerald-700));
}

html[data-lomito-theme="dark"] .lmt-vit__nota a { color: var(--lmt-accent); }

/* Pantallas medianas: la vista previa se mete debajo del texto. */
@media (max-width: 1080px) {
	.lmt-vit__fila { height: 560px; }
	.lmt-vit__cuerpo { grid-template-columns: 1fr; min-width: 420px; align-content: center; }
	.lmt-vit__vista svg { max-height: 200px; }
}

/* Celular: los paneles se apilan y la franja es horizontal. */
@media (max-width: 781px) {
	.lmt-vit__fila {
		flex-direction: column;
		height: auto;
	}

	.lmt-vit__panel {
		flex: none;
		flex-direction: column;
		border-radius: var(--lmt-radius, 16px);
	}

	.lmt-vit__tab {
		position: relative;
		inset: auto;
		justify-content: space-between;
		align-items: center;
		min-height: 60px;
		padding: 0 20px;
	}

	.lmt-vit__tab::after {
		content: "+";
		font-size: 1.5rem;
		font-weight: 400;
		color: #6ee7b7;
	}

	.lmt-vit__tab-txt {
		writing-mode: horizontal-tb;
		transform: none;
		font-size: 1.05rem;
	}

	.lmt-vit__panel.esta-abierto .lmt-vit__tab { display: none; }

	.lmt-vit__cuerpo {
		min-width: 0;
		padding: 24px 20px 22px;
		gap: 18px;
	}

	.lmt-vit__vista svg { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
	.lmt-vit__panel { transition: none; }
	.lmt-vit__cuerpo { animation: none; }
}

/* Tabletas de 782 a 900 px: franjas cerradas mas angostas para que el panel abierto
   tenga al menos los 420 px que pide su contenido y no se corte el texto. */
@media (min-width: 782px) and (max-width: 900px) {
	.lmt-vit__fila { gap: 8px; }
	.lmt-vit__panel { flex-basis: 56px; }
	.lmt-vit__panel.esta-abierto { flex: 1 1 auto; }
}


/* Bloque 2 (2.96.0): ejemplo y nota a tamano legible; enlace de 44 px. */
.lmt-vit__ej { font-size: 1rem; }
.lmt-vit__nota { font-size: .95rem; line-height: 1.6; }
.lmt-vit__nota a { display: inline-block; padding: 10px 0; }


/* 2.96.7: cinco tarjetas; en celular, carrusel de una por pantalla con puntos. */
.lmt-vit__puntos { display: none; }

@media (max-width: 781px) {
	.lmt-vit__fila {
		flex-direction: row;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 2px 0 6px;
	}
	.lmt-vit__fila::-webkit-scrollbar { display: none; }

	.lmt-vit__panel,
	.lmt-vit__panel.esta-abierto {
		flex: 0 0 100%;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	/* En el carrusel todas las tarjetas van abiertas: la franja con el + sobra. */
	.lmt-vit__tab { display: none; }
	.lmt-vit__cuerpo,
	.lmt-vit__cuerpo[hidden] { display: grid; animation: none; }

	.lmt-vit__puntos {
		display: flex;
		justify-content: center;
		gap: 6px;
		margin-top: 10px;
	}

	.lmt-vit__punto {
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: none;
		cursor: pointer;
		position: relative;
	}

	.lmt-vit__punto::before {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 8px;
		height: 8px;
		border-radius: 999px;
		background: var(--lmt-border);
		transform: translate(-50%, -50%);
		transition: width .2s ease, background .2s ease;
	}

	.lmt-vit__punto.esta-activo::before {
		width: 22px;
		background: var(--lmt-accent);
	}

	.lmt-vit__punto:focus-visible { outline: 3px solid var(--lmt-accent); outline-offset: -8px; border-radius: 999px; }
}
