/* ============================================================
   まねきでんき LP — Contact Form 7 adjustments
   Makes CF7's markup look like the original static form (style.css).
============================================================ */

/* CF7 wraps each control in an inline <span>; let the controls fill the column as before */
.form-group .wpcf7-form-control-wrap { display: block; }
.form-group .wpcf7-form-control-wrap > input,
.form-group .wpcf7-form-control-wrap > select,
.form-group .wpcf7-form-control-wrap > textarea { display: block; width: 100%; }

/* Privacy checkbox: flatten CF7's wrappers so the original .checkbox-label layout applies,
   and put the error message on its own line under the checkbox */
.checkbox-label { flex-wrap: wrap; }
.checkbox-label .wpcf7-form-control-wrap,
.checkbox-label .wpcf7-form-control,
.checkbox-label .wpcf7-list-item { display: contents; }
.checkbox-label .wpcf7-not-valid-tip { order: 1; flex-basis: 100%; }

/* Validation messages */
.contact-form .wpcf7-not-valid-tip {
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 4px;
  color: #c62828;
}
.form-group .wpcf7-not-valid { border-color: #e57373; }

/* Response message (errors). Success is shown by .form-success instead. */
.wpcf7 form.contact-form .wpcf7-response-output {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  border-width: 1.5px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
}
.wpcf7 form.contact-form.failed .wpcf7-response-output,
.wpcf7 form.contact-form.aborted .wpcf7-response-output,
.wpcf7 form.contact-form.spam .wpcf7-response-output {
  background: #fdecea;
  border-color: #e57373;
  color: #b71c1c;
}
.wpcf7 form.contact-form.invalid .wpcf7-response-output,
.wpcf7 form.contact-form.unaccepted .wpcf7-response-output {
  background: var(--yellow-pale);
  border-color: var(--yellow);
  color: var(--text);
}
.wpcf7 form.contact-form.sent .wpcf7-response-output { display: none; }

/* Submit button while sending */
.form-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* Honeypot: off-screen for people, still present for bots */
.md-hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Shown instead of the form while it cannot be used (no plugin / no privacy policy URL) */
.form-unavailable {
  font-size: 0.95rem;
  line-height: 1.8;
}
.form-unavailable a { color: var(--orange); font-weight: 700; text-decoration: underline; }
.form-admin-note {
  margin: 8px 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--yellow-pale);
  color: var(--orange-dark);
  font-size: 0.8rem;
}
