/**
 * Axion — presets visuais para o widget Form do Elementor Pro.
 *
 * Tudo está isolado sob .axion-form-design--product / --contact, aplicadas ao
 * wrapper do widget via prefix_class. Nenhum seletor global toca formulários
 * do Elementor fora desses presets.
 *
 * As larguras nativas (.elementor-col-50 etc.) são preservadas: o wrapper
 * continua sendo flex com wrap, como no Elementor. Nada vira CSS grid, então
 * os controles de largura do editor seguem funcionando.
 *
 * O espaçamento entre colunas NÃO usa gap/column-gap: como as larguras nativas
 * são `width: 50%`, qualquer column-gap somaria ao total e quebraria a segunda
 * coluna para a linha de baixo. Em vez disso, cada grupo recebe padding lateral
 * de 8px (absorvido pelo box-sizing: border-box) e o wrapper compensa com
 * margens negativas de -8px. O espaçamento vertical vem de margin-bottom.
 *
 * Valores confirmados no código original:
 *   ProductDetail.tsx  max-w-2xl=672 · gap-4=16 · space-y-4=16 · mb-1=4
 *                      px-3 py-2.5=12/10 · rounded-lg=8 · rows=4
 *                      botão rounded-xl=12 · nota text-xs text-gray-400
 *   Contact.tsx        space-y-5=20 · gap-4=16 · mb-1.5=6
 *                      px-4 py-3=16/12 · rounded-xl=12 · botão idem
 *
 * Sem :has(). Sem !important (ver nota no bloco do botão).
 */

/* =====================================================================
 * BASE COMUM AOS DOIS PRESETS
 * ==================================================================== */

.axion-form-design--product .elementor-form,
.axion-form-design--contact .elementor-form {
	width: 100%;
}

/*
 * O wrapper segue flex (padrão do Elementor) para que .elementor-col-*
 * continue governando a largura.
 *
 * IMPORTANTE: nada de `gap` / `column-gap` aqui. As larguras nativas são
 * `width: 50%` (elementor/assets/css/frontend.css), então um column-gap de
 * 16px faria 50% + 50% + 16px passar de 100% e a segunda coluna quebraria
 * para a linha de baixo. O espaçamento horizontal vem de padding nos grupos
 * (absorvido pelo box-sizing: border-box) com margens negativas compensando
 * no wrapper — assim as porcentagens continuam exatas.
 */
.axion-form-design--product .elementor-form-fields-wrapper,
.axion-form-design--contact .elementor-form-fields-wrapper {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0;
	column-gap: 0;
	row-gap: 0;
	margin-left: -8px;
	margin-right: -8px;
}

/*
 * padding lateral de 8px + 8px = 16px entre colunas vizinhas.
 * Nenhuma width/flex-basis/max-width genérica: as classes .elementor-col-*
 * seguem sendo a única fonte de largura.
 */
.axion-form-design--product .elementor-field-group,
.axion-form-design--contact .elementor-field-group {
	padding-left: 8px;
	padding-right: 8px;
	margin: 0;
	align-content: flex-start;
	box-sizing: border-box;
}

/* ---- labels ---- */

.axion-form-design--product .elementor-field-group > .elementor-field-label,
.axion-form-design--contact .elementor-field-group > .elementor-field-label {
	display: block;
	width: 100%;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: #374151;
}

/* ---- campos ---- */

.axion-form-design--product .elementor-field-textual,
.axion-form-design--contact .elementor-field-textual {
	width: 100%;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 20px;
	color: #111827;
	background-color: #FFFFFF;
	border: 1px solid #E5E7EB;
	box-shadow: none;
	transition: border-color 150ms ease, box-shadow 150ms ease;
	box-sizing: border-box;
}

.axion-form-design--product .elementor-field-textual::placeholder,
.axion-form-design--contact .elementor-field-textual::placeholder {
	color: #9CA3AF;
	opacity: 1;
}

/* focus laranja do original: ring-2 ring-orange-500 + border transparente */
.axion-form-design--product .elementor-field-textual:focus,
.axion-form-design--contact .elementor-field-textual:focus {
	outline: none;
	border-color: transparent;
	box-shadow: 0 0 0 2px #F97316;
}

.axion-form-design--product textarea.elementor-field-textual,
.axion-form-design--contact textarea.elementor-field-textual {
	resize: none;
	display: block;
}

/* ---- marca de obrigatório ---- */

.axion-form-design--product .elementor-field-required .elementor-field-label:after,
.axion-form-design--contact .elementor-field-required .elementor-field-label:after {
	content: " *";
	color: #EF4444;
}

/* ---- botão ---- */

.axion-form-design--product .elementor-field-type-submit .elementor-button,
.axion-form-design--contact .elementor-field-type-submit .elementor-button {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	color: #FFFFFF;
	background-color: #FF6B00;
	border: none;
	border-radius: 12px;
	padding: 0 16px;
	transition: background-color 150ms ease, transform 100ms ease;
	box-sizing: border-box;
}

