:root {
	--pieb-pop-navy: #183a70;
	--pieb-pop-blue: #24548f;
	--pieb-pop-sky: #8dc8e8;
	--pieb-pop-ink: #23334b;
	--pieb-pop-paper: #f8f4ef;
}

.pieb-pop[hidden] {
	display: none !important;
}

.pieb-pop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
}

.pieb-pop__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(13, 31, 58, 0.72);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.34s ease;
}

.pieb-pop__dialog {
	position: relative;
	z-index: 1;
	width: min(660px, 100%);
	max-height: min(760px, calc(100vh - 48px));
	overflow: auto;
	padding: clamp(34px, 5vw, 54px);
	border: 1px solid rgba(141, 200, 232, 0.62);
	border-radius: 26px;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 239, 0.98));
	box-shadow: 0 30px 90px rgba(10, 28, 55, 0.34);
	color: var(--pieb-pop-ink);
	opacity: 0;
	transform: translate3d(0, 22px, 0) scale(0.985);
	transition:
		opacity 0.44s cubic-bezier(0.22, 0.61, 0.36, 1),
		transform 0.44s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pieb-pop.is-open .pieb-pop__backdrop,
.pieb-pop.is-open .pieb-pop__dialog {
	opacity: 1;
}

.pieb-pop.is-open .pieb-pop__dialog {
	transform: translate3d(0, 0, 0) scale(1);
}

.pieb-pop__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(24, 58, 112, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.86);
	color: var(--pieb-pop-navy);
	font: 400 30px/1 Arial, sans-serif;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.pieb-pop__close:hover,
.pieb-pop__close:focus-visible {
	background: #fff;
	transform: scale(1.06);
}

.pieb-pop__eyebrow {
	margin: 0 52px 12px 0;
	color: var(--pieb-pop-blue);
	font: 700 13px/1.3 Arial, sans-serif;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.pieb-pop__title {
	margin: 0 42px 22px 0;
	color: var(--pieb-pop-navy);
	font-size: clamp(34px, 6vw, 52px);
	line-height: 1.04;
	letter-spacing: -0.035em;
	text-transform: none;
}

.pieb-pop__content {
	font-size: clamp(17px, 2vw, 19px);
	line-height: 1.62;
}

.pieb-pop__content p {
	margin: 0 0 15px;
}

.pieb-pop__lead {
	font-weight: 650;
	color: #17375f;
}

.pieb-pop__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	margin-top: 12px;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--pieb-pop-navy);
	box-shadow: 0 12px 28px rgba(24, 58, 112, 0.22);
	color: #fff !important;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pieb-pop__button:hover,
.pieb-pop__button:focus-visible {
	background: var(--pieb-pop-blue);
	box-shadow: 0 15px 34px rgba(24, 58, 112, 0.28);
	transform: translateY(-2px);
}

.pieb-pop__paper {
	margin: 22px 0 0;
	padding: 15px 18px;
	border-left: 4px solid var(--pieb-pop-sky);
	border-radius: 0 12px 12px 0;
	background: rgba(141, 200, 232, 0.15);
	color: #38516f;
	font-size: 15px;
	line-height: 1.5;
}

body.pieb-pop-lock {
	overflow: hidden;
}

@media (max-width: 600px) {
	.pieb-pop {
		place-items: center;
		padding: 16px;
	}

	.pieb-pop__dialog {
		width: min(420px, calc(100vw - 32px));
		max-height: min(82vh, 620px);
		max-height: min(82dvh, 620px);
		padding: 25px 20px 20px;
		border-radius: 20px;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	.pieb-pop__close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
		font-size: 26px;
	}

	.pieb-pop__eyebrow {
		margin: 0 42px 8px 0;
		font-size: 11px;
		letter-spacing: 0.14em;
	}

	.pieb-pop__title {
		margin: 0 38px 14px 0;
		font-size: clamp(27px, 8vw, 32px);
		line-height: 1.08;
		letter-spacing: -0.025em;
	}

	.pieb-pop__content {
		font-size: 15px;
		line-height: 1.46;
	}

	.pieb-pop__content p {
		margin-bottom: 10px;
	}

	.pieb-pop__button {
		width: 100%;
		min-height: 46px;
		margin-top: 5px;
		padding: 11px 18px;
		font-size: 15px;
	}

	.pieb-pop__paper {
		margin-top: 14px;
		padding: 10px 12px;
		border-left-width: 3px;
		font-size: 13px;
		line-height: 1.4;
	}
}

@media (max-width: 380px), (max-height: 640px) {
	.pieb-pop__dialog {
		max-height: 88vh;
		max-height: 88dvh;
		padding: 21px 17px 16px;
	}

	.pieb-pop__title {
		font-size: 26px;
	}

	.pieb-pop__content {
		font-size: 14px;
		line-height: 1.4;
	}
}

/* El aviso no se muestra en teléfonos, tampoco en posición horizontal. */
@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {
	.pieb-pop {
		display: none !important;
	}
}

/* Respaldo para Safari móvil cuando el ancho de maquetación no coincide. */
@media screen and (max-device-width: 600px) {
	.pieb-pop {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pieb-pop__backdrop,
	.pieb-pop__dialog,
	.pieb-pop__close,
	.pieb-pop__button {
		transition: none !important;
	}
}

