/*
 * CDN Modal — popup dos formulários.
 */
.cdn-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 16px;
	background: rgba(20, 30, 55, .5);
	backdrop-filter: blur(2px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.cdn-modal-overlay.is-open { display: flex; }

.cdn-modal {
	position: relative;
	width: 100%;
	max-width: 760px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(20, 30, 55, .35);
	margin: auto;
	animation: cdnModalIn .18s ease;
}
@keyframes cdnModalIn {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cdn-modal-close {
	position: absolute;
	top: 10px; right: 12px;
	z-index: 2;
	width: 34px; height: 34px;
	border: none; border-radius: 50%;
	background: rgba(0, 0, 0, .06);
	color: #333;
	font-size: 1.4rem; line-height: 1;
	cursor: pointer;
}
.cdn-modal-close:hover { background: rgba(0, 0, 0, .12); }

.cdn-modal-body { padding: 6px; }
.cdn-modal-loading {
	padding: 48px 0;
	text-align: center;
	color: #6B7280;
	font-family: 'Poppins', system-ui, sans-serif;
}

/* Trava o scroll do fundo enquanto o popup está aberto. */
body.cdn-modal-lock { overflow: hidden; }

/* A view injetada já traz o próprio .cdn-wrap — remove sombras/margens
   duplicadas e neutraliza a barra de ações fixa (não faz sentido no popup). */
.cdn-modal-body .cdn-wrap {
	margin: 0 !important;
	box-shadow: none !important;
	border: none !important;
	max-width: 100% !important;
}
.cdn-modal-body .cdn-form-actions-fixed {
	position: static !important;
	box-shadow: none !important;
	padding: 12px 0 4px !important;
	border-top: 1px solid var(--cdn-borda, #e5e9f0) !important;
}
.cdn-modal-body form:has(.cdn-form-actions-fixed) { padding-bottom: 0 !important; }

@media (max-width: 782px) {
	.cdn-modal-overlay { padding: 0; }
	.cdn-modal { border-radius: 0; min-height: 100%; max-width: 100%; }
}
