/* WhatsApp Popup Cadastro - Frontend v1.3.0 */

.wpc-modal {
	--wpc-primary: #25d366;
	--wpc-btn: #000000;
	--wpc-banner-bg: #5ba4d9;
	--wpc-radius: 16px;
	--wpc-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.wpc-modal *,
.wpc-modal *::before,
.wpc-modal *::after {
	box-sizing: border-box;
}

.wpc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	cursor: pointer;
	animation: none;
}

@keyframes wpc-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.wpc-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: var(--wpc-radius);
	width: 100%;
	box-shadow: var(--wpc-shadow);
	animation: none;
	z-index: 1;
	overflow: hidden;
}

.wpc-modal__dialog--classic {
	max-width: 420px;
}

.wpc-modal__dialog--classic::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--wpc-primary), #128c7e);
}

.wpc-modal__dialog--promo {
	max-width: 860px;
}

@keyframes wpc-dialog-in {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.wpc-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	max-width: 36px !important;
	max-height: 36px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: #ffffff !important;
	border: none !important;
	border-radius: 50% !important;
	font-size: 22px !important;
	font-weight: 400;
	line-height: 1 !important;
	color: #334155 !important;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none;
	transition: none;
	appearance: none;
	-webkit-appearance: none;
}

.wpc-modal__close span {
	display: block;
	line-height: 1;
	font-size: 22px;
}

.wpc-modal__close:hover,
.wpc-modal__close:focus {
	color: #0f172a !important;
	background: #f8fafc !important;
	outline: none;
}

/* ===== Classic layout ===== */
.wpc-modal__dialog--classic .wpc-modal__body {
	padding: 28px;
}

.wpc-modal__header {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 22px;
	padding-right: 28px;
}

.wpc-modal__icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: #e8f8ef;
	color: var(--wpc-primary);
}

.wpc-modal__title {
	margin: 0 0 6px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.wpc-modal__text {
	margin: 0;
	font-size: 0.925rem;
	color: #64748b;
	line-height: 1.55;
}

/* ===== Promotional layout ===== */
.wpc-modal__dialog--promo .wpc-modal__body {
	padding: 0;
}

.wpc-promo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 480px;
}

.wpc-promo__media {
	position: relative;
	background: #ffffff;
	overflow: hidden;
	min-height: 280px;
}

.wpc-promo__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.wpc-promo__img--mobile {
	display: none;
}

.wpc-promo__content {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px 36px 28px;
	background: #fff;
	overflow: hidden;
}

