/* Calculadora de batería y placas (energia): solo lo propio. */

/* ---------- Lista de aparatos ---------- */
.rvh-energia-lista {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--rv-space-2);
}
.rvh-energia-ap {
	display: grid;
	gap: var(--rv-space-2);
	margin: 0;
	padding: var(--rv-space-2) var(--rv-space-3) var(--rv-space-3);
	background: var(--rv-bg-soft);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
}
.rvh-energia-ap::before { content: none; }
.rvh-energia-ap__top {
	display: flex;
	align-items: center;
	gap: var(--rv-space-2);
	min-height: 44px;
}
.rvh-energia-ap__nombre {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	font-size: var(--rv-text-sm);
	color: var(--rv-ink);
	text-wrap: pretty;
}
.rvh .rvh-energia-ap input.rvh-energia-ap__nombre {
	min-height: 44px;
	padding: 0 var(--rv-space-3);
	background: #fff;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	font-size: var(--rv-text-base);
	font-weight: 500;
	box-shadow: none;
}
.rvh .rvh-energia-ap input.rvh-energia-ap__nombre:focus { border-color: var(--rv-ink); box-shadow: 0 0 0 1px var(--rv-ink); outline: none; }
.rvh-energia-ap__wh {
	flex: 0 0 auto;
	font-size: var(--rv-text-xs);
	color: var(--rv-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
/* Botones de icono (nota y quitar): 44 px de área táctil */
.rvh .rvh-energia-ap__icono {
	flex: 0 0 44px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--rv-muted);
	cursor: pointer;
}
.rvh .rvh-energia-ap__icono:last-child { margin-right: -8px; }
.rvh .rvh-energia-ap__icono svg { width: 18px; height: 18px; }
.rvh .rvh-energia-ap__icono[aria-expanded="true"] { background: #fff; color: var(--rv-ink); }
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-energia-ap__icono:hover { background: #fff; color: var(--rv-ink) !important; }
}
.rvh-energia-ap__nota { margin: -4px 0 0; }

/* Vatios · horas · va al inversor (y el error de cada campo debajo, a todo el ancho) */
.rvh-energia-ap__nums {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rv-space-2);
}
.rvh-energia-ap__nums > .rvh-input { flex: 1 1 6rem; min-height: 46px; order: 1; }
.rvh-energia-ap__nums > .rvh-energia-ap__ac { order: 2; }
.rvh-energia-ap__nums > .rvh-err { order: 3; flex: 1 1 100%; }
.rvh .rvh-energia-ap__nums .rvh-input input { padding: 0 var(--rv-space-3); font-size: var(--rv-text-base); }
.rvh-energia-ap__nums .rvh-input__unit { padding-right: var(--rv-space-3); font-size: var(--rv-text-xs); }

/* Interruptor «Va al inversor»: casilla con su texto, marcada = relleno tinta */
.rvh .rvh-energia-ap__ac {
	flex: 1 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--rv-space-2);
	min-height: 46px;
	padding: 0 var(--rv-space-3);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: #fff;
	color: var(--rv-text);
	font-size: var(--rv-text-sm);
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--rv-duration) var(--rv-ease), border-color var(--rv-duration) var(--rv-ease);
}
.rvh-energia-ap__caja {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border: 2px solid #7D8894;
	border-radius: 5px;
	background: #fff;
	color: transparent;
}
.rvh-energia-ap__caja svg { width: 14px; height: 14px; }
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-energia-ap__ac:not([aria-pressed="true"]):hover { border-color: var(--rv-muted); color: var(--rv-ink) !important; }
}
.rvh.rvh.rvh .rvh-energia-ap__ac[aria-pressed="true"],
.rvh.rvh.rvh button.rvh-energia-ap__ac[aria-pressed="true"]:hover {
	background: var(--rv-ink);
	border-color: var(--rv-ink);
	color: #fff !important;
	font-weight: 600;
}
.rvh-energia-ap__ac[aria-pressed="true"] .rvh-energia-ap__caja { border-color: #fff; background: #fff; color: var(--rv-ink); }

.rvh-energia-vacio {
	padding: var(--rv-space-4);
	border: 1px dashed var(--rv-line);
	border-radius: var(--rv-radius);
	text-align: center;
}
.rvh[data-rvh="energia"] .rvh-actions { margin-top: var(--rv-space-1); }

/* Lugar y mes: el lugar pide más ancho; en móvil, uno debajo de otro */
.rvh[data-rvh="energia"] .rvh-energia-lugar { flex: 2 1 14rem; }
.rvh[data-rvh="energia"] .rvh-energia-mes { flex: 1 1 11rem; }
.rvh[data-rvh="energia"] .rvh-row > .rvh-err { flex: 1 1 100%; }

/* Horas de conducción: debajo del segmentado */
.rvh-energia-dch { display: grid; gap: var(--rv-space-2); margin-top: var(--rv-space-2); max-width: 16rem; }

/* ---------- Resultado: batería y placas, lado a lado ---------- */
.rvh[data-rvh="energia"] .rvh-result { gap: var(--rv-space-3); }
.rvh-energia-duo {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--rv-space-4);
}
.rvh-energia-duo__item { display: grid; gap: var(--rv-space-1); align-content: start; min-width: 0; }
.rvh-energia-duo__k { font-size: var(--rv-text-sm); font-weight: 600; color: var(--rv-ink); }
.rvh[data-rvh="energia"] .rvh-energia-duo .rvh-big__num { font-size: clamp(2.25rem, 1.7rem + 2vw, 3.25rem); }
.rvh[data-rvh="energia"] .rvh-energia-duo .rvh-big__unit { font-size: var(--rv-text-lg); }
.rvh[data-rvh="energia"] .rvh-energia-duo .rvh-big__alt { text-wrap: pretty; line-height: 1.35; }
/* «No basta»: texto en vez de cifra, algo más pequeño para que quepa en la columna */
.rvh[data-rvh="energia"] .rvh-energia-duo__item.is-texto .rvh-big__num { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1.1; padding-block: 0.25em; }

/* Cuando la placa no basta: lo que tiene que hacer el motor */
.rvh-energia-motor {
	display: grid;
	gap: var(--rv-space-2);
	padding: var(--rv-space-3) var(--rv-space-4);
	background: #fff;
	border: 1px solid #E9E3D9;
	border-radius: var(--rv-radius);
}
.rvh-energia-motor__t { margin: 0; font-size: var(--rv-text-sm); line-height: 1.45; color: var(--rv-ink); text-wrap: pretty; }
.rvh-energia-motor .rvh-btn { justify-self: start; }

/* Las filas de datos, algo más prietas para que el panel quepa en la pantalla al fijarse */
.rvh[data-rvh="energia"] .rvh-result > .rvh-stats > div { padding-block: 0.55rem; }
.rvh[data-rvh="energia"] .rvh-result__lead { margin: 0; font-size: var(--rv-text-sm); line-height: 1.5; }

@media print {
	.rvh[data-rvh="energia"] .rvh-chips,
	.rvh[data-rvh="energia"] .rvh-actions,
	.rvh-energia-ap__icono { display: none !important; }
}
