/* ═══════════════════════════════════════════════════════════════════
   WP Contact Forms Manager — Frontend Styles
   ═══════════════════════════════════════════════════════════════════ */

.wpcfm-wrap { max-width: 700px; }
.wpcfm-description { margin-bottom: 20px; color: #555; }

/* ── Grid de campos ──────────────────────────────────────────────── */
.wpcfm-fields-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.wpcfm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wpcfm-width-full  { width: 100%; }
.wpcfm-width-half  { width: calc(50% - 8px); }

@media (max-width: 600px) {
  .wpcfm-width-half { width: 100%; }
}

/* ── Labels ──────────────────────────────────────────────────────── */
.wpcfm-label {
  font-weight: 600;
  font-size: 14px;
  color: #2c3338;
  margin-bottom: 2px;
  display: block;
}
.wpcfm-required { color: #dc3232; margin-left: 2px; }
.wpcfm-help     { color: #888; font-size: 12px; }

/* ── Inputs ──────────────────────────────────────────────────────── */
.wpcfm-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-size: 15px;
  color: #2c3338;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  line-height: 1.5;
  font-family: inherit;
}
.wpcfm-input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0,115,170,.18);
}
.wpcfm-input.wpcfm-field-error-input {
  border-color: #dc3232;
  box-shadow: 0 0 0 2px rgba(220,50,50,.13);
}

textarea.wpcfm-input { resize: vertical; min-height: 100px; }
select.wpcfm-input   { appearance: auto; cursor: pointer; }

/* ── Fieldset radio/checkbox ─────────────────────────────────────── */
.wpcfm-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}
.wpcfm-radio-label,
.wpcfm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2c3338;
  cursor: pointer;
  padding: 4px 0;
}
.wpcfm-radio-label input,
.wpcfm-checkbox-label input { margin: 0; cursor: pointer; }

/* ── Separador ───────────────────────────────────────────────────── */
.wpcfm-field-divider { padding: 4px 0; }
.wpcfm-divider-text  { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #2c3338; }
.wpcfm-hr            { border: none; border-top: 1px solid #e5e5e5; margin: 0; }

/* ── Errores de campo ────────────────────────────────────────────── */
.wpcfm-field-error {
  display: none;
  color: #dc3232;
  font-size: 12px;
  font-weight: 500;
}
.wpcfm-field-error.visible { display: block; }

/* ── Mensajes globales ───────────────────────────────────────────── */
.wpcfm-messages {
  margin-bottom: 16px;
  border-radius: 4px;
  padding: 0;
  font-size: 14px;
}
.wpcfm-messages.success {
  background: #edfaee;
  border: 1px solid #46b450;
  color: #1e4620;
  padding: 12px 16px;
}
.wpcfm-messages.error {
  background: #ffeaea;
  border: 1px solid #dc3232;
  color: #7a1010;
  padding: 12px 16px;
}

/* ── Botón de envío ──────────────────────────────────────────────── */
.wpcfm-field-submit { margin-top: 8px; }

.wpcfm-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.wpcfm-submit-btn:hover   { background: #005d8c; }
.wpcfm-submit-btn:active  { transform: scale(.98); }
.wpcfm-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────────────── */
.wpcfm-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wpcfm-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes wpcfm-spin {
  to { transform: rotate(360deg); }
}

/* ── reCAPTCHA ───────────────────────────────────────────────────── */
.wpcfm-field-captcha { margin-top: 4px; }

/* ── Formulario enviado (estado éxito) ───────────────────────────── */
.wpcfm-form-sent .wpcfm-form { display: none; }