/**
 * Formulário de contato (forms-handler/forms/contact/contact_form.php) — visual moderno.
 * Só estilo: os campos, os data-field e o JS continuam os mesmos.
 */

.contact-form {
	--xp-f-border: #d8d0de;
	--xp-f-text: #2a2230;
	--xp-f-muted: #6f657a;
	--xp-f-purple: #812990;
	--xp-f-radius: 4px;
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 920px;
	margin-inline: auto;
	text-align: left;
}

.contact-form > .grid {
	gap: 22px 24px;
}

/* rótulos */
.contact-form label {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--xp-f-text);
}

/* campos de texto, selects e área de texto */
.contact-form input:not([type="checkbox"]):not([type="hidden"]):not([name="website"]),
.contact-form select,
.contact-form textarea {
	width: 100%;
	height: 54px;
	padding: 0 16px;
	border: 1px solid var(--xp-f-border);
	border-radius: var(--xp-f-radius);
	background-color: #fff;
	color: var(--xp-f-text);
	font-size: 16px;
	line-height: 1.2;
	box-shadow: 0 1px 0 rgba(42, 34, 48, .03);
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.contact-form textarea {
	height: auto;
	min-height: 150px;
	padding: 14px 16px;
	line-height: 1.5;
	resize: vertical;
}

.contact-form ::placeholder {
	color: #a096aa;
	opacity: 1;
}

.contact-form input:not([type="checkbox"]):hover,
.contact-form select:hover,
.contact-form textarea:hover {
	border-color: #b9aec3;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
	outline: 0;
	border-color: var(--xp-f-purple);
	box-shadow: 0 0 0 3px rgba(129, 41, 144, .16);
}

/* selects com seta própria */
.contact-form select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23812990' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.contact-form select:disabled {
	background-color: #f5f2f7;
	color: #9a90a3;
	cursor: not-allowed;
}

/* campo inválido, só depois de o visitante interagir (não pinta de vermelho ao abrir a página) */
.contact-form :is(input, select, textarea):user-invalid {
	border-color: #c8344a;
}

/* caixa de aceite */
.contact-form input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--xp-f-purple);
	cursor: pointer;
}

.contact-form label[for="check"] {
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	cursor: pointer;
}

/* termos */
.contact-form p.text-sm {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--xp-f-muted);
}

.contact-form p.text-sm a {
	color: var(--xp-f-purple);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* botão enviar */
.contact-form button.send {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 220px;
	height: 56px;
	padding: 0 32px;
	border: 0;
	border-radius: var(--xp-f-radius);
	background: var(--xp-f-purple);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .02em;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(129, 41, 144, .28);
	transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.contact-form button.send::after {
	content: "\2192";
	font-size: 18px;
	line-height: 1;
	transition: transform .16s ease;
}

.contact-form button.send:hover {
	background: #692175;
	box-shadow: 0 10px 24px rgba(105, 33, 117, .34);
}

.contact-form button.send:hover::after { transform: translateX(3px); }
.contact-form button.send:active { transform: translateY(1px); }

.contact-form button.send:disabled {
	opacity: .65;
	cursor: wait;
	box-shadow: none;
}

.contact-form button.send:focus-visible {
	outline: 3px solid rgba(129, 41, 144, .35);
	outline-offset: 2px;
}

@media (max-width: 767.98px) {
	.contact-form { gap: 18px; }
	.contact-form button.send { align-self: stretch; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.contact-form *, .contact-form *::after { transition: none !important; }
}

/* ===== Formulário do WhatsApp (modal "Converse com um consultor") no celular ===== */
@media (max-width: 767.98px) {
	.consultor-form {
		display: flex;
		flex-direction: column;
		gap: 12px;
		text-align: left;
	}

	/* campos maiores: 54 px de altura e 16 px (abaixo disso o iPhone dá zoom ao tocar) */
	.consultor-form input:not([type="checkbox"]):not([name="website"]):not([type="hidden"]),
	.consultor-form select {
		width: 100%;
		height: 54px !important;
		padding: 0 14px !important;
		font-size: 16px !important;
		line-height: 1.2 !important;
		border: 1px solid #d8d0de !important;
		border-radius: 4px !important;
		background-color: #fff;
		color: #2a2230;
	}

	.consultor-form select {
		-webkit-appearance: none;
		appearance: none;
		padding-right: 40px !important;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23812990' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 14px center;
	}

	.consultor-form select:disabled { background-color: #f5f2f7; color: #9a90a3; }

	.consultor-form input:focus,
	.consultor-form select:focus {
		outline: 0;
		border-color: #812990 !important;
		box-shadow: 0 0 0 3px rgba(129, 41, 144, .16);
	}

	/* textos menores */
	.consultor-form .text-xs { font-size: 12px !important; line-height: 1.3 !important; margin: 0; }

	.consultor-form label span,
	.consultor-form label span * {
		font-size: 13px !important;
		line-height: 1.4 !important;
	}

	.consultor-form input[type="checkbox"] {
		flex: 0 0 auto;
		width: 18px;
		height: 18px;
		accent-color: #812990;
	}

	.consultor-form button[type="submit"] {
		height: 54px;
		padding: 0 16px;
		margin-top: 0 !important;
		border-radius: 4px;
		font-size: 16px !important;
		font-weight: 600;
	}
}
