/**
 * Contact Form 7 — tema «Hablemos» (contenedores div.c7-* en el HTML del formulario).
 * Envolver el shortcode: <div class="aj-cf7-hablemos">…</div>
 */

.aj-cf7-hablemos .wpcf7 {
	color: #0f0f0f !important;
}

.aj-cf7-hablemos .wpcf7-form {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	gap: 16px !important;
	margin: 0 !important;
	width: 100% !important;
	max-width: 680px !important;
}

.aj-cf7-hablemos .wpcf7-form p {
	margin: 0 !important;
}

/* Filas CF7 por defecto (<p> hijos directos del form): ancho completo en el flex del formulario */
.aj-cf7-hablemos .wpcf7-form > p {
	flex: 1 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
}

.aj-cf7-hablemos .c7-txt,
.aj-cf7-hablemos .c7-i100,
.aj-cf7-hablemos .c7-i50,
.aj-cf7-hablemos .c7-btn,
.aj-cf7-hablemos .c7-recaptcha {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	box-sizing: border-box !important;
}

.aj-cf7-hablemos p.c7-txt,
.aj-cf7-hablemos .c7-txt {
	flex: 1 0 100% !important;
	width: 100% !important;
	margin: 0 0 4px !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 16px !important;
	line-height: 1.22 !important;
	color: #0f0f0f !important;
}

/* Aviso reCAPTCHA / Google (texto añadido en CF7 bajo «Enviar») */
.aj-cf7-hablemos p.c7-recaptcha,
.aj-cf7-hablemos .c7-recaptcha {
	flex: 1 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 12px 0 0 !important;
	padding: 0 !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	color: #0f0f0f !important;
	text-align: center !important;
}

.aj-cf7-hablemos .c7-recaptcha a {
	color: #0f0f0f !important;
	text-decoration: underline !important;
	text-underline-offset: 0.15em !important;
}

.aj-cf7-hablemos .c7-i100 {
	flex: 1 0 100% !important;
	width: 100% !important;
	min-width: 0 !important;
}

.aj-cf7-hablemos .c7-i50 {
	flex: 1 1 100% !important;
	width: 100% !important;
	min-width: 0 !important;
}

@media (min-width: 560px) {
	.aj-cf7-hablemos .c7-i50 {
		flex: 1 1 calc(50% - 8px) !important;
		max-width: calc(50% - 8px) !important;
	}
}

.aj-cf7-hablemos .c7-btn {
	display: flex !important;
	flex: 1 0 100% !important;
	width: 100% !important;
	justify-content: center !important;
}

.aj-cf7-hablemos .c7-row {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 16px !important;
	flex: 1 0 100% !important;
	width: 100% !important;
}

