/* Componente: popup CRO de /{pais}/comprar-{cripto}/ — modal con overlay */

:root {
	--ft-cro-comprar-panel: #265FF1;
	--ft-cro-comprar-cta: var(--Light-Primary-10, #000D59);
	--ft-cro-comprar-cta-hover: #0A1D7A;
	--ft-cro-comprar-card-bg: var(--Light-Lightness-0, #fff);
	--ft-cro-comprar-close: #ADADAD;
	--ft-cro-comprar-close-hover: #1F2A37;
	--ft-cro-comprar-backdrop: rgba(15, 18, 26, 0.5);
	--ft-cro-comprar-font-title: Poppins, Arial, sans-serif;
	--ft-cro-comprar-font-body: Inter, 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. */
.ft-cro-popup-comprar {
	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;
}

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

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

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

/* margin auto en vez de align-items: center para que no se recorte en pantallas bajas */
.ft-cro-popup-comprar__card {
	position: relative;
	width: 438px;
	max-width: 100%;
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--ft-cro-comprar-card-bg);
	border-radius: 30px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	box-sizing: border-box;
	animation: ft-cro-popup-comprar-in 0.28s ease-out both;
}

/* Imagen superior: se replica el recorte del diseño (zoom 127.81% y desplazamiento) */
.ft-cro-popup-comprar__media {
	position: relative;
	width: 138px;
	height: 121px;
	margin-top: 18px;
	overflow: hidden;
	flex-shrink: 0;
}

.ft-cro-popup-comprar__img {
	position: absolute;
	top: -12.45%;
	left: -15.2%;
	width: 127.81%;
	height: 146.25%;
	max-width: none;
	object-fit: cover;
}

/* Panel azul con el mensaje y el CTA */
.ft-cro-popup-comprar__panel {
	width: calc(100% - 16px);
	margin: 18px 8px 8px;
	padding: 43px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	border-radius: 25px;
	background: var(--ft-cro-comprar-panel);
	box-sizing: border-box;
}

.ft-cro-popup-comprar__text {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.ft-cro-popup-comprar__title {
	margin: 0;
	color: #fff;
	text-align: center;
	font-family: var(--ft-cro-comprar-font-title);
	font-size: 20px;
	font-weight: 600;
	line-height: 26px;
	overflow-wrap: break-word;
}

.ft-cro-popup-comprar__lead {
	margin: 0;
	color: #fff;
	text-align: center;
	font-family: var(--ft-cro-comprar-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 22px;
	overflow-wrap: break-word;
}

.ft-cro-popup-comprar__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--ft-cro-comprar-cta);
	color: #fff;
	font-family: var(--ft-cro-comprar-font-title);
	font-size: 18px;
	font-weight: 600;
	line-height: 24px;
	text-align: center;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ft-cro-popup-comprar__cta:hover,
.ft-cro-popup-comprar__cta:focus-visible {
	background: var(--ft-cro-comprar-cta-hover);
	color: #fff;
	transform: translateY(-2px);
}

/* Cerrar: icono de 12px con área de toque de 32px */
.ft-cro-popup-comprar__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ft-cro-comprar-close);
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease;
}

.ft-cro-popup-comprar__close:hover,
.ft-cro-popup-comprar__close:focus-visible {
	color: var(--ft-cro-comprar-close-hover);
	background: var(--Light-Lightness-1, #F4F7FA);
}

.ft-cro-popup-comprar__close svg {
	display: block;
}

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

/* Móvil: se reduce el padding interior del panel azul y el CTA pasa a ancho completo */
@media (max-width: 480px) {
	.ft-cro-popup-comprar {
		padding: 16px;
	}

	.ft-cro-popup-comprar__panel {
		padding: 32px 20px;
		gap: 20px;
	}

	.ft-cro-popup-comprar__title {
		font-size: 18px;
		line-height: 24px;
	}

	.ft-cro-popup-comprar__lead {
		font-size: 15px;
		line-height: 21px;
	}

	.ft-cro-popup-comprar__cta {
		width: 100%;
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ft-cro-popup-comprar__card {
		animation: none;
	}

	.ft-cro-popup-comprar__cta {
		transition: none;
	}

	.ft-cro-popup-comprar__cta:hover,
	.ft-cro-popup-comprar__cta:focus-visible {
		transform: none;
	}
}
