/*
  Greenhouse Scholars
  Footer newsletter signup band (parts/footer-signup.php)

  Values mirror the theme (assets/scss/refresh/_styleguide.scss + _footer.scss):
    gold        #DFAA25  (footer column headings)
    sage        #687769  (divider)
    button      #DFAA25 / hover #C9971C, text #1F2221 (theme $dark)
    pills       2rem radius, 0.9rem 1rem padding, 1px white border (Events button)
    font        Barlow (body)
  Breakpoints: 768px (medium), 1200px (large).
*/

#footer-container .gh-signup {
  width: 100%;
  margin: 0 0 3rem;
  padding: 0;
}

#footer-container .gh-signup__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

/* Divider aligned to the footer content edges (.flex-footer: 1550px max, 2rem side padding). */
#footer-container .gh-signup::after {
  content: "";
  display: block;
  width: calc(100% - 4rem);
  max-width: calc(1550px - 4rem);
  height: 1px;
  margin: 0 auto;
  background: #687769;
}

#footer-container .gh-signup__heading {
  font-family: Barlow, sans-serif;
  font-size: 1.625rem; /* 26px */
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  color: #DFAA25;
  margin: 0 0 0.5rem;
}

#footer-container .gh-signup__copy {
  font-family: Barlow, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  color: #FFFFFF;
  margin: 0;
}

#footer-container .gh-signup__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

#footer-container .gh-signup__field {
  flex: 1 1 0;
  min-width: 0;
}

/* Visually hidden labels (placeholders carry the visible text). */
#footer-container .gh-signup__label,
#footer-container .gh-signup__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#footer-container .gh-signup__hp {
  position: absolute;
  left: -5000px;
}

/* Pills — reset Foundation's input/button defaults, then match Events/Donate. */
#footer-container .gh-signup__input,
#footer-container .gh-signup__button {
  display: block;
  width: 100%;
  /* Slightly slimmer than the theme pills (they're 1em + 0.9rem padding x2 + 2px border ≈ 47px).
     Fixed height because Chrome won't let an input's line-height drop below "normal". */
  height: calc(1em + 1.5rem + 2px); /* 42px at 1rem */
  margin: 0;
  padding: 0 1rem;
  font-family: Barlow, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  border-radius: 2rem;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

/* White fill; border matches the fill so it's invisible but keeps the pill height. */
#footer-container .gh-signup__input {
  background: #FFFFFF;
  border: 1px solid #FFFFFF;
  color: #1F2221;          /* 16.0:1 on white */
  transition: box-shadow 0.2s ease-in-out;
}

#footer-container .gh-signup__input::placeholder {
  color: #6E6E6E;          /* 5.1:1 on white (AA) */
  opacity: 1;
}

/* No resting outline; gold ring only on focus so keyboard users can see where they are. */
#footer-container .gh-signup__input:focus {
  background: #FFFFFF;
  border-color: #FFFFFF;
  outline: none;
  box-shadow: 0 0 0 2px #DFAA25;
}

#footer-container .gh-signup__button {
  background-color: #DFAA25;
  border: 1px solid #DFAA25;
  color: #1F2221;          /* 7.6:1 on gold */
  cursor: pointer;
  transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
}

#footer-container .gh-signup__button:hover,
#footer-container .gh-signup__button:focus {
  background-color: #C9971C;
  border-color: #C9971C;
  color: #1F2221;          /* 6.1:1 on hover gold */
}

#footer-container .gh-signup__button:focus-visible {
  outline: 2px solid #DFAA25;
  outline-offset: 2px;
}

/* Tablet: fields + button in one row under the intro. */
@media (min-width: 768px) {
  #footer-container .gh-signup__form {
    flex-direction: row;
    align-items: stretch;
  }

  #footer-container .gh-signup__button {
    flex: 0 0 auto;
    width: auto;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Desktop: intro left, form right. */
@media (min-width: 1200px) {
  #footer-container .gh-signup__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
  }

  #footer-container .gh-signup__intro {
    flex: 0 0 auto;
  }

  #footer-container .gh-signup__form {
    flex: 1 1 auto;
    max-width: 1000px;
  }
}
