/* Nutshell CRM forms restyled to match the site's original contact form
   (Gravity Forms in the theme: Open Sans, 20px labels, 70px square inputs,
   black uppercase submit button). Scoped to the Nutshell target div, so it
   also beats the page's own `.contactus-form-wrp form input` rules. */
.nutshell-embed [id^="nutshell-form-"] #peanut-container,
.nutshell-embed [id^="nutshell-form-"] form {
  background: transparent !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Open Sans", sans-serif !important;
}
.nutshell-embed [id^="nutshell-form-"] #form-fields-container {
  max-width: none !important;
  width: 100% !important;
}
.nutshell-embed [id^="nutshell-form-"] #form-fields-container > div {
  margin: 0 0 25px !important;
}
.nutshell-embed [id^="nutshell-form-"] fieldset {
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
}
.nutshell-embed [id^="nutshell-form-"] label,
.nutshell-embed [id^="nutshell-form-"] legend {
  display: block !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 20px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  color: #000 !important;
}
.nutshell-embed [id^="nutshell-form-"] label span,
.nutshell-embed [id^="nutshell-form-"] legend span {
  color: #790000 !important;
  margin-left: 6px !important;
}

/* Undo the page's blanket `form input` styling for Nutshell's hidden helper
   inputs and the dropdown's inner text input. */
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input,
.nutshell-embed [id^="nutshell-form-"] form input {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: inherit !important;
  background: transparent !important;
}

.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="text"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="email"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="tel"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="url"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="number"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 70px !important;
  padding: 15px 20px !important;
  border: 1px solid #b3b3b3 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 20px !important;
  font-weight: 200 !important;
  line-height: 1.5 !important;
  color: #000 !important;
}
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form textarea {
  height: 160px !important;
  resize: vertical;
}
/* Dropdown's own search input sits inside the styled control. */
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form [class*="-control"] input[type="text"] {
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
}
.nutshell-embed [id^="nutshell-form-"] input::placeholder,
.nutshell-embed [id^="nutshell-form-"] textarea::placeholder {
  color: #9a9a9a;
  font-weight: 200;
}

/* react-select dropdown ("How did you hear about us?") */
.nutshell-embed [id^="nutshell-form-"] [class*="-control"] {
  min-height: 70px !important;
  border: 1px solid #b3b3b3 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 10px 0 18px !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 20px !important;
  font-weight: 200 !important;
  color: #000 !important;
}
.nutshell-embed [id^="nutshell-form-"] [class*="-placeholder"] {
  color: #9a9a9a !important;
}
.nutshell-embed [id^="nutshell-form-"] [class*="-singleValue"] {
  color: #000 !important;
}
.nutshell-embed [id^="nutshell-form-"] [class*="-menu"] {
  border-radius: 0 !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 18px !important;
  z-index: 10 !important;
}

/* Submit button: centered, black, uppercase, like the original form. */
.nutshell-embed [id^="nutshell-form-"] button[type="submit"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="submit"] {
  display: block !important;
  width: 50% !important;
  height: 96px !important;
  margin: 50px auto 0 !important;
  padding: 15px 20px !important;
  border: none !important;
  border-radius: 0 !important;
  background: #000 !important;
  color: #fff !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: opacity .2s;
}
.nutshell-embed [id^="nutshell-form-"] button[type="submit"]:hover,
.nutshell-embed [id^="nutshell-form-"] input[type="submit"]:hover {
  opacity: 0.8;
}
.nutshell-embed [id^="nutshell-form-"] div:has(> input[type="submit"]),
.nutshell-embed [id^="nutshell-form-"] div:has(> button[type="submit"]) {
  display: block !important;
  text-align: center !important;
}

@media (max-width: 767px) {
  .nutshell-embed [id^="nutshell-form-"] label,
  .nutshell-embed [id^="nutshell-form-"] legend {
    font-size: 16px !important;
  }
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="text"],
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="email"],
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="tel"],
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="url"],
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="number"] {
    height: 50px !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
  }
  .nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form textarea {
    font-size: 16px !important;
  }
  .nutshell-embed [id^="nutshell-form-"] [class*="-control"] {
    min-height: 50px !important;
    font-size: 16px !important;
  }
  .nutshell-embed [id^="nutshell-form-"] button[type="submit"],
.nutshell-embed .contactus-form-wrp [id^="nutshell-form-"] form input[type="submit"] {
    width: 100% !important;
    height: 65px !important;
    margin-top: 30px !important;
    font-size: 16px !important;
  }
}

/* Nutshell's hidden "required" helper input inside the dropdown's legend
   shouldn't take up space. */
.nutshell-embed [id^="nutshell-form-"] legend input {
  position: absolute !important;
}

/* ---------------------------------------------------------------------------
   .nutshell-plain: matches the theme's default Gravity Forms look, used on
   pages like /become-a-platinum-partner/ (bold 18px labels, 40px inputs with
   a thin grey border, dark grey "Submit" button on the left).
   ------------------------------------------------------------------------ */
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] {
  text-align: left;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] label,
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] legend {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #333 !important;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="text"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="email"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="tel"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="url"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="number"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 40px !important;
  padding: 5px 10px !important;
  border: 1px solid #767676 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-family: "Open Sans", sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #333 !important;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form textarea {
  height: 240px !important;
  padding: 8px 10px !important;
  resize: vertical;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form [class*="-control"] input[type="text"] {
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] [class*="-control"] {
  min-height: 40px !important;
  border: 1px solid #767676 !important;
  padding: 0 6px 0 10px !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: #333 !important;
}
/* Helper text under a field (e.g. the feedstock examples). */
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] #form-fields-container p,
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] #form-fields-container small {
  font-family: "Open Sans", sans-serif !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  color: #333 !important;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="submit"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] button[type="submit"] {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  margin: 10px 0 0 !important;
  padding: 12px 20px !important;
  border: 2px solid #000 !important;
  background: #393939 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] div:has(> input[type="submit"]),
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] div:has(> button[type="submit"]) {
  text-align: left !important;
}
@media (max-width: 767px) {
  .nutshell-embed.nutshell-plain [id^="nutshell-form-"] label,
  .nutshell-embed.nutshell-plain [id^="nutshell-form-"] legend {
    font-size: 16px !important;
  }
  .nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="submit"],
  .nutshell-embed.nutshell-plain [id^="nutshell-form-"] button[type="submit"] {
    width: 100% !important;
  }
}

/* Heading + intro shown above a form (carried over from the Gravity Form's
   own title/description, e.g. on /funding/). */
.nutshell-embed .nutshell-form-heading {
  margin: 30px 0 30px;
  text-align: center;
  font-family: "Open Sans", sans-serif;
}
.nutshell-embed .nutshell-form-heading h3 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: #333;
}
.nutshell-embed .nutshell-form-heading p {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: #333;
}
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] form input[type="submit"],
.nutshell-embed.nutshell-plain [id^="nutshell-form-"] button[type="submit"] {
  color: #fff !important;
  font-family: "Open Sans", sans-serif !important;
  cursor: pointer;
}

/* Accessibility: the drop-down placeholder was #c2c2c2 on white (1.8:1). */
.nutshell-embed [id^="nutshell-form-"] [id$="-placeholder"] { color: #595959 !important; opacity: 1 !important; }