.axion-form-design--product .elementor-field-type-submit .elementor-button:hover,
.axion-form-design--contact .elementor-field-type-submit .elementor-button:hover {
	background-color: #EA580C;
	color: #FFFFFF;
}

.axion-form-design--product .elementor-field-type-submit .elementor-button:active,
.axion-form-design--contact .elementor-field-type-submit .elementor-button:active {
	transform: scale(0.95);
}

.axion-form-design--product .elementor-field-type-submit .elementor-button:focus-visible,
.axion-form-design--contact .elementor-field-type-submit .elementor-button:focus-visible {
	outline: 2px solid #F97316;
	outline-offset: 2px;
}

/* ---- mensagens ---- */

.axion-form-design--product .elementor-message,
.axion-form-design--contact .elementor-message {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 20px;
	margin-top: 8px;
}

.axion-form-design--product .elementor-message.elementor-message-success,
.axion-form-design--contact .elementor-message.elementor-message-success {
	color: #16A34A;
}

.axion-form-design--product .elementor-message.elementor-message-danger,
.axion-form-design--contact .elementor-message.elementor-message-danger {
	color: #EF4444;
}

/*
 * Nota de segurança: o original é um <p> abaixo do botão (text-xs
 * text-gray-400 text-center). No Elementor corresponde à mensagem de
 * "após envio" ou a um campo HTML dentro do próprio form.
 */
.axion-form-design--product .elementor-field-type-html,
.axion-form-design--contact .elementor-field-type-html {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	line-height: 16px;
	color: #9CA3AF;
	text-align: center;
}

/* =====================================================================
 * PRESET: PRODUCT PAGE
 * ProductDetail.tsx — max-w-2xl, space-y-4/gap-4, mb-1, px-3 py-2.5
 * ==================================================================== */

.axion-form-design--product .elementor-form {
	max-width: 672px;
}

/*
 * Espaçamento vertical de 16px por margin-bottom nos grupos (o horizontal já
 * vem do padding de 8px definido na base). O último grupo perde a margem via
 * :last-child, sem :has() e sem depender da ordem dos campos.
 */
.axion-form-design--product .elementor-field-group {
	margin-bottom: 16px;
}

.axion-form-design--product .elementor-form-fields-wrapper > .elementor-field-group:last-child {
	margin-bottom: 0;
}

.axion-form-design--product .elementor-field-group > .elementor-field-label {
	margin-bottom: 4px;
}

.axion-form-design--product .elementor-field-textual {
	height: 42px;
	padding: 10px 12px;
	border-radius: 8px;
}

.axion-form-design--product textarea.elementor-field-textual {
	height: 102px;   /* rows={4} no original */
	min-height: 102px;
}

.axion-form-design--product .elementor-field-type-submit .elementor-button {
	height: 36px;
}

.axion-form-design--product .elementor-field-type-html {
	margin-top: 16px;
}

/* =====================================================================
 * PRESET: CONTACT PAGE
 * Contact.tsx — space-y-5, gap-4, mb-1.5, px-4 py-3, rounded-xl
 * ==================================================================== */

/* largura total do card, sem teto próprio */
.axion-form-design--contact .elementor-form {
	max-width: none;
}

/* 20px vertical entre grupos; o horizontal (16px) vem do padding da base. */
.axion-form-design--contact .elementor-field-group {
	margin-bottom: 20px;
}

.axion-form-design--contact .elementor-form-fields-wrapper > .elementor-field-group:last-child {
	margin-bottom: 0;
}

.axion-form-design--contact .elementor-field-group > .elementor-field-label {
	margin-bottom: 6px;
}

.axion-form-design--contact .elementor-field-textual {
	height: 46px;
	padding: 12px 16px;
	border-radius: 12px;
}

.axion-form-design--contact textarea.elementor-field-textual {
	height: 126px;
	min-height: 126px;
}

.axion-form-design--contact .elementor-field-type-submit .elementor-button {
	height: 40px;
}

.axion-form-design--contact .elementor-field-type-html {
	margin-top: 20px;
}

/* =====================================================================
 * RESPONSIVO
 *
 * O original quebra os pares em uma coluna abaixo de 640px (breakpoint sm do
 * Tailwind). O Elementor só empilha no seu breakpoint mobile (767px por
 * padrão), então abaixo de 640px forçamos 100% preservando a semântica das
 * classes de largura — nenhuma largura nativa é reescrita acima disso.
 * ==================================================================== */

@media (max-width: 639px) {
	.axion-form-design--product .elementor-form-fields-wrapper > .elementor-field-group.elementor-col-50,
	.axion-form-design--contact .elementor-form-fields-wrapper > .elementor-field-group.elementor-col-50 {
		width: 100%;
		max-width: 100%;
		flex-basis: 100%;
	}
}
