/* =============================================================
   CF7 Override — Khớp design Adon contact form
   ============================================================= */

/* Reset CF7 default styles */
.contact-wrap .wpcf7 {
  width: 100%;
}

.contact-wrap .wpcf7-form {
  width: 100%;
}

/* Grid layout giống form gốc */
.contact-wrap .contact-formwrap {
  gap: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.contact-wrap .contact-formwrap .contact-formfield {
  grid-column: span 2;
}

.contact-wrap .contact-formwrap .contact-formfield:nth-child(2),
.contact-wrap .contact-formwrap .contact-formfield:nth-child(3) {
  grid-column: span 1;
}

@media only screen and (max-width: 991px) {
  .contact-wrap .contact-formwrap .contact-formfield:nth-child(2),
  .contact-wrap .contact-formwrap .contact-formfield:nth-child(3) {
    grid-column: span 2;
  }
}

/* Field wrapper */
.contact-wrap .contact-formfield {
  border-radius: 15px;
  transition: all 0.3s;
  padding: 27px 30px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-wrap .contact-formfield:hover {
  border-color: var(--primary);
}

/* Label */
.contact-wrap .contact-formfield label {
  font-size: 18px;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 5px;
  display: block;
}

/* Input fields bên trong CF7 span wrapper */
.contact-wrap .contact-formfield input[type="text"],
.contact-wrap .contact-formfield input[type="email"],
.contact-wrap .contact-formfield input[type="tel"],
.contact-wrap .contact-formfield textarea {
  width: 100%;
  border: none;
  outline: none;
  background-color: transparent;
  transition: all 0.5s;
  color: var(--white, #fff);
  font-size: 16px;
  padding: 0;
  font-family: inherit;
}

.contact-wrap .contact-formfield input::placeholder,
.contact-wrap .contact-formfield textarea::placeholder {
  color: var(--secondary, rgba(255,255,255,0.5));
}

/* CF7 span wrapper — reset */
.contact-wrap .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* Message field (textarea) */
.contact-wrap .contact-formfield.message {
  min-height: 170px;
}

.contact-wrap .contact-formfield.message textarea {
  width: 100%;
  height: 100px;
  resize: vertical;
  background-color: transparent;
  border: none;
  outline: none;
  color: var(--white, #fff);
  font-size: 16px;
  font-family: inherit;
}

/* Submit button — style giống .rr-btn */
.contact-wrap .submit-btn {
  margin-top: 40px;
}

.contact-wrap .submit-btn input[type="submit"],
.contact-wrap .submit-btn .wpcf7-submit {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  padding: 18px 40px;
  border-radius: 50px;
  border: 1px solid var(--primary, #fff);
  background-color: transparent;
  color: var(--primary, #fff);
  cursor: pointer;
  transition: all 0.4s ease;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.contact-wrap .submit-btn input[type="submit"]:hover,
.contact-wrap .submit-btn .wpcf7-submit:hover {
  background-color: var(--primary, #fff);
  color: var(--black, #111);
}

/* CF7 validation messages */
.contact-wrap .wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

/* Response output (success/error message) */
.contact-wrap .wpcf7-response-output {
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.15);
}

.contact-wrap .wpcf7-mail-sent-ok,
.contact-wrap .wpcf7 form.sent .wpcf7-response-output {
  border-color: #2ecc71;
  color: #2ecc71;
}

.contact-wrap .wpcf7 form.failed .wpcf7-response-output,
.contact-wrap .wpcf7 form.aborted .wpcf7-response-output {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* Ẩn spinner loading CF7 */
.contact-wrap .wpcf7-spinner {
  display: none;
}

/* Autofill fix cho dark background */
.contact-wrap .contact-formfield input:-webkit-autofill,
.contact-wrap .contact-formfield input:-webkit-autofill:focus {
  transition: background-color 0s 600000s, color 0s 600000s !important;
}
