/* ------------------------------------------------------------
   PIH donation form (Gravity Forms + Stripe Add-On)
   Compact card, segmented frequency toggle, tight amount grid,
   submit styled to match the site's .pih-btn pill.
   Native inputs stay focusable; labels carry the visible state.
   ------------------------------------------------------------ */

.pih-donate-band { padding-block: clamp(2rem, 5vw, 4rem); }

.pih-donate-band .gform_wrapper {
  --don-legacy: var(--pih-legacy, #007777);
  --don-pnw:    var(--pih-pnw, #003f3f);
  --don-coastal:var(--pih-coastal, #acc9c9);
  --don-ink:    var(--pih-ink, #222);
  --don-desert: var(--pih-desert, #f9bf3b);

  max-inline-size: 34rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.10);
  font-family: Lato, sans-serif;
  color: var(--don-ink);
}

.pih-donate-band .gform_wrapper .gform_fields { gap: 1rem; }

.pih-donate-band .gfield_label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--don-pnw);
  margin-bottom: 0.4rem;
}

/* ---- Frequency: compact centered segmented toggle ---- */
.pih-donate-band .pih-freq .gfield_radio {
  display: inline-flex;
  flex-direction: row;
  gap: 4px;
  padding: 4px;
  background: #eef4f4;
  border-radius: 999px;
}
.pih-donate-band .pih-freq .gchoice { margin: 0; }
.pih-donate-band .pih-freq input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pih-donate-band .pih-freq label {
  display: block;
  padding: 0.5rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--don-pnw);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pih-donate-band .pih-freq input:checked + label {
  margin: 0;
  background: var(--don-legacy);
  color: #fff;
}
.pih-donate-band .pih-freq input:focus-visible + label {
  outline: 3px solid var(--don-desert);
  outline-offset: 2px;
}

/* ---- Amount presets: tight button grid ---- */
.pih-donate-band .pih-amounts .gfield_radio {
  display: flex;
  gap: 0.5rem;
  flex-direction: row;
  flex-wrap: wrap;
}
.pih-donate-band .pih-amounts .gchoice { margin: 0; }
.pih-donate-band .pih-amounts input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pih-donate-band .pih-amounts label {
  margin: 0;
  display: block;
  padding: 0.7rem 0.4rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--don-coastal);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pih-donate-band .pih-amounts label:hover { border-color: var(--don-legacy); }
.pih-donate-band .pih-amounts input:checked + label {
  margin: 0;
  background: var(--don-legacy);
  border-color: var(--don-legacy);
  color: #fff;
}
.pih-donate-band .pih-amounts input:focus-visible + label {
  outline: 3px solid var(--don-desert);
  outline-offset: 2px;
}

/* ---- Text inputs ---- */
.pih-donate-band .gform_wrapper input[type="text"],
.pih-donate-band .gform_wrapper input[type="email"],
.pih-donate-band .gform_wrapper input[type="number"],
.pih-donate-band .gform_wrapper select {
  inline-size: 100%;
  min-block-size: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--don-coastal);
  border-radius: 8px;
  font: inherit;
  color: var(--don-ink);
  background: #fff;
}
.pih-donate-band .gform_wrapper input:focus-visible,
.pih-donate-band .gform_wrapper select:focus-visible {
  outline: 3px solid var(--don-desert);
  outline-offset: 1px;
  border-color: var(--don-legacy);
}
.pih-donate-band .ginput_container_price input { max-inline-size: 12rem; }

/* ---- Stripe card field ---- */
.pih-donate-band .ginput_container_creditcard,
.pih-donate-band .gform-stripe-field {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--don-coastal);
  border-radius: 8px;
  background: #fff;
}

/* ---- Submit: matches the site .pih-btn-legacy pill ---- */
.pih-donate-band .gform_footer {
  margin-top: 1.5rem;
  justify-content: center;
  display: flex;
}
.pih-donate-band .gform_footer input[type="submit"],
.pih-donate-band .gform_footer button {
  display: inline-block;
  width: auto;
  padding: 12px 44px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--don-legacy);
  color: #fff;
  font: 600 14px/1.2 Lato, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.pih-donate-band .gform_footer input[type="submit"]:hover,
.pih-donate-band .gform_footer button:hover { background: var(--don-pnw); }
.pih-donate-band .gform_footer input[type="submit"]:focus-visible,
.pih-donate-band .gform_footer button:focus-visible {
  outline: 3px solid var(--don-desert);
  outline-offset: 2px;
}

.pih-donate-band .gfield_required { color: var(--don-legacy); }

@media (prefers-reduced-motion: reduce) {
  .pih-donate-band .gform_wrapper * { transition: none !important; }
}

/* GF ships its button styles inside a cascade layer with !important, so the
   submit needs an explicit override to take the brand pill look. */
.pih-donate-band .gform_wrapper .gform_footer button.gform_button,
.pih-donate-band .gform_wrapper .gform_footer input.gform_button {
  background: var(--don-legacy) !important;
  color: #fff !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  padding: 12px 44px !important;
  width: auto !important;
  min-height: 0 !important;
  font: 600 14px/1.2 Lato, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}
.pih-donate-band .gform_wrapper .gform_footer button.gform_button:hover,
.pih-donate-band .gform_wrapper .gform_footer input.gform_button:hover {
  background: var(--don-pnw) !important;
}
.pih-donate-band .gform_wrapper .gform_footer button.gform_button:focus-visible {
  outline: 3px solid var(--don-desert) !important;
  outline-offset: 2px;
}