@media (min-width: 560px) {
	.aj-cf7-hablemos .c7-row {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

.aj-cf7-hablemos .c7-row > p {
	margin: 0 !important;
}

.aj-cf7-hablemos .wpcf7-form-control-wrap {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
}

.aj-cf7-hablemos .c7-i100 input.wpcf7-form-control,
.aj-cf7-hablemos .c7-i50 input.wpcf7-form-control,
.aj-cf7-hablemos .c7-i100 input[type="text"],
.aj-cf7-hablemos .c7-i50 input[type="text"],
.aj-cf7-hablemos .c7-i50 input[type="tel"],
.aj-cf7-hablemos .c7-i50 input[type="email"],
.aj-cf7-hablemos .c7-i100 textarea.wpcf7-form-control,
.aj-cf7-hablemos .c7-i100 textarea {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 16px 20px !important;
	border-radius: 6px !important;
	border: 1px solid #0f0f0f !important;
	background: #e6f1ff !important;
	background-color: #e6f1ff !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #0f0f0f !important;
	min-height: 55px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
	transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.aj-cf7-hablemos .c7-i100 textarea.wpcf7-form-control,
.aj-cf7-hablemos .c7-i100 textarea {
	min-height: 139px !important;
	height: auto !important;
	resize: vertical !important;
	vertical-align: top !important;
}

.aj-cf7-hablemos .c7-i100 input::placeholder,
.aj-cf7-hablemos .c7-i50 input::placeholder,
.aj-cf7-hablemos .c7-i100 textarea::placeholder {
	color: rgba(0, 0, 0, 0.4) !important;
	opacity: 1 !important;
}

.aj-cf7-hablemos .c7-i100 input:focus,
.aj-cf7-hablemos .c7-i50 input:focus,
.aj-cf7-hablemos .c7-i100 textarea:focus {
	outline: none !important;
	border-color: #0f0f0f !important;
	box-shadow: 0 0 0 2px rgba(15, 15, 15, 0.15) !important;
}

.aj-cf7-hablemos input.c7-i100.wpcf7-form-control,
.aj-cf7-hablemos input.c7-i50.wpcf7-form-control,
.aj-cf7-hablemos textarea.c7-i100.wpcf7-form-control,
.aj-cf7-hablemos .wpcf7-form-control-wrap input.c7-i100,
.aj-cf7-hablemos .wpcf7-form-control-wrap input.c7-i50,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea.c7-i100 {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 16px 20px !important;
	border-radius: 6px !important;
	border: 1px solid #0f0f0f !important;
	background: #e6f1ff !important;
	background-color: #e6f1ff !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #0f0f0f !important;
	min-height: 55px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
	transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.aj-cf7-hablemos textarea.c7-i100.wpcf7-form-control,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea.c7-i100 {
	min-height: 139px !important;
	height: auto !important;
	resize: vertical !important;
	vertical-align: top !important;
}

.aj-cf7-hablemos input.c7-i100::placeholder,
.aj-cf7-hablemos input.c7-i50::placeholder,
.aj-cf7-hablemos textarea.c7-i100::placeholder {
	color: rgba(0, 0, 0, 0.4) !important;
	opacity: 1 !important;
}

.aj-cf7-hablemos input.c7-i100:focus,
.aj-cf7-hablemos input.c7-i50:focus,
.aj-cf7-hablemos textarea.c7-i100:focus {
	outline: none !important;
	border-color: #0f0f0f !important;
	box-shadow: 0 0 0 2px rgba(15, 15, 15, 0.15) !important;
}

.aj-cf7-hablemos input.wpcf7-not-valid,
.aj-cf7-hablemos textarea.wpcf7-not-valid {
	border-color: #b42318 !important;
}

.aj-cf7-hablemos .wpcf7-not-valid-tip {
	font-family: "Archivo", system-ui, sans-serif !important;
	font-size: 13px !important;
	color: #b42318 !important;
	margin-top: 6px !important;
}

.aj-cf7-hablemos .c7-btn input.wpcf7-submit,
.aj-cf7-hablemos .c7-btn input[type="submit"],
.aj-cf7-hablemos input.c7-btn.wpcf7-submit,
.aj-cf7-hablemos input[type="submit"].c7-btn,
.aj-cf7-hablemos input.wpcf7-submit.c7-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	max-width: none !important;
	min-width: 180px !important;
	min-height: 45px !important;
	margin: 8px 0 0 !important;
	padding: 12px 24px !important;
	border: none !important;
	border-radius: 20px !important;
	background: #0f0f0f !important;
	background-color: #0f0f0f !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 600 !important;
	font-size: 16px !important;
	line-height: 1.25 !important;
	color: #efef25 !important;
	cursor: pointer !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

@media (max-width: 767px) {
	.aj-cf7-hablemos .c7-btn input.wpcf7-submit,
	.aj-cf7-hablemos .c7-btn input[type="submit"],
	.aj-cf7-hablemos input.c7-btn.wpcf7-submit,
	.aj-cf7-hablemos input[type="submit"].c7-btn,
	.aj-cf7-hablemos input.wpcf7-submit.c7-btn {
		width: 100% !important;
		max-width: 100% !important;
	}
}

.aj-cf7-hablemos .c7-btn input.wpcf7-submit:hover,
.aj-cf7-hablemos .c7-btn input[type="submit"]:hover,
.aj-cf7-hablemos input.c7-btn.wpcf7-submit:hover,
.aj-cf7-hablemos input[type="submit"].c7-btn:hover,
.aj-cf7-hablemos input.wpcf7-submit.c7-btn:hover {
	background: #efef25 !important;
	color: #000 !important;
	border: solid 1px #000 !important;
}

.aj-cf7-hablemos .c7-btn input.wpcf7-submit:focus-visible,
.aj-cf7-hablemos .c7-btn input[type="submit"]:focus-visible,
.aj-cf7-hablemos input.c7-btn.wpcf7-submit:focus-visible,
.aj-cf7-hablemos input[type="submit"].c7-btn:focus-visible,
.aj-cf7-hablemos input.wpcf7-submit.c7-btn:focus-visible {
	outline: 2px solid #0f0f0f !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 2px #efef25 !important;
}

.aj-cf7-hablemos .wpcf7-spinner {
	margin-left: 12px !important;
}

/* Integración Contact → reCAPTCHA / Turnstile: widget visible si el proveedor lo inserta */
.aj-cf7-hablemos .wpcf7-recaptcha,
.aj-cf7-hablemos .wpcf7-turnstile {
	margin-top: 12px !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.aj-cf7-hablemos .wpcf7-response-output {
	margin: 16px 0 0 !important;
	padding: 12px 16px !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-radius: 6px !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-size: 14px !important;
	width: 100% !important;
	text-align: center !important;
}

/*
 * Éxito CF7: el modal sustituye el aviso inline.
 * CF7 marca el formulario con `form.sent` y aplica `border-color: #46b450` al `.wpcf7-response-output`;
 * sin `form.sent` en el selector puede quedar un recuadro vacío con borde verde.
 */
.aj-cf7-hablemos form.sent .wpcf7-response-output,
.aj-cf7-hablemos .wpcf7-response-output.wpcf7-mail-sent-ok {
	display: none !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
}

/*
 * Validación / aceptación: ocultar el resumen de CF7 («Uno o más campos tienen un error…», etc.).
 * Los errores por campo siguen en `.wpcf7-not-valid-tip`.
 */
.aj-cf7-hablemos form.invalid .wpcf7-response-output,
.aj-cf7-hablemos form.unaccepted .wpcf7-response-output,
.aj-cf7-hablemos .wpcf7-response-output.wpcf7-validation-errors,
.aj-cf7-hablemos .wpcf7-response-output.wpcf7-acceptance-missing {
	display: none !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
}

/* —— Modal de confirmación (Figma: Pop Up confirmación) —— */
body.aj-cf7-success-modal-open {
	overflow: hidden;
}

.aj-cf7-success-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	font-family: "Archivo", system-ui, sans-serif;
}

.aj-cf7-success-modal:not([hidden]) {
	display: flex;
}

.aj-cf7-success-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 15, 15, 0.55);
	cursor: pointer;
}

.aj-cf7-success-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	margin: auto;
	padding: 48px 40px 40px;
	box-sizing: border-box;
	background: #0f0f0f;
	border-radius: 20px;
	text-align: center;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.aj-cf7-success-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	color: #fff;
}

.aj-cf7-success-modal__close:hover {
	opacity: 0.85;
}

.aj-cf7-success-modal__close:focus-visible {
	outline: 2px solid #efef25;
	outline-offset: 2px;
}

.aj-cf7-success-modal__close-svg {
	display: block;
}

.aj-cf7-success-modal__title {
	margin: 0 0 16px;
	padding: 0 36px;
	font-weight: 600;
	font-size: 25px;
	line-height: 1.2;
	color: #fff;
	letter-spacing: -0.02em;
}

.aj-cf7-success-modal__text {
	margin: 0 auto 40px;
	max-width: 417px;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.3;
	color: #fff;
}

.aj-cf7-success-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	min-height: 45px;
	padding: 12px 24px;
	box-sizing: border-box;
	border: 1px solid #efef25;
	border-radius: 20px;
	background: transparent;
	font-family: inherit;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #efef25;
	cursor: pointer;
}

