/**
 * Popup "Te llamamos gratis" y su botón flotante.
 *
 * En móvil el botón convive con la barra fija `.rcb-ctamovil`, así que se
 * levanta por encima de ella y se queda en círculo (sin texto): dos barras
 * apiladas a lo ancho comerían demasiada pantalla.
 */

/* ------------------------------------------------------------- Botón flotante */

.rcb-flotante {
	position: fixed;
	right: 16px;
	bottom: calc(72px + env(safe-area-inset-bottom));
	z-index: 92;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 52px;
	height: 52px;
	padding: 0;
	background: var(--rcb-acento-hover);
	color: var(--rcb-blanco);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
	font-family: var(--rcb-font);
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.rcb-flotante:hover,
.rcb-flotante:focus-visible {
	background: var(--rcb-negro);
	transform: translateY(-1px);
}

.rcb-flotante .rcb-icono {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

/* El texto solo cabe en escritorio, donde no hay barra fija debajo. */
.rcb-flotante__texto {
	display: none;
}

@media (min-width: 768px) {

	.rcb-flotante {
		right: 24px;
		bottom: 24px;
		width: auto;
		height: auto;
		padding: 14px 22px;
	}

	.rcb-flotante__texto {
		display: inline;
	}
}

/* ------------------------------------------------------------------- Overlay */

.rcb-popup {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.55);
}

/* `hidden` por sí solo lo pisa el display:flex. */
.rcb-popup[hidden] {
	display: none;
}

body.rcb-popup-abierto {
	overflow: hidden;
}

.rcb-popup__caja {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	padding: 32px 28px;
	overflow-y: auto;
	background: var(--rcb-blanco);
	border-radius: var(--rcb-r-xl);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.rcb-popup__cerrar {
	position: absolute;
	top: 10px;
	right: 12px;
	padding: 6px;
	background: none;
	border: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--rcb-gris-texto);
	cursor: pointer;
	transition: color 0.15s ease;
}

.rcb-popup__cerrar:hover,
.rcb-popup__cerrar:focus-visible {
	color: var(--rcb-negro);
}

.rcb-popup__titulo {
	margin: 0 0 6px;
	font-family: var(--rcb-font);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--rcb-negro);
}

.rcb-popup__sub {
	margin: 0 0 20px;
	font-size: 0.9rem;
	line-height: var(--rcb-lh-texto);
	color: var(--rcb-gris-texto);
}

/* -------------------------------------------------------------------- Campos */

.rcb-campo {
	display: block;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.rcb-campo__etiqueta {
	display: block;
	margin-bottom: 8px;
	padding: 0;
	font-family: var(--rcb-font);
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--rcb-negro);
}

.rcb-campo input[type='tel'],
.rcb-campo input[type='text'] {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	font-size: 0.95rem;
	color: var(--rcb-negro);
	background: var(--rcb-blanco);
	border: 1.5px solid var(--rcb-gris-borde);
	border-radius: var(--rcb-r-l);
	transition: border-color 0.15s ease;
}

.rcb-campo input[type='tel']:focus,
.rcb-campo input[type='text']:focus {
	outline: none;
	border-color: var(--rcb-acento-hover);
}

.rcb-popup__otro {
	margin-top: 10px;
}

.rcb-radio {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	font-size: 0.92rem;
	color: var(--rcb-negro);
	cursor: pointer;
}

.rcb-radio input {
	width: 17px;
	height: 17px;
	accent-color: var(--rcb-acento-hover);
}

/* El honeypot no puede usar `display:none`: hay bots que lo detectan y lo
   saltan. Se saca de la pantalla. */
.rcb-popup__trampa {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Turnstile. Con `appearance: interaction-only` el widget no se pinta salvo que
   haga falta interacción, así que el hueco solo aparece cuando hay algo dentro. */
.rcb-popup__turnstile:not(:empty) {
	margin: 0 0 14px;
}

.rcb-popup__error {
	margin: 0 0 12px;
	font-size: 0.86rem;
	font-weight: 600;
	color: #c62828;
}

.rcb-popup__enviar {
	display: block;
	width: 100%;
	text-align: center;
}

.rcb-popup__enviar[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.rcb-popup__nota {
	margin: 12px 0 0;
	font-size: 0.76rem;
	text-align: center;
	color: var(--rcb-gris-texto);
}

/* --------------------------------------------------------------------- Éxito */

.rcb-popup__exito {
	padding: 12px 0;
	text-align: center;
}

.rcb-popup__exito[hidden] {
	display: none;
}

.rcb-popup__check {
	display: block;
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	color: var(--rcb-acento-hover);
}

.rcb-popup__exito .rcb-popup__sub {
	margin-bottom: 22px;
}

.rcb-popup__cerrar2 {
	display: block;
	width: 100%;
	text-align: center;
}
