.cgp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999998;
	display: none;
	opacity: 0;
	transition: opacity .25s ease;
}
.cgp-overlay.cgp-visible {
	display: block;
	opacity: 1;
}
.cgp-overlay.cgp-no-overlay {
	background: transparent !important;
	pointer-events: none;
}

.cgp-popup {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 24px);
	overflow: auto;
	box-shadow: 0 10px 40px rgba(0,0,0,.25);
	pointer-events: auto;
}
.cgp-popup * {
	box-sizing: border-box;
}
.cgp-popup img {
	max-width: 100%;
	height: auto;
}
.cgp-popup a {
	color: inherit;
}

.cgp-popup-inner {
	padding: 36px 32px;
	position: relative;
}

.cgp-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	opacity: .7;
	z-index: 2;
	transition: opacity .2s ease;
}
.cgp-close:hover {
	opacity: 1;
}
.cgp-close.cgp-close-hidden {
	opacity: 0 !important;
	pointer-events: none;
}
.cgp-close.cgp-close-text {
	width: auto;
	height: auto;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	background: rgba(0,0,0,.06);
}

.cgp-cta-btn {
	display: inline-block;
	margin-top: 18px;
	padding: 12px 26px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	text-align: center;
	border: none;
	cursor: pointer;
}

/* ---- Positions ---- */
.cgp-pos-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: var(--cgp-radius, 10px);
	width: 100%;
}

.cgp-pos-top-bar {
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100vw;
	border-radius: 0;
}
.cgp-pos-top-bar .cgp-popup-inner {
	padding: 18px 48px;
	text-align: center;
}

.cgp-pos-bottom-bar {
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100vw;
	border-radius: 0;
}
.cgp-pos-bottom-bar .cgp-popup-inner {
	padding: 18px 48px;
	text-align: center;
}

.cgp-pos-bottom-right {
	bottom: 20px;
	right: 20px;
	border-radius: var(--cgp-radius, 10px);
}

.cgp-pos-bottom-left {
	bottom: 20px;
	left: 20px;
	border-radius: var(--cgp-radius, 10px);
}

.cgp-pos-fullscreen {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	max-width: 100vw;
	max-height: 100vh;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cgp-pos-fullscreen .cgp-popup-inner {
	max-width: 640px;
	text-align: center;
}

/* ---- Animations ---- */
.cgp-anim-fade { animation: cgpFade .3s ease both; }
.cgp-anim-zoom { animation: cgpZoom .3s ease both; }
.cgp-anim-slide-up { animation: cgpSlideUp .35s ease both; }
.cgp-anim-slide-down { animation: cgpSlideDown .35s ease both; }

@keyframes cgpFade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes cgpZoom {
	from { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
	to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes cgpSlideUp {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes cgpSlideDown {
	from { opacity: 0; transform: translateY(-40px); }
	to { opacity: 1; transform: translateY(0); }
}
.cgp-pos-center.cgp-anim-slide-up,
.cgp-pos-center.cgp-anim-slide-down {
	transform: translate(-50%, -50%);
}

/* ---- Responsive ---- */
@media (max-width: 782px) {
	.cgp-popup-inner {
		padding: 26px 22px;
	}
	.cgp-pos-bottom-right,
	.cgp-pos-bottom-left {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
	}
}
