/* SIM Contact form styling (Gravity Forms)
   Targets the form via the Form Settings CSS Class Name: "sim-contact-form"
   Note: Gravity Forms appends "_wrapper" to form CSS classes in some outputs, so we target both. */
.sim-contact-form,
.sim-contact-form_wrapper {
  --sim-red: #da2b1f;
  --accent-green-75: #effaa9;
  --black-green: #14332d;
  --accent-green-50: #f7ffc6;
  --accent-green-100: #e0ec92;
  --accent-green-25: #fbffe4;
}

/* Inputs */
.sim-contact-form_wrapper input[type="text"],
.sim-contact-form_wrapper input[type="email"],
.sim-contact-form_wrapper input[type="tel"],
.sim-contact-form_wrapper textarea,
.sim-contact-form_wrapper select {
  border: 1px solid #dddedf;
  border-radius: 0.25rem;
  background: #fff;
  font-size: var(--body);
}

/* Make textarea feel consistent */
.sim-contact-form_wrapper textarea {
  min-height: 140px;
}

/* Primary submit button (Send message) */
.sim-contact-form_wrapper .gform_button,
.sim-contact-form_wrapper button.gform_button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  letter-spacing: .5px;
  text-align: center;
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.5rem 1.15rem 0.55rem;
  color: var(--accent-green-100);
  background-color: var(--black-green);
  transition: all .2s ease;
  font-size: var(--body) !important;
}

.sim-contact-form_wrapper .gform_button:hover,
.sim-contact-form_wrapper button.gform_button:hover {
  filter: brightness(1.05);
}

/* Radio buttons as button toggles (NZ location question) */
.sim-contact-form_wrapper .sim-nz-toggle .gfield_radio {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
 
}

.sim-contact-form_wrapper .sim-nz-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sim-contact-form_wrapper .sim-nz-toggle .gfield_radio label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dddedf;
  background: #ffffff;
  color: var(--black-green);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
  margin-left: 0px;
  font-size: var(--body);
}

/* Selected state */
.sim-contact-form_wrapper .sim-nz-toggle input[type="radio"]:checked + label {
  background: var(--accent-green-50);
  border-color: var(--accent-green-100);
}

/* Focus state */
.sim-contact-form_wrapper .sim-nz-toggle input[type="radio"]:focus + label {
  outline: 2px solid var(--accent-green-100);
  outline-offset: 2px;
}

/* Reduce spacing on conditional HTML blocks */
.sim-contact-form_wrapper .sim-not-nz,
.sim-contact-form_wrapper .sim-donate-cta {
  margin-top: 12px;
}

/* Optional: tighten field margins a little */
.sim-contact-form_wrapper .gfield {
  margin-bottom: 0px;
}
.gform-theme--foundation .gform_fields {
    row-gap: 1rem !important;
}

.sim-contact-form_wrapper h3, .sim-contact-form_wrapper .gform-field-label {
    font-size: var(--body) !important;
    font-weight: 700 !important;
}

.sim-contact-form_wrapper label {
 font-size: var(--body);
}
/* =========================
   SIM Contact Form overrides
   ========================= */

/* 1) Force the Send message button to use SIM red */
.sim-contact-form_wrapper .gform_footer .gform_button,
.sim-contact-form_wrapper .gform_footer input[type="submit"],
.sim-contact-form_wrapper .gform_footer button[type="submit"] {
  background: var(--sim-red) !important;
  color: #fff !important;
  border: none !important;
}

/* Hover / active */
.sim-contact-form_wrapper .gform_footer .gform_button:hover,
.sim-contact-form_wrapper .gform_footer input[type="submit"]:hover,
.sim-contact-form_wrapper .gform_footer button[type="submit"]:hover {
  filter: brightness(0.95);
}

.sim-contact-form_wrapper .gform_footer .gform_button:active,
.sim-contact-form_wrapper .gform_footer input[type="submit"]:active,
.sim-contact-form_wrapper .gform_footer button[type="submit"]:active {
  filter: brightness(0.9);
}

/* 2) Remove the ugly blue focus ring and use SIM red instead */
.sim-contact-form_wrapper input:focus,
.sim-contact-form_wrapper select:focus,
.sim-contact-form_wrapper textarea:focus,
.sim-contact-form_wrapper input:focus-visible,
.sim-contact-form_wrapper select:focus-visible,
.sim-contact-form_wrapper textarea:focus-visible {
  outline: none !important;
  border-color: var(--sim-red) !important;
  box-shadow: none !important;
}

/* Optional: if you *do* want a subtle focus glow (still not blue), uncomment:
.sim-contact-form_wrapper input:focus-visible,
.sim-contact-form_wrapper select:focus-visible,
.sim-contact-form_wrapper textarea:focus-visible {
  box-shadow: 0 0 0 2px rgba(218, 43, 31, 0.25) !important;
}
*/

/* 3) Same idea for button focus so it doesn't go blue on keyboard nav */
.sim-contact-form_wrapper .gform_footer .gform_button:focus,
.sim-contact-form_wrapper .gform_footer .gform_button:focus-visible,
.sim-contact-form_wrapper .gform_footer input[type="submit"]:focus,
.sim-contact-form_wrapper .gform_footer input[type="submit"]:focus-visible,
.sim-contact-form_wrapper .gform_footer button[type="submit"]:focus,
.sim-contact-form_wrapper .gform_footer button[type="submit"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
