/**
 * Contactanos (/contactanos/): formulario CF7 centrado estilo LATAMSQUAD.
 *
 * - Oculta el entry-title "Contactanos"
 * - Compacto (sin br/margenes grandes de CF7)
 * - Inputs negro semitransparente redondeados
 * - ENVIAR = pastilla naranja como DONAR
 */

/* Quita el H1 de la pagina (queda solo "Formulario de Contacto"). */
body.page-id-20279 h1.entry-title,
body.page-contactanos h1.entry-title {
	display: none !important;
}

/* Menos aire entre header sticky y el titulo del formulario. */
body.page-id-20279 .site-main,
body.page-contactanos .site-main {
	max-width: 520px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding: 0.15rem var(--ls-content-gutter, 16px) 1.75rem;
	box-sizing: border-box;
}

body.page-id-20279 .page-content,
body.page-contactanos .page-content {
	text-align: center;
}

/* Titulo "Formulario de Contacto". */
body.page-id-20279 .page-content > h1,
body.page-contactanos .page-content > h1 {
	margin: 0.15rem 0 0.75rem;
	padding: 0;
	color: #ffffff;
	font-family: var(--ls-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	font-size: clamp(1.35rem, 3.2vw, 1.75rem);
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.15;
	text-transform: uppercase;
	text-align: center;
}

body.page-id-20279 .page-content > h1 strong,
body.page-contactanos .page-content > h1 strong {
	font-weight: 700;
}

body.page-id-20279 .wpcf7,
body.page-contactanos .wpcf7 {
	max-width: 440px;
	margin: 0 auto;
	text-align: center;
}

body.page-id-20279 .wpcf7 form,
body.page-contactanos .wpcf7 form {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 0;
	text-align: center;
}

/* Los <br> del editor CF7 inflaban todo el formulario. */
body.page-id-20279 .wpcf7 br,
body.page-contactanos .wpcf7 br {
	display: none !important;
}

body.page-id-20279 .wpcf7 p,
body.page-contactanos .wpcf7 p {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 0 0 0.65rem;
	padding: 0;
	text-align: center;
	line-height: 1.25;
}

body.page-id-20279 .wpcf7 p:last-of-type,
body.page-contactanos .wpcf7 p:last-of-type {
	margin-bottom: 0;
}

body.page-id-20279 .wpcf7 label.ls-campo,
body.page-id-20279 .wpcf7 label,
body.page-contactanos .wpcf7 label.ls-campo,
body.page-contactanos .wpcf7 label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	width: 100%;
	margin: 0;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

body.page-id-20279 .wpcf7 .ls-campo__rotulo,
body.page-contactanos .wpcf7 .ls-campo__rotulo {
	display: block;
	width: 100%;
	color: #ffffff;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-align: center;
}

/* Wrap a ancho completo; redimensionable con el mouse (esquina inferior). */
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap,
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 3.75rem;
	margin: 0 auto;
	text-align: center;
	box-sizing: border-box;
}

/* Solo campos de texto: handle de resize en el wrap (no en Turnstile/hidden). */
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(input[type="text"]),
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(input[type="email"]),
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(input[type="tel"]),
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(input[type="url"]),
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(textarea),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(input[type="text"]),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(input[type="email"]),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(input[type="tel"]),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(input[type="url"]),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(textarea) {
	/* resize solo funciona si overflow no es visible. */
	overflow: auto;
	resize: vertical;
}

/* Wrap del mensaje: mas alto de entrada; arrastre vertical y horizontal. */
body.page-id-20279 .wpcf7 .wpcf7-form-control-wrap:has(textarea),
body.page-contactanos .wpcf7 .wpcf7-form-control-wrap:has(textarea) {
	min-height: 9rem;
	resize: both;
	max-width: 100%;
}

