/* Popup CRO de las calculadoras (/calculadoras/{cripto}-{fiat}/) — modal con overlay */

:root {
	--fc-cro-card-bg: #0024BB;
	--fc-cro-cta: #265FF1;
	--fc-cro-cta-hover: #1D4ABE;
	--fc-cro-backdrop: rgba(15, 18, 26, 0.5);
	--fc-cro-font: Poppins, Arial, sans-serif;
}

/* El <dialog> hace de contenedor transparente a pantalla completa; la tarjeta es su hijo.
   Así un clic con target === dialog es un clic en el fondo. */
.fc-cro-popup {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 24px;
	border: 0;
	background: transparent;
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
}

.fc-cro-popup:not([open]) {
	display: none;
}

.fc-cro-popup[open] {
	display: flex;
}

.fc-cro-popup::backdrop {
	background: var(--fc-cro-backdrop);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* Azul plano con un velo oscuro que baja de arriba a abajo (del diseño).
   margin auto en vez de align-items: center para que no se recorte en pantallas bajas. */
.fc-cro-popup__card {
	position: relative;
	width: 512px;
	max-width: 100%;
	margin: auto;
	padding: 0 46px 54px;
	background-color: var(--fc-cro-card-bg);
	background-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
	border-radius: 30px;
	overflow: hidden;
	box-sizing: border-box;
	animation: fc-cro-popup-in 0.28s ease-out both;
}

/* Decoración: logotipo grande en degradado, abajo a la derecha, sangrando por el borde */
.fc-cro-popup__mark {
	position: absolute;
	top: 26.4%;
	left: 44.53%;
	right: -10.35%;
	bottom: 4.39%;
	transform: scaleY(-1);
	pointer-events: none;
}

/* Decoración: halo azul difuso en diagonal */
.fc-cro-popup__glow {
	position: absolute;
	top: 89.6%;
	left: 52.9%;
	width: 190.8%;
	height: 81.1%;
	transform: translate(-50%, -50%) rotate(-25.48deg);
	pointer-events: none;
}

/* Decoración: marca pequeña sobre la ilustración */
.fc-cro-popup__mark-sm {
	position: absolute;
	top: 22.4%;
	left: 42.4%;
	width: 33px;
	height: 36px;
	transform: translate(-50%, -50%) rotate(158.37deg) scaleX(-1);
	pointer-events: none;
}

/* Ilustración superior: sangra por el borde de arriba y replica el recorte del diseño */
.fc-cro-popup__media {
	position: relative;
	width: 356px;
	max-width: 100%;
	height: 247px;
	margin: 0 auto;
	overflow: hidden;
}

.fc-cro-popup__img {
	position: absolute;
	top: -2.54%;
	left: -10.6%;
	width: 110.6%;
	height: 113.73%;
	max-width: none;
	object-fit: contain;
}

.fc-cro-popup__content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 57px;
}

.fc-cro-popup__text {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: #fff;
	text-align: center;
	min-width: 0;
}

.fc-cro-popup__eyebrow {
	margin: 0;
	font-family: var(--fc-cro-font);
	font-size: 20px;
	font-weight: 400;
	line-height: 26px;
	text-transform: uppercase;
}

.fc-cro-popup__title {
	margin: 0;
	font-family: var(--fc-cro-font);
	font-size: 32px;
	font-weight: 800;
	line-height: 38px;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.fc-cro-popup__lead {
	margin: 0;
	font-family: var(--fc-cro-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 22px;
	overflow-wrap: break-word;
}

.fc-cro-popup__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 32px;
	border: 2px solid #fff;
	border-radius: 8px;
	background: var(--fc-cro-cta);
	color: #fff;
	font-family: var(--fc-cro-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.fc-cro-popup__cta:hover,
.fc-cro-popup__cta:focus-visible {
	background: var(--fc-cro-cta-hover);
	color: #fff;
	transform: translateY(-2px);
}

/* Cerrar: no viene en el diseño, se añade para poder cerrar el modal sin depender de ESC */
.fc-cro-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.2);
	color: #fff;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.fc-cro-popup__close:hover,
.fc-cro-popup__close:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, 0.35);
}

.fc-cro-popup__close svg {
	display: block;
}

@keyframes fc-cro-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Móvil: se reduce la ilustración, el titular y el padding; CTA a ancho completo */
@media (max-width: 560px) {
	.fc-cro-popup {
		padding: 16px;
	}

	.fc-cro-popup__card {
		padding: 0 20px 32px;
	}

	.fc-cro-popup__media {
		height: 190px;
	}

	.fc-cro-popup__content {
		margin-top: 32px;
	}

	.fc-cro-popup__eyebrow {
		font-size: 17px;
		line-height: 22px;
	}

	.fc-cro-popup__title {
		font-size: 26px;
		line-height: 32px;
	}

	.fc-cro-popup__lead {
		font-size: 15px;
		line-height: 21px;
	}

	.fc-cro-popup__cta {
		width: 100%;
		padding: 12px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fc-cro-popup__card {
		animation: none;
	}

	.fc-cro-popup__cta {
		transition: none;
	}

	.fc-cro-popup__cta:hover,
	.fc-cro-popup__cta:focus-visible {
		transform: none;
	}
}