.wpc-promo__kicker {
	position: relative;
	z-index: 1;
	margin: 0 0 6px;
	font-family: inherit;
	font-size: var(--wpc-ft-titulo, 16px);
	font-weight: 700;
	color: var(--wpc-fc-titulo, #0f172a);
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wpc-promo__highlight {
	position: relative;
	z-index: 1;
	margin: 0 0 8px;
	font-family: inherit;
	font-size: var(--wpc-ft-destaque, 48px);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.04em;
	color: var(--wpc-fc-destaque, #0f172a);
	text-transform: uppercase;
}

.wpc-promo__sub {
	position: relative;
	z-index: 1;
	margin: 5px 0 36px;
	font-family: inherit;
	font-size: var(--wpc-ft-subtitulo, 16px);
	font-weight: 600;
	color: var(--wpc-fc-subtitulo, #334155);
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wpc-promo__offer {
	position: relative;
	z-index: 1;
	margin: 0 0 20px;
	font-family: inherit;
	font-size: var(--wpc-ft-oferta, 14px);
	font-weight: 600;
	color: var(--wpc-fc-oferta, #475569);
	line-height: 1.45;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wpc-form--promo .wpc-form__field {
	margin-bottom: 12px;
}

.wpc-form--promo input[type="tel"],
.wpc-form--promo input[type="text"],
.wpc-form--promo input[type="email"] {
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 14px 16px;
	font-size: 0.95rem;
	box-shadow: none;
}

.wpc-form--promo input:focus {
	border-color: #9ca3af;
	box-shadow: none;
	background: #fff;
	outline: none;
}

.wpc-form--promo .wpc-form__submit {
	margin-top: 6px;
	border-radius: 6px;
	background: var(--wpc-btn);
	box-shadow: none;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.9rem;
	padding: 15px 18px;
	transition: none;
}

.wpc-form--promo .wpc-form__submit:hover {
	filter: none;
	opacity: 0.9;
	box-shadow: none;
}

.wpc-promo__footer {
	position: relative;
	z-index: 1;
	margin: 14px 0 0;
	font-family: inherit;
	font-size: 0.75rem;
	color: var(--wpc-fc-rodape, #94a3b8);
	line-height: 1.4;
}

/* ===== Shared form ===== */
.wpc-form__field {
	margin-bottom: 14px;
}

.wpc-form__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #334155;
}

.wpc-form__field input[type="tel"],
.wpc-form__field input[type="text"],
.wpc-form__field input[type="email"] {
	width: 100%;
	padding: 13px 14px;
	font-family: inherit;
	font-size: 0.975rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #0f172a;
	transition: none;
	outline: none;
	box-shadow: none;
}

.wpc-form__field input::placeholder {
	color: #94a3b8;
}

.wpc-form__field input:focus {
	border-color: #9ca3af;
	background: #fff;
	box-shadow: none;
	outline: none;
}

.wpc-form__error {
	margin: 0 0 14px;
	padding: 11px 13px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 10px;
	color: #b91c1c;
	font-size: 0.875rem;
	line-height: 1.4;
}

.wpc-form__submit {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 14px 18px;
	border: none;
	border-radius: 6px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: var(--wpc-btn, var(--wpc-primary));
	cursor: pointer;
	transition: none;
	box-shadow: none;
}

.wpc-form__submit:hover {
	filter: none;
	opacity: 0.9;
}

.wpc-form__submit:active {
	transform: none;
	opacity: 0.85;
}

.wpc-form__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Success */
.wpc-modal__success {
	text-align: center;
	padding: 48px 32px 36px !important;
}

.wpc-success__icon {
	margin: 0 auto 16px;
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #e8f8ef;
	color: var(--wpc-primary);
	animation: none;
}

@keyframes wpc-pop {
	from { opacity: 0; transform: scale(0.6); }
	to { opacity: 1; transform: scale(1); }
}

.wpc-success__message {
	margin: 0 0 16px;
	font-size: 1rem;
	color: #334155;
	line-height: 1.5;
}

.wpc-success__codigo {
	display: inline-block;
	margin: 0 0 22px;
	padding: 12px 28px;
	background: #f0fdf4;
	border: 2px dashed var(--wpc-primary);
	border-radius: 12px;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: #166534;
	user-select: all;
}

/* Triggers */
a.wpc-trigger,
.wpc-trigger {
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

a.wpc-trigger--btn,
.wpc-trigger--btn {
	padding: 12px 22px;
	border-radius: 10px;
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95rem;
	border: none;
	line-height: 1.4;
}

a.wpc-trigger--btn:hover,
.wpc-trigger--btn:hover {
	filter: brightness(1.05);
	color: #fff !important;
	text-decoration: none;
}

a.wpc-trigger--link,
.wpc-trigger--link {
	color: inherit;
	text-decoration: underline;
}

body.wpc-modal-open {
	overflow: hidden;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Tablet */
@media (max-width: 860px) {
	.wpc-modal__dialog--promo {
		max-width: 640px;
	}

	.wpc-promo {
		grid-template-columns: 0.95fr 1.05fr;
		min-height: 420px;
	}

	.wpc-promo__content {
		padding: 28px 24px 22px;
	}
}

/* Mobile — card compacto, sem ocupar a tela inteira */
@media (max-width: 640px) {
	.wpc-modal {
		padding: 16px;
		align-items: center;
		justify-content: center;
	}

	.wpc-modal__dialog {
		width: 100%;
		max-width: 400px;
		max-height: min(90dvh, 90vh);
		height: auto;
		border-radius: 16px;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		margin: 0 auto;
	}

	.wpc-modal__dialog--promo {
		max-width: 400px;
	}

	.wpc-modal__dialog--classic {
		max-width: 400px;
	}

	.wpc-promo {
		grid-template-columns: 1fr;
		min-height: 0;
		height: auto;
	}

	.wpc-promo__media {
		min-height: 0;
		height: 240px;
		max-height: 260px;
		background: #ffffff;
	}

	.wpc-promo__img--desktop {
		display: none;
	}

	.wpc-promo__img--mobile {
		display: block;
		object-position: center 25%;
	}

	.wpc-promo__content {
		padding: 16px 16px 14px;
		justify-content: flex-start;
		flex: none;
	}

	.wpc-promo__highlight {
		margin-bottom: 6px;
	}

	.wpc-promo__offer {
		margin-bottom: 12px;
		line-height: 1.35;
	}

	.wpc-form--promo .wpc-form__field {
		margin-bottom: 8px;
	}

	.wpc-form--promo input[type="tel"],
	.wpc-form--promo input[type="text"],
	.wpc-form--promo input[type="email"] {
		padding: 11px 14px;
		font-size: 16px; /* evita zoom no iOS */
		border-radius: 8px;
	}

	.wpc-form--promo .wpc-form__submit {
		padding: 12px 16px;
		font-size: 0.85rem;
		border-radius: 8px;
	}

	.wpc-promo__footer {
		margin-top: 8px;
		font-size: 0.68rem;
	}

	.wpc-modal__close {
		top: 10px;
		right: 10px;
		width: 32px;
		height: 32px;
		font-size: 18px;
	}

	.wpc-modal__dialog--classic .wpc-modal__body {
		padding: 20px 16px 16px;
	}

	.wpc-modal__success {
		padding: 28px 20px 20px !important;
	}
}

/* Landscape / altura baixa */
@media (max-width: 640px) and (max-height: 520px) {
	.wpc-modal {
		align-items: flex-start;
		padding: 10px;
		overflow-y: auto;
	}

	.wpc-promo__media {
		height: 100px;
		max-height: 100px;
	}

	.wpc-promo__offer {
		margin-bottom: 8px;
	}
}

/* Telas estreitas */
@media (max-width: 380px) {
	.wpc-modal {
		padding: 12px;
	}

	.wpc-promo__content {
		padding: 14px 12px 12px;
	}

	.wpc-promo__media {
		height: 140px;
		max-height: 140px;
	}
}