/* Campos editables: negro semitransparente + redondeado (mas altos). */
body.page-id-20279 .wpcf7 input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.page-id-20279 .wpcf7 textarea.wpcf7-form-control,
body.page-contactanos .wpcf7 input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.page-contactanos .wpcf7 textarea.wpcf7-form-control {
	display: block;
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
	/* Llenan el wrap para que al arrastrar el wrap crezcan juntos. */
	min-height: 3.75rem;
	height: 100%;
	padding: 1rem 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.55) !important;
	color: #ffffff !important;
	font-family: var(--ls-font-body, "Source Sans 3", "Segoe UI", sans-serif);
	font-size: 1rem;
	line-height: 1.4;
	/* Escritura LTR normal: el texto no debe arrancar desde el centro. */
	text-align: left;
	box-shadow: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	/* El handle de resize va en el wrap, no en el campo. */
	resize: none;
}

body.page-id-20279 .wpcf7 textarea.wpcf7-form-control,
body.page-contactanos .wpcf7 textarea.wpcf7-form-control {
	/* Sin height fijo: el wrap arrastrable define el alto. */
	min-height: 9rem !important;
	height: 100% !important;
	max-height: none;
	overflow: auto;
}

body.page-id-20279 .wpcf7 input.wpcf7-form-control::placeholder,
body.page-id-20279 .wpcf7 textarea.wpcf7-form-control::placeholder,
body.page-contactanos .wpcf7 input.wpcf7-form-control::placeholder,
body.page-contactanos .wpcf7 textarea.wpcf7-form-control::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

body.page-id-20279 .wpcf7 input.wpcf7-form-control:focus,
body.page-id-20279 .wpcf7 textarea.wpcf7-form-control:focus,
body.page-contactanos .wpcf7 input.wpcf7-form-control:focus,
body.page-contactanos .wpcf7 textarea.wpcf7-form-control:focus {
	border-color: var(--ls-brand, #f89b1c);
	background: rgba(0, 0, 0, 0.72) !important;
}

/* Autofill: mantener oscuro. */
body.page-id-20279 .wpcf7 input.wpcf7-form-control:-webkit-autofill,
body.page-id-20279 .wpcf7 input.wpcf7-form-control:-webkit-autofill:hover,
body.page-id-20279 .wpcf7 input.wpcf7-form-control:-webkit-autofill:focus,
body.page-contactanos .wpcf7 input.wpcf7-form-control:-webkit-autofill,
body.page-contactanos .wpcf7 input.wpcf7-form-control:-webkit-autofill:hover,
body.page-contactanos .wpcf7 input.wpcf7-form-control:-webkit-autofill:focus {
	-webkit-text-fill-color: #ffffff;
	caret-color: #ffffff;
	transition: background-color 99999s ease-out;
	box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.55) inset;
}

/* Turnstile: forzar centro (el widget CF es ~300px y se iba a la izquierda). */
body.page-id-20279 .ls-cf7-turnstile,
body.page-contactanos .ls-cf7-turnstile {
	display: flex !important;
	flex-direction: row;
	justify-content: center !important;
	align-items: center;
	width: 100% !important;
	margin: 0.35rem 0 0.55rem;
}

body.page-id-20279 .ls-cf7-turnstile .wpcf7-turnstile,
body.page-id-20279 .ls-cf7-turnstile .cf-turnstile,
body.page-contactanos .ls-cf7-turnstile .wpcf7-turnstile,
body.page-contactanos .ls-cf7-turnstile .cf-turnstile {
	display: flex !important;
	justify-content: center !important;
	margin-left: auto !important;
	margin-right: auto !important;
	width: auto !important;
	max-width: 100%;
}

