/**
 * caramba-moreno-forms — CSS FUNCIONAL MINIMO.
 *
 * Regla dura (Mauricio): estilos minimos y heredados. Aqui NO hay colores, tipografias,
 * bordes ni sombras de branding — todo eso lo hereda el tema. Solo estructura/espaciado
 * funcional y foco accesible, con tokens de theme.json (var(--wp--preset--*)). Sin !important.
 */

/* Contenedor: el <form> ya recibe las clases de layout/spacing del soporte de bloque. */
.cmf-form {
	/* Separacion vertical entre campos = el blockGap del tema (fallback a spacing 40). */
	--cmf-gap: var( --wp--style--block-gap, var( --wp--preset--spacing--40, 1.2rem ) );
}

/* Cada campo apila su etiqueta sobre el control. */
.cmf-field {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	margin-block-end: var( --cmf-gap );
}

/* Etiqueta SIEMPRE visible (nunca font-size:0). Hereda tipografia/color del tema. */
.cmf-field__labelwrap {
	display: inline-flex;
	align-items: baseline;
	gap: 0.15em;
}

.cmf-field__label {
	font-weight: 600;
}

/* Marca de obligatorio, decorativa. */
.cmf-req {
	opacity: 0.7;
}

/* Controles: heredan tipografia/color; solo damos caja usable y ancho fluido. */
.cmf-input {
	width: 100%;
	max-width: 100%;
	padding: 0.5em 0.7em;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: var( --wp--custom--form--border-radius, 4px );
	box-sizing: border-box;
}

.cmf-input:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* El boton hereda del tema via wp-element-button; aqui solo su tipo submit funcional. */
.cmf-submit-wrap {
	margin-block-start: var( --cmf-gap );
}

.cmf-submit {
	cursor: pointer;
	font: inherit;
}

/* Campo de archivo: usa la misma caja que los demas controles; solo ajustamos el cursor. */
.cmf-field input[type="file"].cmf-file {
	cursor: pointer;
}

/* Espacio para el widget de CAPTCHA (Turnstile), cuando esta activo. */
.cmf-turnstile {
	margin-block: var( --cmf-gap );
}

/* Zona de estado del envio (exito/error), anunciada por aria-live. Neutra: el mensaje comunica
   el resultado; sin color de marca (semantica de color = backlog). Vacia = oculta. */
.cmf-status:empty {
	display: none;
}

.cmf-status {
	margin-block-start: var( --cmf-gap );
	padding: 0.6em 0.8em;
	border: 1px solid currentColor;
	border-radius: var( --wp--custom--form--border-radius, 4px );
	font: inherit;
	font-weight: 600;
}

/* Campo trampa del honeypot: fuera de flujo y de la vista (defensa, no visible). */
.cmf-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
