/**
 * Lomito Inversionista - Calculadora de Airbnb y arbitraje.
 * Se apoya en conductor.css (clases lmt-cd-*). Aqui solo lo propio:
 * interruptor de RFC, control deslizante de gastos y veredicto.
 * Solo variables del tema; verde y rojo fuertes por modo (>= 4.5:1).
 */
.lmt-abpage {
	--lmt-ab-fill: 23%;
}

/* Cuatro datos en fila en escritorio */
.lmt-abpage .lmt-cd-esc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .lmt-abpage .lmt-cd-esc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .lmt-abpage .lmt-cd-esc { grid-template-columns: 1fr; } }

.lmt-ab-principal { text-align: left; }
.lmt-ab-principal p { margin: 0; }
.lmt-ab-principal .lmt-cd-resultado__v { margin: 4px 0 10px; }

/* Interruptor de RFC */
.lmt-ab-switch { margin-bottom: 22px; }

.lmt-ab-switch__l {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
	color: var(--lmt-text);
	cursor: pointer;
}

.lmt-ab-switch__l input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.lmt-ab-switch__pista {
	flex: none;
	position: relative;
	width: 50px;
	height: 30px;
	border-radius: 999px;
	background: var(--lmt-border);
	transition: background .2s ease;
}

.lmt-ab-switch__bola {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--lmt-surface);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s ease;
}

.lmt-ab-switch__l input:checked + .lmt-ab-switch__pista { background: var(--lmt-cd-strong); }
.lmt-ab-switch__l input:checked + .lmt-ab-switch__pista .lmt-ab-switch__bola { transform: translateX(20px); }
.lmt-ab-switch__l input:focus-visible + .lmt-ab-switch__pista { outline: 2px solid var(--lmt-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	.lmt-ab-switch__pista, .lmt-ab-switch__bola { transition: none; }
}

/* Control deslizante */
.lmt-ab-rango__cab {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.lmt-ab-rango__cab .lmt-cd-label { margin-bottom: 8px; }

.lmt-ab-rango__v {
	font-size: 1.15rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--lmt-cd-strong);
}

.lmt-ab-rango__i {
	width: 100%;
	height: 28px;
	margin: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.lmt-ab-rango__i::-webkit-slider-runnable-track {
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--lmt-cd-strong) var(--lmt-ab-fill), var(--lmt-border) var(--lmt-ab-fill));
}

.lmt-ab-rango__i::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	margin-top: -8px;
	border: 3px solid var(--lmt-cd-strong);
	border-radius: 50%;
	background: var(--lmt-surface);
}

.lmt-ab-rango__i::-moz-range-track {
	height: 8px;
	border-radius: 999px;
	background: var(--lmt-border);
}

.lmt-ab-rango__i::-moz-range-progress {
	height: 8px;
	border-radius: 999px;
	background: var(--lmt-cd-strong);
}

.lmt-ab-rango__i::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 3px solid var(--lmt-cd-strong);
	border-radius: 50%;
	background: var(--lmt-surface);
}

.lmt-ab-rango__i:focus-visible { outline: 2px solid var(--lmt-accent); outline-offset: 4px; border-radius: 8px; }

/* Veredicto */
.lmt-ab-veredicto {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: .02em;
}

.lmt-ab-veredicto--si { color: var(--lmt-cd-strong); background: var(--lmt-accent-soft); }
.lmt-ab-veredicto--no { color: var(--lmt-cd-down); background: transparent; }

.lmt-ab-error {
	margin: 12px 0 0;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--lmt-cd-down);
}