body.page-id-20279 .ls-cf7-turnstile iframe,
body.page-contactanos .ls-cf7-turnstile iframe {
	display: block !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ENVIAR: centrado real; el spinner CF7 no debe empujar el boton. */
body.page-id-20279 .wpcf7 p:has(> input[type="submit"]),
body.page-contactanos .wpcf7 p:has(> input[type="submit"]) {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	position: relative;
	gap: 0;
	width: 100%;
}

body.page-id-20279 .wpcf7 input[type="submit"],
body.page-id-20279 .wpcf7 .wpcf7-submit,
body.page-contactanos .wpcf7 input[type="submit"],
body.page-contactanos .wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 0.45rem 1.5rem !important;
	margin: 0.15rem 0 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--ls-brand, #f89b1c) !important;
	color: #ffffff !important;
	font-family: var(--ls-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	font-size: 0.95rem !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background 0.15s ease, filter 0.15s ease;
}

/* Spinner fuera del flujo: visibility:hidden igual ocupa ~24px y desalineaba ENVIAR. */
body.page-id-20279 .wpcf7 .wpcf7-spinner,
body.page-contactanos .wpcf7 .wpcf7-spinner {
	position: absolute;
	left: 50%;
	top: 50%;
	/* A la derecha del boton centrado, sin moverlo. */
	transform: translate(3.4rem, -50%);
	margin: 0 !important;
	pointer-events: none;
}

body.page-id-20279 .wpcf7 input[type="submit"]:hover,
body.page-id-20279 .wpcf7 input[type="submit"]:focus-visible,
body.page-id-20279 .wpcf7 .wpcf7-submit:hover,
body.page-id-20279 .wpcf7 .wpcf7-submit:focus-visible,
body.page-contactanos .wpcf7 input[type="submit"]:hover,
body.page-contactanos .wpcf7 input[type="submit"]:focus-visible,
body.page-contactanos .wpcf7 .wpcf7-submit:hover,
body.page-contactanos .wpcf7 .wpcf7-submit:focus-visible {
	background: var(--ls-brand-hot, #f86511) !important;
	color: #ffffff !important;
	filter: brightness(1.05);
}

/* Aviso CF7: oculto en init (el display:block mostraba el borde celeste vacio). */
body.page-id-20279 .wpcf7 .wpcf7-response-output,
body.page-contactanos .wpcf7 .wpcf7-response-output {
	display: none;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0.65rem auto 0;
	padding: 0.65rem 1rem;
	border-radius: 10px;
	border-width: 2px;
	border-style: solid;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	text-align: center;
}

body.page-id-20279 .wpcf7 form.sent .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.failed .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.aborted .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.spam .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.invalid .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.unaccepted .wpcf7-response-output,
body.page-contactanos .wpcf7 form.sent .wpcf7-response-output,
body.page-contactanos .wpcf7 form.failed .wpcf7-response-output,
body.page-contactanos .wpcf7 form.aborted .wpcf7-response-output,
body.page-contactanos .wpcf7 form.spam .wpcf7-response-output,
body.page-contactanos .wpcf7 form.invalid .wpcf7-response-output,
body.page-contactanos .wpcf7 form.unaccepted .wpcf7-response-output {
	display: block;
}

body.page-id-20279 .wpcf7 form.sent .wpcf7-response-output,
body.page-contactanos .wpcf7 form.sent .wpcf7-response-output {
	border-color: #46b450;
}

body.page-id-20279 .wpcf7 form.failed .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.aborted .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.spam .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.invalid .wpcf7-response-output,
body.page-id-20279 .wpcf7 form.unaccepted .wpcf7-response-output,
body.page-contactanos .wpcf7 form.failed .wpcf7-response-output,
body.page-contactanos .wpcf7 form.aborted .wpcf7-response-output,
body.page-contactanos .wpcf7 form.spam .wpcf7-response-output,
body.page-contactanos .wpcf7 form.invalid .wpcf7-response-output,
body.page-contactanos .wpcf7 form.unaccepted .wpcf7-response-output {
	border-color: #dc3232;
}

@media (max-width: 600px) {
	body.page-id-20279 .site-main,
	body.page-contactanos .site-main {
		max-width: 100%;
		padding-top: 0.1rem;
	}
}
