/* PCL Smart Popups - front end */

.pclp {
	--pclp-bg: #ffffff;
	--pclp-text: #1d2333;
	--pclp-muted: color-mix(in srgb, var(--pclp-text) 62%, transparent);
	--pclp-line: color-mix(in srgb, var(--pclp-text) 12%, transparent);
	--pclp-shadow: 0 32px 80px -24px rgba(8, 12, 28, .55), 0 12px 28px -12px rgba(8, 12, 28, .25);
	--pclp-ease: cubic-bezier(.2, .9, .25, 1.12);
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	pointer-events: none;
	font-family: inherit;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.pclp[hidden] { display: none !important; }
.pclp *, .pclp *::before, .pclp *::after { box-sizing: border-box; }

/* Themes */
.pclp--theme-dark { --pclp-bg: #141826; --pclp-text: #eef1f8; }
.pclp--theme-glass { --pclp-bg: rgba(255, 255, 255, .74); --pclp-text: #141a2b; }
.pclp--theme-glass .pclp__dialog {
	-webkit-backdrop-filter: blur(22px) saturate(1.7);
	backdrop-filter: blur(22px) saturate(1.7);
	border: 1px solid rgba(255, 255, 255, .6);
}

/* Backdrop */
.pclp__overlay {
	position: absolute;
	inset: 0;
	background: var(--pclp-overlay, rgba(11, 16, 32, .6));
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: auto;
}
.pclp.is-open .pclp__overlay { opacity: 1; }

/* Card */
.pclp__dialog {
	position: relative;
	width: min(100%, var(--pclp-width, 560px));
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--pclp-bg);
	color: var(--pclp-text);
	border-radius: var(--pclp-radius, 20px);
	box-shadow: var(--pclp-shadow);
	pointer-events: auto;
	outline: none;
	opacity: 0;
	transition: transform .5s var(--pclp-ease), opacity .3s ease;
	scrollbar-width: thin;
}
.pclp.is-open .pclp__dialog { opacity: 1; transform: none; }

/* Entrance animations */
.pclp--anim-zoom .pclp__dialog { transform: scale(.86); }
.pclp--anim-slide-up .pclp__dialog { transform: translateY(48px); }
.pclp--anim-drop .pclp__dialog { transform: translateY(-64px); }
.pclp--anim-fade .pclp__dialog { transform: none; }
.pclp.is-closing .pclp__dialog { transition-duration: .28s; transition-timing-function: ease-in; }

/* Can't-close-yet shake */
.pclp__dialog.is-nudge { animation: pclp-nudge .45s ease; }
@keyframes pclp-nudge {
	0%, 100% { transform: none; }
	20% { transform: translateX(-8px) rotate(-.6deg); }
	40% { transform: translateX(7px) rotate(.5deg); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(3px); }
}

/* Media */
.pclp__media { position: relative; overflow: hidden; line-height: 0; }
.pclp__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}
.pclp__video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pclp__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pclp--type-video .pclp__dialog { width: min(100%, max(var(--pclp-width, 560px), 720px)); }

/* Body */
.pclp__body { padding: 28px 32px 30px; }
.pclp__badge {
	display: inline-block;
	margin: 0 0 12px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--pclp-accent-soft, rgba(11, 122, 92, .14));
	color: var(--pclp-accent, #0b7a5c);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.4;
}
.pclp--theme-dark .pclp__badge { color: color-mix(in srgb, var(--pclp-accent) 55%, #fff); }
.pclp__meta {
	margin: 0 0 8px;
	color: var(--pclp-muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
}
.pclp__title {
	margin: 0 0 10px;
	color: inherit;
	font-family: inherit;
	font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.8rem);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -.015em;
}
.pclp__text { color: var(--pclp-muted); font-size: 1rem; }
.pclp__text p { margin: 0 0 .8em; }
.pclp__text p:last-child { margin-bottom: 0; }
.pclp__text a { color: var(--pclp-accent); }
.pclp__custom { color: var(--pclp-text); }

/* Buttons */
.pclp__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin-top: 22px;
}
.pclp__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--pclp-accent, #0b7a5c);
	color: var(--pclp-accent-text, #fff) !important;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: 0 12px 26px -10px var(--pclp-accent-glow, rgba(11, 122, 92, .45));
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.pclp__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.pclp__cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 32px -10px var(--pclp-accent-glow); }
.pclp__cta:hover svg { transform: translateX(3px); }
.pclp__cta:focus-visible { outline: 3px solid var(--pclp-accent-soft); outline-offset: 3px; }
.pclp__dismiss {
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--pclp-muted);
	font: inherit;
	font-size: .92rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.pclp__dismiss:hover { color: var(--pclp-text); }
.pclp__dismiss:disabled { opacity: .45; cursor: not-allowed; }

/* Close button with countdown ring */
.pclp__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(12, 16, 30, .55);
	color: #fff;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.pclp__close:hover:not(:disabled) { background: rgba(12, 16, 30, .8); transform: rotate(90deg); }
.pclp__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pclp__close > * { grid-area: 1 / 1; }
.pclp__x { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; transition: opacity .2s ease; }
.pclp__ring { width: 40px; height: 40px; transform: rotate(-90deg); fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; opacity: 0; }
.pclp__count { font-size: 14px; font-weight: 700; line-height: 1; }
.pclp.is-waiting .pclp__close { cursor: not-allowed; }
.pclp.is-waiting .pclp__x { opacity: 0; }
.pclp.is-waiting .pclp__ring { opacity: 1; animation: pclp-ring var(--pclp-wait, 5s) linear forwards; }
@keyframes pclp-ring { from { stroke-dashoffset: 113.1; } to { stroke-dashoffset: 0; } }

/* No image: lighter close button that blends into the card */
.pclp--no-media .pclp__body { padding-top: 34px; padding-right: 64px; }
.pclp--no-media .pclp__close { background: var(--pclp-line); color: var(--pclp-text); }
.pclp--no-media .pclp__close:hover:not(:disabled) { background: color-mix(in srgb, var(--pclp-text) 20%, transparent); }
.pclp--no-media .pclp__ring { stroke: currentColor; }

/* ---------------------------------------------------------------- Layout: split */
.pclp--split .pclp__dialog {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	width: min(100%, calc(var(--pclp-width, 560px) * 1.5));
}
/* The image fills its half but never sets the card's height - the text does. */
.pclp--split .pclp__media { min-height: 360px; }
.pclp--split .pclp__media img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.pclp--split .pclp__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 44px 40px; }
.pclp--split.pclp--image-right .pclp__media { order: 2; }
.pclp--split.pclp--image-right .pclp__close { background: rgba(12, 16, 30, .35); }

/* ---------------------------------------------------------------- Layout: full screen */
.pclp--fullscreen { padding: 0; }
.pclp--fullscreen .pclp__dialog {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	max-height: none;
	border-radius: 0;
	box-shadow: none;
}
.pclp--fullscreen .pclp__media { position: absolute; inset: 0; }
.pclp--fullscreen .pclp__media img { height: 100%; aspect-ratio: auto; }
.pclp--fullscreen .pclp__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(6, 10, 22, .25) 0%, rgba(6, 10, 22, .78) 100%);
}
.pclp--fullscreen .pclp__media + .pclp__body { color: #fff; --pclp-muted: rgba(255, 255, 255, .85); }
.pclp--fullscreen .pclp__body { position: relative; z-index: 1; max-width: 760px; padding: 48px 28px; text-align: center; }
.pclp--fullscreen .pclp__title { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); }
.pclp--fullscreen .pclp__text { font-size: 1.12rem; }
.pclp--fullscreen .pclp__actions { justify-content: center; }
.pclp--fullscreen .pclp__close { top: 20px; right: 20px; }
.pclp--fullscreen .pclp__video { position: relative; inset: auto; width: min(92vw, 960px); }