.aj-cf7-success-modal__btn:hover {
	background: rgba(239, 239, 37, 0.08);
}

.aj-cf7-success-modal__btn:focus-visible {
	outline: 2px solid #efef25;
	outline-offset: 3px;
}

@media (max-width: 479px) {
	.aj-cf7-success-modal__panel {
		padding: 44px 24px 32px;
	}

	.aj-cf7-success-modal__title {
		font-size: 22px;
		padding: 0 28px;
	}

	.aj-cf7-success-modal__text {
		font-size: 16px;
		margin-bottom: 32px;
	}
}

/*
 * Fallback: Contact Form 7 por defecto (campos en <p> + .wpcf7-form-control-wrap)
 * sin contenedores .c7-i100 / .c7-i50. Mismos tokens que el diseño «Hablemos».
 */
.aj-cf7-hablemos .wpcf7-form-control-wrap input.wpcf7-text,
.aj-cf7-hablemos .wpcf7-form-control-wrap input.wpcf7-email,
.aj-cf7-hablemos .wpcf7-form-control-wrap input.wpcf7-url,
.aj-cf7-hablemos .wpcf7-form-control-wrap input.wpcf7-tel,
.aj-cf7-hablemos .wpcf7-form-control-wrap input[type="text"],
.aj-cf7-hablemos .wpcf7-form-control-wrap input[type="email"],
.aj-cf7-hablemos .wpcf7-form-control-wrap input[type="tel"],
.aj-cf7-hablemos .wpcf7-form-control-wrap input[type="url"],
.aj-cf7-hablemos .wpcf7-form-control-wrap input.wpcf7-form-control:not(.wpcf7-submit):not([type="submit"]),
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea.wpcf7-textarea,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 16px 20px !important;
	border-radius: 6px !important;
	border: 1px solid #0f0f0f !important;
	background: #e6f1ff !important;
	background-color: #e6f1ff !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #0f0f0f !important;
	min-height: 55px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
	transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.aj-cf7-hablemos .wpcf7-form-control-wrap textarea.wpcf7-textarea,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea {
	min-height: 139px !important;
	height: auto !important;
	resize: vertical !important;
	vertical-align: top !important;
}

