/* Selector de metros, carrito y Mi cuenta · usa los colores globales de Elementor del sitio. */
.fbm, .fbm-caja-bono, .fbm-mi-bono {
	--fbm-acento: var(--e-global-color-accent, #B48F4E);
	--fbm-acento-claro: var(--e-global-color-secondary, #DAB777);
	--fbm-texto: #FFFFFF;
	--fbm-caja: var(--e-global-color-3a937f4, #313131);
	--fbm-hundido: var(--e-global-color-1529190, #1A1A1A);
	--fbm-borde: rgba(255, 255, 255, 0.14);
	--fbm-suave: rgba(255, 255, 255, 0.72);
	--fbm-error: #ff8a80;
	--fbm-aviso: #f0b46e;
	--fbm-ok: #7cc48a;
	color: var(--fbm-texto);
	font-size: 15px;
	line-height: 1.5;
}
.fbm *, .fbm *::before, .fbm *::after,
.fbm-caja-bono *, .fbm-mi-bono * { box-sizing: border-box; }
.fbm p, .fbm-caja-bono p, .fbm-mi-bono p { margin: 0; }

.fbm { display: flex; flex-direction: column; gap: 24px; width: 100%; font-size: 16px; }
.fbm .fbm-titulo {
	margin: 0;
	color: var(--fbm-texto);
	font-family: var(--e-global-typography-primary-font-family, "Poppins"), sans-serif;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
}
.fbm-bloque { display: flex; flex-direction: column; gap: 12px; }
.fbm-etiqueta { font-size: 16px; font-weight: 600; color: var(--fbm-texto); }

/* Cajas: mismo gris que «Instrucciones de archivo» */
.fbm-bono, .fbm-pack, .fbm-resumen, .fbm-linea, .fbm-caja-bono, .fbm-mi-bono .fbm-caja {
	background: var(--fbm-caja);
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 20px;
}

/* Bono (ficha y carrito) */
.fbm-bono, .fbm-caja-bono { border-color: var(--fbm-acento); display: flex; flex-direction: column; gap: 12px; }
.fbm-caja-bono { margin: 0 0 24px; }
.fbm-bono-cabecera { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; font-weight: 600; }
.fbm-bono-cabecera strong { color: var(--fbm-acento-claro); font-size: 23px; }
.fbm-bono-texto { color: var(--fbm-suave); font-size: 15px; }
.fbm-bono-texto strong { color: var(--fbm-texto); }

/* Interruptor sí/no */
.fbm-interruptor, .fbm-caja-bono a.fbm-interruptor {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	align-self: flex-start;
	cursor: pointer;
	color: var(--fbm-texto);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	margin: 0;
}
.fbm-caja-bono a.fbm-interruptor, .fbm-caja-bono a.fbm-interruptor:hover { color: var(--fbm-texto) !important; }
.fbm-interruptor input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.fbm-switch {
	flex: none;
	position: relative;
	width: 46px;
	height: 26px;
	border-radius: 26px;
	background: rgba(255, 255, 255, 0.25);
	transition: background .2s;
}
.fbm-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}
.fbm-interruptor input:checked + .fbm-switch,
.fbm-interruptor[aria-checked="true"] .fbm-switch { background: var(--fbm-acento); }
.fbm-interruptor input:checked + .fbm-switch::after,
.fbm-interruptor[aria-checked="true"] .fbm-switch::after { transform: translateX(20px); }
.fbm-interruptor input:focus-visible + .fbm-switch,
a.fbm-interruptor:focus-visible .fbm-switch { outline: 2px solid var(--fbm-acento-claro); outline-offset: 2px; }

.fbm-pack { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fbm-pack strong { color: var(--fbm-acento-claro); }

/* Filas de archivo */
.fbm-lineas { display: flex; flex-direction: column; gap: 16px; }
.fbm-linea {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px 20px;
	align-items: end;
}
.fbm-linea.fbm-con-error { border-color: var(--fbm-error); }
.fbm-archivo { min-width: 0; }
.fbm .fbm-elegir {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	min-width: 0;
	line-height: 1.3;
	background: var(--fbm-hundido);
	border: 1px dashed var(--fbm-acento);
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0;
	transition: border-color .2s, background .2s;
}
.fbm .fbm-elegir:hover, .fbm .fbm-elegir.fbm-encima { border-color: var(--fbm-acento-claro); background: rgba(218, 183, 119, .08); }
.fbm-subido .fbm-elegir { border-style: solid; border-color: var(--fbm-borde); }
/* El input nativo no se ve nunca: el tema le da estilo de botón. */
.fbm .fbm-elegir input[type="file"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	opacity: 0 !important;
	white-space: nowrap !important;
}
/* Un snippet antiguo de la web (del formulario de Piotnet) envuelve los input file de
   .dtf-form-dark con su propio botón «Seleccionar archivo» y una «×»: aquí sobran. */
.fbm .dtf-file { display: contents; }
.fbm .dtf-file > :not(input) { display: none !important; }
.fbm .fbm-elegir:focus-within { outline: 2px solid var(--fbm-acento-claro); outline-offset: 2px; }
.fbm-icono {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: var(--fbm-acento);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}
.fbm-subido .fbm-icono { background: var(--fbm-ok); }
.fbm-con-error .fbm-icono { background: var(--fbm-error); }
.fbm-elegir-textos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fbm-nombre { font-weight: 600; color: var(--fbm-texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbm-ayuda { font-size: 13px; color: var(--fbm-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbm-barra { height: 4px; border-radius: 4px; background: var(--fbm-hundido); margin-top: 8px; overflow: hidden; }
.fbm-barra span { display: block; height: 100%; width: 0; background: var(--fbm-acento); transition: width .2s; }

.fbm-medida { display: flex; align-items: flex-end; gap: 6px; }
.fbm .fbm-campo { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; line-height: 1.2; color: var(--fbm-suave); }
.fbm .fbm-campo input {
	width: 96px;
	text-align: center;
	background: var(--fbm-hundido);
	color: var(--fbm-texto);
	border: 1px solid var(--fbm-borde);
	border-radius: 8px;
	padding: 10px 8px;
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	margin: 0;
}
.fbm .fbm-campo input:focus { outline: 2px solid var(--fbm-acento); outline-offset: 1px; border-color: var(--fbm-acento); }
.fbm-coma { padding-bottom: 12px; color: var(--fbm-suave); }
.fbm-linea-pie { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--fbm-suave); border-top: 1px solid var(--fbm-borde); padding-top: 12px; }
.fbm-con-error .fbm-sub { color: var(--fbm-error); }
.fbm .fbm-quitar {
	background: none;
	border: 0;
	padding: 0;
	color: var(--fbm-suave);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
}
.fbm .fbm-quitar:hover, .fbm .fbm-quitar:focus { color: var(--fbm-texto); background: none; }
.fbm .fbm-quitar[hidden], .fbm .fbm-linea-pie[hidden] { display: none; }

.fbm .fbm-boton-secundario {
	align-self: flex-start;
	background: transparent;
	border: 1px solid var(--fbm-acento);
	color: var(--fbm-acento-claro);
	border-radius: 60px;
	padding: 9px 20px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.fbm .fbm-boton-secundario:hover, .fbm .fbm-boton-secundario:focus { background: var(--fbm-acento); color: #fff; }
.fbm .fbm-boton-secundario[hidden] { display: none; }

/* Tramos */
.fbm-tramos { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.fbm-tramo { text-align: center; background: var(--fbm-caja); border: 1px solid transparent; border-radius: 8px; padding: 10px 6px; font-size: 13px; color: var(--fbm-suave); }
.fbm-tramo strong { display: block; font-size: 17px; color: var(--fbm-texto); }
.fbm-tramo-actual { border-color: var(--fbm-acento-claro); }
.fbm-tramo-actual strong { color: var(--fbm-acento-claro); }
.fbm-siguiente-tramo { font-size: 14px; color: var(--fbm-acento-claro); min-height: 20px; }

/* Resumen */
.fbm-resumen { display: flex; flex-direction: column; gap: 6px; }
.fbm-fila { display: flex; justify-content: space-between; gap: 12px; }
.fbm-fila > span:first-child { color: var(--fbm-suave); }
.fbm-fila-bono, .fbm-fila-bono > span:first-child { color: var(--fbm-acento-claro); }
.fbm-fila-total { border-top: 1px solid var(--fbm-borde); margin-top: 8px; padding-top: 12px; font-weight: 600; font-size: 21px; color: var(--fbm-acento-claro); }
.fbm-fila-total > span:first-child { color: var(--fbm-texto); }
.fbm-aviso { color: var(--fbm-aviso); font-size: 14px; margin-top: 6px !important; }

.fbm-errores { color: var(--fbm-error); font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.fbm-errores:empty { display: none; }

.fbm-final { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fbm-falta { font-size: 14px; color: var(--fbm-suave); }
.fbm .fbm-boton {
	background: var(--fbm-acento);
	color: #fff;
	border: 0;
	border-radius: 60px;
	padding: 14px 32px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.fbm .fbm-boton:hover, .fbm .fbm-boton:focus { background: var(--fbm-acento); color: #fff; filter: brightness(1.08); }
.fbm .fbm-boton:disabled { opacity: .4; cursor: not-allowed; filter: none; }

@media (max-width: 600px) {
	.fbm { gap: 20px; }
	.fbm .fbm-titulo { font-size: 22px; }
	.fbm-bono, .fbm-pack, .fbm-resumen, .fbm-linea, .fbm-caja-bono, .fbm-mi-bono .fbm-caja { padding: 16px; }
	.fbm-linea { grid-template-columns: 1fr; }
	.fbm .fbm-campo input { width: 100%; }
	.fbm-medida .fbm-campo { flex: 1; }
	.fbm .fbm-boton { width: 100%; }
	.fbm-final { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Mi cuenta → Mi bono */
.fbm-mi-bono { display: flex; flex-direction: column; gap: 24px; }
.fbm-mi-bono .fbm-caja { display: flex; flex-direction: column; gap: 8px; }
/* El widget de Mi cuenta de Elementor da márgenes grandes a los títulos. */
.fbm-mi-bono .fbm-caja-titulo { margin: 0 0 8px !important; padding: 0 !important; color: var(--fbm-texto); font-size: 20px; font-weight: 600; line-height: 1.2; }
.fbm-mi-bono .fbm-caja-saldo { border-color: var(--fbm-acento); }
.fbm-mi-bono .fbm-saldo-etiqueta { color: var(--fbm-suave); }
.fbm-mi-bono .fbm-saldo-grande { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--fbm-acento-claro); }
.fbm-mi-bono .fbm-suave { color: var(--fbm-suave); font-size: 14px; }
.fbm-mi-bono .fbm-gastar { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--fbm-borde); }
.fbm-mi-bono a { color: var(--fbm-acento-claro); text-decoration: underline; }
.fbm-mi-bono a:hover { color: var(--fbm-texto); }
.fbm-barra-saldo { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .14); overflow: hidden; margin: 8px 0 2px; }
.fbm-barra-saldo span { display: block; height: 100%; background: linear-gradient(90deg, var(--e-global-color-accent, #B48F4E), var(--e-global-color-secondary, #DAB777)); }
.fbm-mi-bono .fbm-tabla { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; color: var(--fbm-texto); }
.fbm-mi-bono .fbm-tabla th, .fbm-mi-bono .fbm-tabla td { border: 0; border-bottom: 1px solid var(--fbm-borde); background: none; padding: 12px 8px; text-align: left; color: var(--fbm-texto); vertical-align: top; }
.fbm-mi-bono .fbm-tabla th { color: var(--fbm-suave); font-weight: 600; font-size: 13px; padding-top: 0 !important; padding-bottom: 10px !important; }
.fbm-mi-bono .fbm-tabla tbody tr:last-child td { border-bottom: 0; }
.fbm-mi-bono .fbm-tabla tbody tr:hover > td, .fbm-mi-bono .fbm-tabla tbody tr:nth-child(odd) > td { background: none; }
.fbm-mi-bono .fbm-tabla .fbm-num { text-align: right; white-space: nowrap; font-weight: 600; }
.fbm-mi-bono .fbm-tabla td.fbm-mas { color: var(--fbm-ok) !important; }
.fbm-mi-bono .fbm-tabla td.fbm-menos { color: var(--fbm-error) !important; }
@media (max-width: 600px) {
	.fbm-mi-bono .fbm-tabla thead { display: none; }
	.fbm-mi-bono .fbm-tabla tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--fbm-borde); }
	.fbm-mi-bono .fbm-tabla td { border: 0; padding: 2px 0; }
	.fbm-mi-bono .fbm-tabla td[data-title="Fecha"] { grid-column: 1 / -1; color: var(--fbm-suave); font-size: 12px; }
	.fbm-mi-bono .fbm-tabla td[data-title="Concepto"] { grid-column: 1; grid-row: 2; }
	.fbm-mi-bono .fbm-tabla td[data-title="Metros"] { grid-column: 2; grid-row: 2; }
	.fbm-mi-bono .fbm-tabla td[data-title="Bono"] { grid-column: 1 / -1; grid-row: 3; color: var(--fbm-suave); font-size: 12px; }
	.fbm-mi-bono .fbm-tabla tbody tr:last-child { border-bottom: 0; }
}

/* Ficha de un bono de saldo */
.fbm-lista { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--fbm-suave); }
.fbm .fbm-suave { color: var(--fbm-suave); font-size: 14px; }
.fbm-bono a { color: var(--fbm-acento-claro); text-decoration: underline; }