/* ---------------------------------------------------------------- Layout: corner slide-in */
.pclp--slidein { inset: auto 20px 20px auto; padding: 0; }
.pclp--slidein.pclp--bottom-left { inset: auto auto 20px 20px; }
.pclp--slidein .pclp__dialog { width: min(calc(100vw - 40px), var(--pclp-width, 380px), 400px); max-height: calc(100vh - 40px); }
.pclp--slidein .pclp__body { padding: 22px 24px 24px; }
.pclp--slidein .pclp__title { font-size: 1.25rem; }
.pclp--slidein .pclp__close { top: 10px; right: 10px; width: 34px; height: 34px; }
.pclp--slidein .pclp__ring { width: 34px; height: 34px; }
.pclp--slidein.pclp--anim-zoom .pclp__dialog,
.pclp--slidein.pclp--anim-drop .pclp__dialog { transform: translateY(30px) scale(.96); }

/* ---------------------------------------------------------------- Layout: bar */
.pclp--bar { inset: auto 0 0 0; padding: 0; }
.pclp--bar.pclp--bar-top { inset: 0 0 auto 0; }
.pclp--bar .pclp__dialog {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	max-height: none;
	padding: 12px 64px 12px 20px;
	border-radius: 0;
	overflow: visible;
}
.pclp--bar .pclp__media { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 12px; }
.pclp--bar .pclp__media img { width: 64px; height: 64px; aspect-ratio: 1; }
.pclp--bar .pclp__video { display: none; }
.pclp--bar .pclp__body { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 0; }
.pclp--bar .pclp__badge, .pclp--bar .pclp__meta { margin: 0; }
.pclp--bar .pclp__title { margin: 0; font-size: 1.08rem; }
.pclp--bar .pclp__text { flex: 1 1 280px; font-size: .95rem; }
.pclp--bar .pclp__actions { margin: 0; }
.pclp--bar .pclp__cta { padding: 10px 20px; }
.pclp--bar .pclp__close { top: 50%; right: 14px; width: 34px; height: 34px; margin-top: -17px; background: var(--pclp-line); color: var(--pclp-text); }
.pclp--bar .pclp__ring { width: 34px; height: 34px; stroke: currentColor; }
.pclp--bar .pclp__dialog { transform: translateY(100%); }
.pclp--bar.pclp--bar-top .pclp__dialog { transform: translateY(-100%); }
.pclp--bar.is-open .pclp__dialog { transform: none; }

