/* Formularios adaptables: contacto, registro, acceso y foro.
   Móvil primero: etiqueta encima, campo a todo el ancho, 16px (evita el zoom de iPhone) y botones táctiles. */

/* ---- Contacto (Simple Basic Contact Form) ---- */
body.aep-el #simple-contact-form-wrap { max-width: 720px; margin: 0 auto; padding: 0 4px; }
body.aep-el #simple-contact-form .scf-row { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 16px; }
body.aep-el #simple-contact-form .scf-row label { float: none; display: block; width: 100%; margin: 0 0 6px; text-align: left; font-weight: 600; }
body.aep-el #simple-contact-form .scf-row input,
body.aep-el #simple-contact-form .scf-row textarea { float: none; display: block; width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }
body.aep-el #simple-contact-form .scf-confirm-checkbox { margin: 0 0 18px; }
body.aep-el #simple-contact-form .scf-confirm-checkbox label { display: flex; gap: 10px; align-items: flex-start; width: 100%; float: none; line-height: 1.45; cursor: pointer; }
body.aep-el #simple-contact-form .scf-submit { clear: both; margin: 0; }
body.aep-el #simple-contact-form p { margin: 0 0 14px; }

/* ---- Registro, acceso, contraseña y respuestas del foro (bbPress) ---- */
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form { box-sizing: border-box; width: 100%; max-width: 560px; margin: 0 auto 16px; padding: 16px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-username,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-password,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-email { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 16px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-username label,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-password label,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-email label { float: none; display: block; width: 100%; margin: 0 0 6px; font-weight: 600; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-username input,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-password input,
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form .bbp-email input { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-remember-me { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-remember-me label { width: auto; margin: 0; float: none; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-submit-wrapper { float: none; text-align: left; margin: 8px 0 0; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) div.bbp-template-notice { margin-left: auto; margin-right: auto; max-width: 560px; box-sizing: border-box; padding: 8px 12px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) div.bbp-template-notice ul { margin: 0; padding: 0 0 0 18px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) div.bbp-template-notice li,
body.aep-el :is(#bbpress-forums, .bbp-login-form) div.bbp-template-notice p { font-size: .95rem; line-height: 1.45; }

/* Datos extra del registro */
body.aep-el :is(#bbpress-forums, .bbp-login-form) .aep-campo { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 16px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .aep-campo label { float: none; width: 100%; margin: 0 0 6px; font-weight: 600; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .aep-campo input { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; }

/* Todas las etiquetas del mismo tamaño */
body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form :is(.bbp-username, .bbp-email, .bbp-password, .aep-campo, .aep-captcha) label { font-size: 1rem; line-height: 1.4; }

/* Aviso cuando el registro falla */
body.aep-el .aep-aviso-error { box-sizing: border-box; max-width: 560px; margin: 0 auto 16px; padding: 12px 16px; border: 2px solid #b32d2e; border-radius: 6px; background: #fcf0f1; color: #5c1213; scroll-margin-top: 90px; }
body.aep-el .aep-aviso-error p { margin: 0 0 6px; font-size: 1rem; line-height: 1.45; color: inherit; }
body.aep-el .aep-aviso-error p:last-child { margin-bottom: 0; }

/* Captcha */
body.aep-el .aep-captcha { margin: 0 0 14px; }
body.aep-el .aep-captcha label, body.aep-el :is(#bbpress-forums, .bbp-login-form) .aep-captcha label { display: block; float: none; width: 100%; line-height: 1.4; font-weight: 600; margin: 0 0 8px; }
body.aep-el .aep-captcha img { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 0 10px; }
body.aep-el .aep-captcha input.input { width: 100%; max-width: 100%; box-sizing: border-box; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) .aep-captcha input.input { max-width: 100%; }

/* Temas y respuestas */
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-topic-form input[type=text],
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-reply-form input[type=text],
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-the-content-wrapper textarea,
body.aep-el :is(#bbpress-forums, .bbp-login-form) select { width: 100%; max-width: 100%; box-sizing: border-box; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) #bbp-search-form { display: flex; gap: 8px; }
body.aep-el :is(#bbpress-forums, .bbp-login-form) #bbp-search-form input[type=text] { flex: 1; min-width: 0; }

/* ---- Campos y botones comunes ---- */
body.aep-el #simple-contact-form input[type=text],
body.aep-el #simple-contact-form input[type=email],
body.aep-el #simple-contact-form textarea,
body.aep-el :is(#bbpress-forums, .bbp-login-form) input[type=text],
body.aep-el :is(#bbpress-forums, .bbp-login-form) input[type=email],
body.aep-el :is(#bbpress-forums, .bbp-login-form) input[type=tel],
body.aep-el :is(#bbpress-forums, .bbp-login-form) input[type=password],
body.aep-el :is(#bbpress-forums, .bbp-login-form) textarea,
body.aep-el :is(#bbpress-forums, .bbp-login-form) select { min-height: 48px; padding: 10px 12px; font-size: 16px; line-height: 1.4; border: 1px solid #b8bfc6; border-radius: 6px; background: #fff; color: #222; }
body.aep-el #simple-contact-form textarea { min-height: 150px; resize: vertical; }
body.aep-el #simple-contact-form input:focus,
body.aep-el #simple-contact-form textarea:focus,
body.aep-el :is(#bbpress-forums, .bbp-login-form) input:focus,
body.aep-el :is(#bbpress-forums, .bbp-login-form) textarea:focus { border-color: var(--colorAzulOscuro); outline: 3px solid rgba(2, 111, 152, .35); outline-offset: 1px; }
body.aep-el #simple-contact-form input[type=checkbox],
body.aep-el :is(#bbpress-forums, .bbp-login-form) input[type=checkbox] { flex: 0 0 auto; width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; accent-color: var(--colorAzulOscuro); }
body.aep-el #simple-contact-form input[type=submit],
body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-submit-wrapper button,
body.aep-el :is(#bbpress-forums, .bbp-login-form) button.submit { min-height: 48px; padding: 12px 28px; border: 0; border-radius: 50rem; background: var(--colorAzulOscuro); color: #fff; font-family: var(--fuentePrincipal); font-size: 1.1rem; line-height: 1.2; cursor: pointer; }

@media (max-width: 600px) {
	body.aep-el #simple-contact-form input[type=submit],
	body.aep-el :is(#bbpress-forums, .bbp-login-form) .bbp-submit-wrapper button,
	body.aep-el :is(#bbpress-forums, .bbp-login-form) button.submit { width: 100%; }
	body.aep-el .aep-formulario { padding-left: 12px !important; padding-right: 12px !important; }
	body.aep-el :is(#bbpress-forums, .bbp-login-form) fieldset.bbp-form { padding: 14px 12px; }
}