.aj-cf7-hablemos .wpcf7-form-control-wrap input::placeholder,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea::placeholder {
	color: rgba(0, 0, 0, 0.4) !important;
	opacity: 1 !important;
}

.aj-cf7-hablemos .wpcf7-form-control-wrap input:focus,
.aj-cf7-hablemos .wpcf7-form-control-wrap textarea:focus {
	outline: none !important;
	border-color: #0f0f0f !important;
	box-shadow: 0 0 0 2px rgba(15, 15, 15, 0.15) !important;
}

.aj-cf7-hablemos .wpcf7-form input.wpcf7-submit,
.aj-cf7-hablemos .wpcf7-form input[type="submit"].wpcf7-submit {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	max-width: none !important;
	min-width: 180px !important;
	min-height: 45px !important;
	margin: 8px 0 0 !important;
	padding: 12px 24px !important;
	border: none !important;
	border-radius: 20px !important;
	background: #0f0f0f !important;
	background-color: #0f0f0f !important;
	font-family: "Archivo", system-ui, sans-serif !important;
	font-weight: 600 !important;
	font-size: 16px !important;
	line-height: 1.25 !important;
	color: #efef25 !important;
	cursor: pointer !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	box-shadow: none !important;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.aj-cf7-hablemos .wpcf7-form input.wpcf7-submit:hover,
.aj-cf7-hablemos .wpcf7-form input[type="submit"].wpcf7-submit:hover {
	background: #efef25 !important;
	color: #000 !important;
	border: solid 1px #000 !important;
}

.aj-cf7-hablemos .wpcf7-form input.wpcf7-submit:focus-visible,
.aj-cf7-hablemos .wpcf7-form input[type="submit"].wpcf7-submit:focus-visible {
	outline: 2px solid #0f0f0f !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 2px #efef25 !important;
}

@media (max-width: 767px) {
	.aj-cf7-hablemos .wpcf7-form input.wpcf7-submit,
	.aj-cf7-hablemos .wpcf7-form input[type="submit"].wpcf7-submit {
		width: 100% !important;
		max-width: 100% !important;
	}
}