/* Page scroll lock for blocking layouts */
html.pclp-lock, html.pclp-lock body { overflow: hidden !important; }

/* ---------------------------------------------------------------- Phones */
@media (max-width: 640px) {
	.pclp { padding: 14px; }
	.pclp__body { padding: 22px 22px 24px; }
	.pclp__actions { flex-direction: column; align-items: stretch; text-align: center; }
	.pclp__cta { justify-content: center; }
	.pclp--split .pclp__dialog { display: block; }
	.pclp--split .pclp__media { min-height: 0; }
	.pclp--split .pclp__media img { position: static; height: auto; aspect-ratio: 16 / 9; }
	.pclp--split .pclp__body { display: block; padding: 24px 22px; }
	.pclp--slidein, .pclp--slidein.pclp--bottom-left { inset: auto 12px 12px 12px; }
	.pclp--slidein .pclp__dialog { width: 100%; }
	.pclp--bar .pclp__dialog { padding: 12px 54px 12px 14px; }
	.pclp--bar .pclp__media { display: none; }
	.pclp--bar .pclp__text { display: none; }
	.pclp--bar .pclp__actions { flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
	.pclp__dialog, .pclp__overlay, .pclp__cta, .pclp__close { transition: none !important; }
	.pclp__dialog { transform: none !important; }
	.pclp__dialog.is-nudge { animation: none; }
}
