/* === CF7 Override: match existing form design === */

/* Remove CF7 default wrapper margins/padding */
.s-form-type-2__main .wpcf7 {
  position: relative;
  z-index: 2;
  width: 100%;
}

.s-form-type-2__main .wpcf7 form {
  margin: 0;
  padding: 0;
}

/* Reset CF7 default paragraph wrappers */
.s-form-type-2__main .wpcf7 form p {
  margin: 0;
  padding: 0;
}

/* Match input field styles to original .sb-input__field */
.s-form-type-2__main .wpcf7 .sb-input__field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  padding: 12px 0 8px;
  font-size: 16px;
  line-height: 24px;
  font-family: inherit;
  color: inherit;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.s-form-type-2__main .wpcf7 .sb-input__field:hover {
  border-bottom-color: rgba(0, 0, 0, 0.36);
}

.s-form-type-2__main .wpcf7 .sb-input__field:focus {
  border-bottom-color: rgba(0, 0, 0, 0.56);
}

.s-form-type-2__main .wpcf7 .sb-input__field::placeholder {
  color: rgba(0, 0, 0, 0.36);
  font-size: 16px;
  line-height: 24px;
}

/* CF7 wraps inputs in <span> — make it block */
.s-form-type-2__main .wpcf7 .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* Validation error message under field */
.s-form-type-2__main .wpcf7 .wpcf7-not-valid-tip {
  font-size: 12px;
  line-height: 20px;
  color: #e53935;
  margin-top: 4px;
  display: block;
}

/* Invalid field border */
.s-form-type-2__main .wpcf7 .wpcf7-not-valid {
  border-bottom-color: #e53935 !important;
}

/* Submit button — match .sb-button-secondary */
.s-form-type-2__main .wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  padding: 12px 32px;
  border: 1px solid rgba(0, 0, 0, 0.56);
  background-color: transparent;
  color: inherit;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.s-form-type-2__main .wpcf7 input[type="submit"]:hover {
  border-color: rgba(0, 0, 0, 0.8);
}

/* CF7 response output — success/error messages */
.s-form-type-2__main .wpcf7 .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  border: none;
  border-radius: 0;
}

.s-form-type-2__main .wpcf7 form.sent .wpcf7-response-output {
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
}

.s-form-type-2__main .wpcf7 form.failed .wpcf7-response-output,
.s-form-type-2__main .wpcf7 form.aborted .wpcf7-response-output,
.s-form-type-2__main .wpcf7 form.spam .wpcf7-response-output {
  background: rgba(229, 57, 53, 0.1);
  color: #c62828;
}

.s-form-type-2__main .wpcf7 form.invalid .wpcf7-response-output,
.s-form-type-2__main .wpcf7 form.unaccepted .wpcf7-response-output {
  background: rgba(255, 152, 0, 0.1);
  color: #e65100;
}

/* CF7 spinner */
.s-form-type-2__main .wpcf7 .wpcf7-spinner {
  margin: 16px 0 0 12px;
}

/* Hide CF7 default acceptance label if present */
.s-form-type-2__main .wpcf7 .wpcf7-acceptance {
  font-size: 12px;
}

/* Mobile: full-width submit */
@media screen and (max-width: 959px) {
  .s-form-type-2__main .wpcf7 input[type="submit"] {
    width: 100%;
  }
}

