/**
 * Contact 01 — front + editor (tokens del tema).
 * CF7: estilos acotados a la maqueta maqueta-contact-01 (inputs borde blanco, CTA verde).
 */

.mwm-contact-01 {
	position: relative;
	width: 100%;
	padding-block: clamp(2rem, 5vw, 4rem);
	padding-inline: clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
}

.mwm-contact-01__inner {
	max-width: 88rem;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3rem;
}

.mwm-contact-01__header {
	max-width: 38rem;
	width: 100%;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.mwm-contact-01__heading {
	font-family: var(--font-family-2), serif;
	font-size: clamp(2rem, 4.5vw, 3.3125rem);
	line-height: 1.1;
	font-weight: 400;
	color: var(--color-white, #fff);
	margin: 0;
}

.mwm-contact-01__subheading {
	font-family: var(--font-family), sans-serif;
	font-size: var(--fs-16, 1rem);
	line-height: 1.5;
	color: #9ca3af;
	margin: 0;
}

.mwm-contact-01__form-area {
	width: 100%;
	max-width: 38rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.mwm-contact-01__cf7 {
	width: 100%;
}

/* --- CF7 dentro del bloque (paridad maqueta) --- */

.mwm-contact-01 .mwm-contact-01__cf7 form.wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
	max-width: 38rem;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: transparent !important;
	border: none;
	box-shadow: none;
	font-family: var(--font-family), sans-serif;
	color: var(--color-white, #fff);
}

.mwm-contact-01 .mwm-contact-01__cf7 fieldset.hidden-fields-container {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1rem, 3vw, 2.5rem);
	width: 100%;
	align-items: start;
}

@media (max-width: 36rem) {
	.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__cols {
		grid-template-columns: 1fr;
	}
}

/* Ocultar <br> sobrantes tras la rejilla (marcado típico CF7) */
.mwm-contact-01 .mwm-contact-01__cf7 form .wpcf7__cols+br {
	display: none;
}

/* Varias aceptaciones en el mismo <p> */
.mwm-contact-01 .mwm-contact-01__cf7 form p:has(label ~ label) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.mwm-contact-01 .mwm-contact-01__cf7 form p:has(label ~ label) br {
	display: none;
}

.mwm-contact-01 .mwm-contact-01__cf7 p {
	margin: 0;
	padding: 0;
	line-height: 1.5;
	color: inherit;
}

/* Solo campos de texto ocupan todo el ancho; acceptance/checkbox no */
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap {
	display: block;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap:has(input[type="text"]),
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap:has(input[type="email"]),
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap:has(textarea) {
	width: 100%;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap:has(input[type="checkbox"]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	flex-shrink: 0;
	vertical-align: top;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap:has(input[type="checkbox"]) .wpcf7-list-item {
	margin: 0;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap input[type="text"],
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap input[type="email"],
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap textarea {
	appearance: none;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0.8125rem 0.6875rem;
	min-height: 2.875rem;
	border-radius: 16px;
	border: 1px solid var(--color-white, #fff);
	background: transparent;
	color: var(--color-white, #fff);
	font-family: inherit;
	font-size: 0.875rem;
	line-height: 1.25rem;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap textarea {
	min-height: 5.75rem;
	resize: vertical;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap input::placeholder,
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap textarea::placeholder {
	color: rgba(255, 255, 255, 0.6);
	opacity: 1;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap input:focus,
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-form-control-wrap textarea:focus {
	outline: none;
	border-color: var(--color-green, #00ce7c);
	box-shadow: 0 0 0 1px var(--color-green, #00ce7c);
}

/* Bloque legal */
.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	font-size: var(--fs-14, 0.875rem);
	line-height: 1.45;
	color: #9ca3af;
}

.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal li {
	margin: 0;
	padding: 0;
}

.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal p {
	margin: 0;
	color: inherit;
}

.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal strong {
	color: rgba(255, 255, 255, 0.95);
	font-weight: 700;
}

.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal a {
	color: var(--color-green, #00ce7c);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mwm-contact-01 .mwm-contact-01__cf7 ul.form-legal a:hover {
	color: var(--color-white, #fff);
}

/* Aceptaciones / privacidad (.legal en CF7) — mismo tono que texto legal maqueta */
.mwm-contact-01 .mwm-contact-01__cf7 .legal {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	width: 100%;
	padding-block: 0.25rem 0;
	font-size: var(--fs-14, 0.875rem);
	line-height: 1.5;
	color: #9ca3af;
}

.mwm-contact-01 .mwm-contact-01__cf7 .legal>p {
	margin: 0;
	padding: 0;
	width: 100%;
}

.mwm-contact-01 .mwm-contact-01__cf7 .legal label {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	column-gap: 0.75rem;
	row-gap: 0.25rem;
	width: 100%;
	max-width: 100%;
	margin: 0;
	font-size: inherit;
	line-height: 1.5;
	font-weight: 400;
	color: #d1d5db;
	cursor: pointer;
	hyphens: auto;
}

/* El wrapper del checkbox no fuerza salto de línea */
.mwm-contact-01 .mwm-contact-01__cf7 .legal label>.wpcf7-form-control-wrap {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.mwm-contact-01 .mwm-contact-01__cf7 label br {
	display: none;
}

/*
 * Checkbox visible sobre fondo negro (acceptance CF7 del bloque).
 */
.mwm-contact-01 .mwm-contact-01__cf7 input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: 1.125rem;
	height: 1.125rem;
	min-width: 1.125rem;
	min-height: 1.125rem;
	margin: 0;
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.65rem auto;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		box-shadow 0.15s ease;
}

.mwm-contact-01 .mwm-contact-01__cf7 input[type="checkbox"]:hover {
	border-color: var(--color-white, #fff);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.mwm-contact-01 .mwm-contact-01__cf7 input[type="checkbox"]:focus-visible {
	outline: none;
	border-color: var(--color-green, #00ce7c);
	box-shadow: 0 0 0 2px rgba(0, 206, 124, 0.45);
}

.mwm-contact-01 .mwm-contact-01__cf7 input[type="checkbox"]:checked {
	border-color: var(--color-green, #00ce7c);
	background-color: var(--color-green, #00ce7c);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.mwm-contact-01 .mwm-contact-01__cf7 input[type="checkbox"]:not(:checked) {
	background-image: none;
}

.mwm-contact-01 .mwm-contact-01__cf7 .legal label a {
	color: var(--color-green, #00ce7c);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mwm-contact-01 .mwm-contact-01__cf7 .legal label a:hover {
	color: var(--color-white, #fff);
}

/* Labels con checkbox (incl. fuera de .legal) */
.mwm-contact-01 .mwm-contact-01__cf7 form label {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	width: 100%;
	max-width: 100%;
	font-size: var(--fs-14, 0.875rem);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
}

.mwm-contact-01 .mwm-contact-01__cf7 form label .wpcf7-form-control-wrap:has(input[type="checkbox"]) {
	margin-top: 0.2rem;
}

.mwm-contact-01 .mwm-contact-01__cf7 form label a {
	color: var(--color-green, #00ce7c);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mwm-contact-01 .mwm-contact-01__cf7 form label a:hover {
	color: var(--color-white, #fff);
}

/* Respuesta CF7 */
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-response-output {
	margin: 0;
	padding: 0.75rem;
	border-radius: 12px;
	border-width: 1px;
	font-size: var(--fs-14, 0.875rem);
}

.mwm-contact-01 .mwm-contact-01__cf7 form.sent .wpcf7-response-output {
	border-color: var(--color-green, #00ce7c);
	color: var(--color-green, #00ce7c);
	background: rgba(0, 206, 124, 0.08);
}

.mwm-contact-01 .mwm-contact-01__cf7 form.invalid .wpcf7-response-output,
.mwm-contact-01 .mwm-contact-01__cf7 form.failed .wpcf7-response-output {
	border-color: var(--color-red, #d20a11);
	color: #fecaca;
	background: rgba(210, 10, 17, 0.12);
}

/* Botón enviar (maqueta: verde, mayúsculas, radius 16) */
.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__btn {
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;

	& span.wpcf7-spinner {
		display: none;
	}
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__btn input[type="submit"] {
	appearance: none;
	cursor: pointer;
	margin: 0;
	padding: 0.75rem 2rem;
	min-height: 2.75rem;
	border: none;
	border-radius: 16px;
	background: var(--color-green, #00ce7c);
	color: var(--color-white, #fff);
	font-family: var(--font-family), sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition:
		background 0.15s ease,
		opacity 0.15s ease;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__btn input[type="submit"]:hover:not(:disabled) {
	filter: brightness(0.92);
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__btn input[type="submit"]:focus-visible {
	outline: 2px solid var(--color-white, #fff);
	outline-offset: 3px;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7__btn input[type="submit"]:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-spinner {
	margin-inline-start: 0.25rem;
}

.mwm-contact-01 .mwm-contact-01__cf7 .wpcf7-not-valid-tip {
	color: #fecaca;
	font-size: var(--fs-12, 0.75rem);
	margin-top: 0.35rem;
}

/* WP Armour / honeypot: no estilizar como campos principales */
.mwm-contact-01 .mwm-contact-01__cf7 .altEmail_container,
.mwm-contact-01 .mwm-contact-01__cf7 .wpa_hidden_field {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Placeholder solo relevante en editor */
.editor-styles-wrapper .mwm-contact-01__cf7-placeholder {
	border: 1px dashed rgba(255, 255, 255, 0.35);
	padding: 1rem;
	color: rgba(255, 255, 255, 0.75);
	box-sizing: border-box;
	width: 100%;
	font-size: var(--fs-16, 1rem);
	line-height: 1.5;
	word-break: break-word;
}

.editor-styles-wrapper .mwm-contact-01__cf7-placeholder code {
	font-size: 0.875em;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.08);
	padding: 0.125rem 0.375rem;
	border-radius: 2px;
}

/* Solo editor: fondo negro (frontend ya usa body oscuro). */
.editor-styles-wrapper .wp-block-mwm-contact-01 {
	box-sizing: border-box;
	background-color: var(--color-black, #000);
}