/* cloudWEB PDF Popup — frontend */

.cwpp-overlay[hidden] { display: none !important; }

.cwpp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(0, 0, 0, .65);
	opacity: 0;
	transition: opacity .25s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cwpp-overlay.is-visible { opacity: 1; }

.cwpp-modal {
	position: relative;
	width: 100%;
	margin: auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	transform: translateY(16px) scale(.98);
	transition: transform .25s ease;
	padding: 0;
}

.cwpp-overlay.is-visible .cwpp-modal { transform: none; }

/* Close button */
.cwpp-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #222;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
	line-height: 1;
	transition: background .15s ease, color .15s ease;
}

.cwpp-close:hover,
.cwpp-close:focus-visible {
	background: #222;
	color: #fff;
	outline: none;
}

.cwpp-title {
	margin: 0;
	padding: 18px 24px 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

/* Body */
.cwpp-body { padding: 16px; }
.cwpp-body--image { padding: 0; }

.cwpp-image-link {
	display: block;
	line-height: 0;
	border-radius: 6px;
	overflow: hidden;
}

.cwpp-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

/* Embedded PDF viewer */
.cwpp-embed {
	display: block;
	width: 100%;
	height: min(78vh, 900px);
	border: 1px solid #e3e3e3;
	border-radius: 4px;
	background: #f4f4f4;
}

.cwpp-fallback {
	padding: 32px 20px;
	text-align: center;
}

/* Actions */
.cwpp-actions {
	padding: 16px;
	text-align: center;
}

.cwpp-button {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 4px;
	background: #c8102e;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	line-height: 1.2;
	transition: opacity .15s ease;
}

.cwpp-button:hover,
.cwpp-button:focus-visible { opacity: .85; }

/* Prevent background scroll while open */
html.cwpp-lock,
body.cwpp-lock { overflow: hidden; }

@media (max-width: 600px) {
	.cwpp-overlay { padding: 44px 12px 24px; }
	.cwpp-close { top: -12px; right: -6px; }
	.cwpp-embed { height: 70vh; }
	.cwpp-title { font-size: 1.1rem; padding: 16px 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
	.cwpp-overlay,
	.cwpp-modal { transition: none; }
}
