/* ==========================================================================
   Tenerys Calculadoras — estilos del wizard.
   Todo bajo el prefijo .tcalc para no interferir con el tema.

   Tokens:
     amarillo tarjeta  #F9B233
     azul marino       #1E2C4A   (hover botones #2A3C63)
     gris borde inputs #E3E6EC
     error             #D70006
     whatsapp          #25D366
   Tipografías del tema (ya cargadas): "Sora" (títulos), "Roboto" (textos).
   ========================================================================== */

.tcalc *,
.tcalc *::before,
.tcalc *::after {
	box-sizing: border-box;
}

/* El atributo hidden gobierna todo el wizard (pasos, botones, resultado).
   !important justificado: algunos temas redefinen display de fieldset/button
   y romperían la navegación si ganaran a la regla [hidden] del navegador. */
.tcalc [hidden] {
	display: none !important;
}

.tcalc {
	color: #1e2c4a;
	font-family: "Roboto", sans-serif;
	margin: 0 auto;
}

.tcalc-titulo {
	color: #1e2c4a;
	font-family: "Sora", sans-serif;
	font-weight: 600;
	margin: 0 0 18px;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Tarjeta
   -------------------------------------------------------------------------- */

.tcalc-card {
	background: #f9b233;
	border: 0;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(30, 44, 74, 0.12);
	margin: 0 auto;
	max-width: 520px;
	padding: 28px;
}

.tcalc--full .tcalc-card {
	max-width: none;
}

.tcalc-card.is-cargando {
	cursor: progress;
}

.tcalc-card.is-cargando .tcalc-pasos {
	opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Pasos y preguntas
   -------------------------------------------------------------------------- */

.tcalc-paso {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

/* El foco al fieldset es programático (tabindex=-1): sin anillo visual. */
.tcalc-paso:focus,
.tcalc-resultado:focus {
	outline: none;
}

.tcalc-pregunta {
	color: #1e2c4a;
	display: block;
	float: none;
	font-family: "Sora", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 16px;
	padding: 0;
	width: 100%;
}

.tcalc-opcional {
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	opacity: 0.75;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Opciones tipo píldora (radios estilizados)
   -------------------------------------------------------------------------- */

.tcalc-opciones {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tcalc-opcion {
	cursor: pointer;
	margin: 0;
	position: relative;
}

/* Radio visualmente oculto pero operable con teclado (patrón clip accesible;
   nunca display:none). !important justificado: los temas suelen estilar
   input[type="radio"] con appearance/márgenes y desmontarían el patrón. */
.tcalc-opcion input[type="radio"] {
	border: 0 !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	white-space: nowrap !important;
	width: 1px !important;
}

.tcalc-opcion span {
	background: #fff;
	border: 2px solid transparent;
	border-radius: 10px;
	color: #1e2c4a;
	display: inline-block;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	padding: 12px 18px;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	-webkit-user-select: none;
	user-select: none;
}

.tcalc-opcion:hover span {
	border-color: #1e2c4a;
}

.tcalc-opcion input[type="radio"]:checked + span {
	background: #1e2c4a;
	border-color: #1e2c4a;
	color: #fff;
}

/* Foco accesible sobre fondo amarillo. */
.tcalc-opcion input[type="radio"]:focus-visible + span {
	outline: 2px solid #1e2c4a;
	outline-offset: 2px;
}

.tcalc-opciones--compactas .tcalc-opcion span {
	min-width: 52px;
	padding: 12px 10px;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Campos: importe, select y texto libre
   -------------------------------------------------------------------------- */

.tcalc-campo-importe {
	align-items: center;
	display: flex;
	gap: 10px;
}

.tcalc-campo-importe input,
.tcalc-select,
.tcalc-input {
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1px solid #e3e6ec;
	border-radius: 10px;
	color: #1e2c4a;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	line-height: 1.4;
	max-width: 100%;
	padding: 12px 14px;
	width: 100%;
}

.tcalc-campo-importe input {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}

/* Flecha propia para el select (appearance:none la elimina). */
.tcalc-select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231E2C4A' stroke-width='2' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
	background-position: right 14px center;
	background-repeat: no-repeat;
	padding-right: 38px;
}

.tcalc-otra {
	margin-top: 10px;
}

.tcalc-euro {
	color: #1e2c4a;
	font-weight: 600;
	white-space: nowrap;
}

.tcalc input[type="text"]:focus-visible,
.tcalc select:focus-visible {
	border-color: #1e2c4a;
	outline: 2px solid #1e2c4a;
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

/* El tema (Kimono) estila button:not(.mfp-close) —especificidad (0,1,1)— con
   fondo de color, uppercase y altura fija. Por eso todos los botones del
   wizard se declaran con prefijo .tcalc (0,2,0 o más) y este reset explícito. */
.tcalc .tcalc-card button,
.tcalc .tcalc-resultado button {
	background-image: none;
	box-shadow: none;
	height: auto;
	letter-spacing: normal;
	min-width: 0;
	text-transform: none;
}

.tcalc .tcalc-btn,
.tcalc .tcalc-siguiente,
.tcalc .tcalc-calcular {
	appearance: none;
	-webkit-appearance: none;
	background: #1e2c4a;
	border: 0;
	border-radius: 10px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	padding: 13px 22px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.tcalc .tcalc-btn:hover,
.tcalc .tcalc-btn:focus,
.tcalc .tcalc-siguiente:hover:not(:disabled),
.tcalc .tcalc-calcular:hover:not(:disabled) {
	background: #2a3c63;
	color: #fff;
	text-decoration: none;
}

.tcalc .tcalc-siguiente:disabled,
.tcalc .tcalc-calcular:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* Variante fantasma para volver atrás. */
.tcalc .tcalc-atras {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-radius: 10px;
	color: #1e2c4a;
	cursor: pointer;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	padding: 13px 10px;
	text-decoration: none;
}

.tcalc .tcalc-atras:hover:not(:disabled) {
	background: transparent;
	color: #1e2c4a;
	text-decoration: underline;
}

/* Variantes de CTA del resultado (declaradas después para ganar al hover base). */
.tcalc .tcalc-btn--secundario {
	background: #fff;
	border: 2px solid #1e2c4a;
	color: #1e2c4a;
	padding: 11px 20px;
}

.tcalc .tcalc-btn--secundario:hover,
.tcalc .tcalc-btn--secundario:focus {
	background: #f4f6fa;
	color: #1e2c4a;
}

.tcalc .tcalc-btn--whatsapp {
	background: #25d366;
	color: #fff;
}

.tcalc .tcalc-btn--whatsapp:hover,
.tcalc .tcalc-btn--whatsapp:focus {
	background: #1fb959;
	color: #fff;
}

.tcalc button:focus-visible,
.tcalc a.tcalc-btn:focus-visible {
	outline: 2px solid #1e2c4a;
	outline-offset: 2px;
}

.tcalc-nav {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 20px;
}

/* Con Atrás oculto (primer paso), Siguiente/Calcular se mantienen a la derecha. */
.tcalc-nav .tcalc-siguiente,
.tcalc-nav .tcalc-calcular {
	margin-left: auto;
}

/* --------------------------------------------------------------------------
   Barra de progreso
   -------------------------------------------------------------------------- */

.tcalc-progreso {
	background: rgba(30, 44, 74, 0.18);
	border-radius: 999px;
	height: 6px;
	margin-bottom: 20px;
	overflow: hidden;
}

.tcalc-progreso-barra {
	background: #1e2c4a;
	border-radius: 999px;
	display: block;
	height: 100%;
	transition: width 0.3s ease;
	width: 0;
}

/* --------------------------------------------------------------------------
   Error y honeypot
   -------------------------------------------------------------------------- */

.tcalc-error {
	background: #fff;
	border: 1px solid #d70006;
	border-radius: 8px;
	color: #d70006;
	font-size: 14px;
	line-height: 1.45;
	margin: 16px 0 0;
	padding: 10px 12px;
}

/* Honeypot fuera de pantalla. !important justificado: no debe hacerse visible
   nunca, gane quien gane en el CSS del tema. */
.tcalc-hp {
	left: -9999px !important;
	position: absolute !important;
}

/* --------------------------------------------------------------------------
   Tooltip (i)
   -------------------------------------------------------------------------- */

.tcalc .tcalc-info {
	align-items: center;
	appearance: none;
	-webkit-appearance: none;
	background: #1e2c4a;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-family: "Roboto", sans-serif;
	font-size: 13px;
	font-style: italic;
	font-weight: 700;
	height: 20px;
	justify-content: center;
	line-height: 1;
	margin-left: 6px;
	padding: 0;
	position: relative;
	vertical-align: middle;
	width: 20px;
}

/* Popover encima del icono. */
.tcalc-info-texto {
	background: #1e2c4a;
	border-radius: 8px;
	bottom: calc(100% + 9px);
	box-shadow: 0 6px 18px rgba(30, 44, 74, 0.25);
	color: #fff;
	display: none;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	font-style: normal;
	font-weight: 400;
	left: 50%;
	line-height: 1.45;
	max-width: 260px;
	padding: 10px 12px;
	position: absolute;
	text-align: left;
	text-transform: none;
	transform: translateX(-50%);
	white-space: normal;
	width: max-content;
	z-index: 20;
}

.tcalc-info-texto::after {
	border: 6px solid transparent;
	border-top-color: #1e2c4a;
	content: "";
	left: 50%;
	position: absolute;
	top: 100%;
	transform: translateX(-50%);
}

.tcalc .tcalc-info:hover .tcalc-info-texto,
.tcalc .tcalc-info:focus-visible .tcalc-info-texto,
.tcalc .tcalc-info.is-abierto .tcalc-info-texto {
	display: block;
}

/* --------------------------------------------------------------------------
   Resultado
   -------------------------------------------------------------------------- */

/* Ahorro mensual y ahorro anual: mismas clases y mismos tamaños a propósito,
   para que ninguna de las dos cifras se lea como secundaria. Se reparten el
   ancho y bajan a una debajo de otra cuando la tarjeta es estrecha. */
.tcalc-res-cifras {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 24px;
	margin-bottom: 16px;
}

/* Solo van en paralelo si de verdad caben las dos cifras enteras; si no, una
   debajo de otra. Repartir a la fuerza partía «208,68 €/año» en dos líneas y
   entonces la de al lado ya no pesaba lo mismo. */
.tcalc-res-cifra {
	flex: 1 1 210px;
	min-width: 0;
}

.tcalc-res-etiqueta {
	color: #1e2c4a;
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 2px;
}

.tcalc-res-importe {
	color: #1e2c4a;
	font-family: "Sora", sans-serif;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.1;
	margin: 0;
	white-space: nowrap;
}

.tcalc-res-sufijo {
	font-size: 19px;
	margin-left: 4px;
}

.tcalc-res-linea {
	color: #1e2c4a;
	font-size: 16px;
	line-height: 1.5;
	margin: 0 0 8px;
}

/* Sin destacado (presupuesto a medida): la primera línea hace de titular. */
.tcalc-res-linea--titulo {
	font-family: "Sora", sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 10px;
}

/* Los tres botones de contacto, en una sola fila y repartiéndose el ancho a
   partes iguales: con flex-wrap quedaban dos arriba y uno suelto debajo. El
   reparto por porcentaje (y no por contenido) mantiene la fila intacta aunque
   se editen los textos desde Ajustes. */
.tcalc-res-ctas {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin-top: 18px;
}

.tcalc-res-ctas .tcalc-btn {
	flex: 1 1 0;
	min-width: 0;
}

.tcalc .tcalc-res-ctas .tcalc-btn {
	font-size: 15px;
	hyphens: auto;
	padding: 12px 8px;
}

.tcalc .tcalc-res-ctas .tcalc-btn--secundario {
	padding: 10px 6px;
}

.tcalc .tcalc-reiniciar {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	color: #1e2c4a;
	cursor: pointer;
	display: inline-block;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	margin-top: 14px;
	padding: 0;
	text-decoration: underline;
}

.tcalc .tcalc-reiniciar:hover {
	background: transparent;
	color: #1e2c4a;
	text-decoration: none;
}

/* Aviso legal fuera de la tarjeta. */
.tcalc-aviso {
	color: #6b7280;
	font-size: 13px;
	line-height: 1.5;
	margin: 10px auto 0;
	max-width: 520px;
	text-align: center;
}

.tcalc--full .tcalc-aviso {
	max-width: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
	/* En una tarjeta estrecha tres botones en fila dejarían textos ilegibles:
	   se apilan a ancho completo, que sigue leyéndose ordenado (el problema
	   que se corrige es el escalón de «dos arriba y uno suelto»). */
	.tcalc-res-ctas {
		flex-wrap: wrap;
	}

	.tcalc-res-ctas .tcalc-btn {
		flex: 1 1 100%;
	}

	.tcalc .tcalc-res-ctas .tcalc-btn {
		font-size: 16px;
		padding: 13px 12px;
	}
}

@media (max-width: 480px) {
	.tcalc-card {
		padding: 20px;
	}

	.tcalc-res-importe {
		font-size: 32px;
	}

	/* El tooltip (i) se leía demasiado pequeño en el móvil. */
	.tcalc-info-texto {
		font-size: 15px;
		max-width: 240px;
	}

	/* Opciones a ancho completo, salvo las compactas (1, 2, 3…). */
	.tcalc-opciones:not(.tcalc-opciones--compactas) .tcalc-opcion {
		flex: 1 1 100%;
	}

	.tcalc-opciones:not(.tcalc-opciones--compactas) .tcalc-opcion span {
		display: block;
		text-align: center;
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Accesibilidad: sin animaciones si el usuario lo pide.
   !important justificado: es un interruptor global de movimiento.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.tcalc *,
	.tcalc *::before,
	.tcalc *::after {
		transition: none !important;
		animation: none !important;
	}
}


.tcalc-res-ctas .tcalc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
