/* Testing Partners — Contact Consultants form (Gravity Forms #3) where it replaces the
 * dead 123FormBuilder iframes on service pages (wrapper .tp-contact-form, added in functions.php).
 * Same rules as the Contact Consultants page's own custom CSS (page 126514), rescoped. */
  html body .tp-contact-form #gform_wrapper_3 {
    color: #fff !important;
    max-width: 700px;
    margin: 0 auto;
  }

  /* Hide duplicate form title (page heading above already says it) */
  html body .tp-contact-form #gform_wrapper_3 .gform_heading { display: none !important; }

  /* Labels + required marker */
  html body .tp-contact-form #gform_wrapper_3 .gfield_label,
  html body .tp-contact-form #gform_wrapper_3 .gform-field-label,
  html body .tp-contact-form #gform_wrapper_3 .gform-field-label__text {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: .02em !important;
    margin-bottom: 5px !important;
  }
  html body .tp-contact-form #gform_wrapper_3 .gfield_required {
    color: #f5a623 !important;
    font-weight: 500 !important;
    margin-left: 4px !important;
  }

  /* Hide honeypot + Select2 span */
  html body .tp-contact-form #gform_wrapper_3 .gform_validation_container,
  html body .tp-contact-form #gform_wrapper_3 #field_3_10 {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
  }
  html body .tp-contact-form #gform_wrapper_3 span.select2,
  html body .tp-contact-form #gform_wrapper_3 .select2-container { display: none !important; }
  
  /* Un-hide native select (undo Select2's clip trick) */
  html body .tp-contact-form #gform_wrapper_3 select.select2-hidden-accessible,
  html body .tp-contact-form #gform_wrapper_3 select.gfield_select {
    clip: auto !important; clip-path: none !important;
    position: static !important; overflow: visible !important;
    width: 100% !important; height: auto !important;
    margin: 0 !important; white-space: normal !important;
    display: block !important;
  }

  /* Inputs shared style */
  html body .tp-contact-form #gform_wrapper_3 input[type="text"],
  html body .tp-contact-form #gform_wrapper_3 input[type="email"],
  html body .tp-contact-form #gform_wrapper_3 input[type="tel"],
  html body .tp-contact-form #gform_wrapper_3 input[type="url"],
  html body .tp-contact-form #gform_wrapper_3 textarea,
  html body .tp-contact-form #gform_wrapper_3 select {
    width: 100%;
    background: #fff !important;
    color: #222 !important;
    border: 1px solid #d5d8dc !important;
    border-radius: 3px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    min-height: 40px !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
  }
  html body .tp-contact-form #gform_wrapper_3 textarea {
    min-height: 100px !important;
    resize: vertical !important;
  }
  html body .tp-contact-form #gform_wrapper_3 ::placeholder {
    color: #8a8f96 !important;
    opacity: 1 !important;
  }

  /* Focus */
  html body .tp-contact-form #gform_wrapper_3 input:focus,
  html body .tp-contact-form #gform_wrapper_3 textarea:focus,
  html body .tp-contact-form #gform_wrapper_3 select:focus {
    outline: none !important;
    border-color: #f5a623 !important;
    box-shadow: 0 0 0 3px rgba(245,166,35,.25) !important;
  }
  
  /* Native select arrow */
  html body .tp-contact-form #gform_wrapper_3 select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23444' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 32px !important;
  }

  /* Two-column layout on desktop */
  @media (min-width: 641px) {
    html body .tp-contact-form #gform_wrapper_3 form .gform_fields,
    html body .tp-contact-form #gform_wrapper_3 #gform_fields_3 {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 14px 16px !important;
      grid-auto-flow: row !important;
    }
    html body .tp-contact-form #gform_wrapper_3 .gfield {
      grid-column: span 1 !important;
      margin: 0 !important;
      max-width: 100% !important;
    }
    html body .tp-contact-form #gform_wrapper_3 #field_3_9,
    html body .tp-contact-form #gform_wrapper_3 .gfield--type-textarea,
    html body .tp-contact-form #gform_wrapper_3 .gform_footer,
    html body .tp-contact-form #gform_wrapper_3 .gform-footer {
      grid-column: 1 / -1 !important;
    }
  }
  html body .tp-contact-form #gform_wrapper_3 .gfield { margin-bottom: 12px; }

  /* Submit button — override theme's teal .button style */
  html body .tp-contact-form #gform_wrapper_3 #gform_submit_button_3,
  html body .tp-contact-form #gform_wrapper_3 .gform_button,
  html body .tp-contact-form #gform_wrapper_3 .gform-footer button,
  html body .tp-contact-form #gform_wrapper_3 input[type="submit"] {
    background: #f5a623 !important;
    background-color: #f5a623 !important;
    color: #002e5b !important;
    font-weight: 700 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    border: 0 !important;
    padding: 12px 28px !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: background .15s ease, color .15s ease !important;
    box-shadow: none !important;
  }
  html body .tp-contact-form #gform_wrapper_3 #gform_submit_button_3:hover,
  html body .tp-contact-form #gform_wrapper_3 .gform_button:hover,
  html body .tp-contact-form #gform_wrapper_3 .gform-footer button:hover,
  html body .tp-contact-form #gform_wrapper_3 input[type="submit"]:hover {
    background: #002e5b !important;
    background-color: #002e5b !important;
    color: #fff !important;
  }

  /* Mobile */
  @media (max-width: 640px) {
    html body .tp-contact-form #gform_wrapper_3 input,
    html body .tp-contact-form #gform_wrapper_3 select,
    html body .tp-contact-form #gform_wrapper_3 textarea { font-size: 16px !important; }
    html body .tp-contact-form #gform_wrapper_3 #gform_submit_button_3 { width: 100% !important; }
  }
