/* CICLO Pop-ups — estilos de front-end.
   Layout único; cada instância recebe as variáveis do tema via style inline:
   --cp-accent, --cp-btn, --cp-panel, --cp-left-grad, --cp-img, --cp-img-overlay  */

.ciclo-pop,
.ciclo-pop * { box-sizing: border-box; }

.ciclo-pop[hidden] { display: none; }

.ciclo-pop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: "DM Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	opacity: 0;
	transition: opacity .25s ease;
}
.ciclo-pop.cp-open { opacity: 1; }

/* Overlay */
.cp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 4, 10, .72);
	backdrop-filter: blur(2px);
}

/* Card / modal */
.cp-modal {
	position: relative;
	display: flex;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
	transform: translateY(12px) scale(.98);
	transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	color: #fff;
}
.ciclo-pop.cp-open .cp-modal { transform: none; }

/* Painel de texto */
.cp-panel {
	flex: 1 1 50%;
	background: var(--cp-panel, #110004);
	display: flex;
}
.cp-modal--visual .cp-panel { background: var(--cp-left-grad, var(--cp-panel)); }

.cp-panel-inner {
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding: 40px;
	width: 100%;
	justify-content: center;
}

.cp-text { display: flex; flex-direction: column; gap: 8px; }

.cp-title {
	margin: 0;
	padding: 0;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.72px;
	text-align: center;
	text-transform: none;
	color: #fff;
}
.cp-subtitle {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 400;
	text-align: center;
	color: #f6f6f6;
}

/* Botão / CTA */
.cp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 4px;
	background: var(--cp-btn, var(--cp-accent, #e42554));
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
}
.cp-btn:hover { filter: brightness(1.08); }
.cp-btn:active { transform: translateY(1px); }

/* Metade da imagem (visual) */
.cp-modal--visual { width: 754px; max-width: 94vw; }
.cp-media {
	position: relative;
	flex: 1 1 50%;
	min-height: 320px;
	overflow: hidden;
}
.cp-media-img {
	position: absolute;
	inset: 0;
	background-image: var(--cp-img);
	background-size: cover;
	background-position: center;
}
.cp-media-overlay {
	position: absolute;
	inset: 0;
	background: var(--cp-img-overlay, transparent);
}

/* Botão de fechar */
.cp-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: .5px solid #f1f2f9;
	border-radius: 200px;
	background: linear-gradient(180deg, #ffffff 0%, #f1f2f9 100%);
	color: #170f49;
	cursor: pointer;
	box-shadow: inset 0 -1px 1px rgba(150, 161, 172, .12);
	z-index: 3;
	transition: transform .15s ease;
}
.cp-close:hover { transform: scale(1.06); }

/* ---------- Formulário ---------- */
.cp-modal--form { width: 600px; max-width: 94vw; }
.cp-modal--form .cp-panel-inner { gap: 32px; padding: 48px; }

.cp-form { display: flex; flex-direction: column; gap: 16px; }
.cp-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.cp-col-12 { flex: 1 1 100%; }
.cp-col-6 { flex: 1 1 calc(50% - 8px); }

.cp-form .cp-field { display: flex; flex-direction: column; gap: 6px; }
.cp-form label {
	font-size: 12px;
	font-weight: 600;
	color: #f6f6f6;
}
.cp-form input[type="text"],
.cp-form input[type="email"],
.cp-form input[type="tel"] {
	height: 48px;
	padding: 8px 14px;
	border: 1px solid #888888;
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	outline: none;
	transition: border-color .15s ease;
}
.cp-form input::placeholder { color: #888888; }
.cp-form input:focus { border-color: var(--cp-accent, #e42554); }

.cp-field.cp-invalid input { border-color: #ff5a5a; }
.cp-error { font-size: 11px; color: #ff7a7a; }

.cp-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	font-weight: 400 !important;
	color: #e7e7e7;
	cursor: pointer;
}
.ciclo-pop .cp-check input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	flex: 0 0 16px !important;
	box-sizing: border-box !important;
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	max-width: 16px !important;
	min-height: 16px !important;
	max-height: 16px !important;
	aspect-ratio: 1 / 1;
	margin: 1px 0 0 !important;
	padding: 0 !important;
	border: 1px solid var(--cp-accent, #e42554) !important;
	border-radius: 4px !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
	position: relative;
	vertical-align: top;
	flex-shrink: 0;
}
.ciclo-pop .cp-check input[type="checkbox"]:checked {
	background: var(--cp-accent, #e42554) !important;
}
.ciclo-pop .cp-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 4px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.cp-check a { color: #fff; text-decoration: underline; }
.cp-check.cp-invalid { color: #ff7a7a; }

.cp-form-feedback { font-size: 13px; min-height: 1px; }
.cp-form-feedback.cp-ok { color: #7be0b0; }
.cp-form-feedback.cp-err { color: #ff7a7a; }

.cp-form.cp-sending .cp-submit { opacity: .6; pointer-events: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
	.cp-modal--visual {
		flex-direction: column;
		width: 345px;
		max-width: 92vw;
	}
	.cp-modal--visual .cp-media {
		order: -1;
		flex: none;
		width: 100%;
		min-height: 230px;
	}
	.cp-panel-inner { padding: 32px 24px; gap: 28px; }
	.cp-title { font-size: 26px; }
	.cp-modal--form { width: 92vw; }
	.cp-modal--form .cp-panel-inner { padding: 40px 24px; }
	.cp-col-6 { flex: 1 1 100%; }
}
