/** -------------------------------------------- */
/** Shared Flexbox Layout (Structure Only)       */

/* Position input and button on the same row without overriding colors */
.site-footer .gform_wrapper form[id^="gform"],
.wp-block-ncst-email-signup .gform_wrapper form[id^="gform"] {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100% !important;
}

/* Allow input wrapper to consume remaining horizontal width */
.site-footer .gform_wrapper .gfield,
.wp-block-ncst-email-signup .gform_wrapper .gfield {
  flex: 1 1 auto !important;
  margin: 0 !important;
}

.site-footer .gform_wrapper .ginput_container_email input,
.wp-block-ncst-email-signup .ginput_container_email input {
  width: 100% !important;
  height: 100% !important;
  min-height: 48px;
  box-sizing: border-box;
  border-radius: 0;
}
.wp-block-ncst-email-signup .ginput_container_email input {
  width: 98% !important;
}

/* Structural dimensions for submit button across contexts */
.site-footer .gform_wrapper form[id^="gform"] button.gform_button,
.wp-block-ncst-email-signup .gform_wrapper form[id^="gform"] button.gform_button {
  flex: 0 0 48px !important;
  min-height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.75rem !important;
}

.site-footer .gform_wrapper form[id^="gform"] button.gform_button svg,
.wp-block-ncst-email-signup .gform_wrapper form[id^="gform"] button.gform_button svg {
  width: 1em !important;
  height: 1em !important;
  fill: #ffffff !important;
}

/** -------------------------------------------- */
/** Context-Specific Theme Declarations          */

/* 1. Footer Subscription Context */
.site-footer.has-reynolds-400-background-color .ginput_container_email input {
  border: 2px solid #666 !important;
}

.site-footer.has-reynolds-400-background-color .gform_wrapper form[id^="gform"] button.gform_button {
  background-color: #5e0000 !important;
  border: none !important;
}

.site-footer.has-reynolds-400-background-color .gform_wrapper form[id^="gform"] button.gform_button:hover,
.site-footer.has-reynolds-400-background-color .gform_wrapper form[id^="gform"] button.gform_button:focus {
  background-color: #3e0000 !important;
}

/* 2. Audience Engagement Block - Default Context */
.wp-block-ncst-audience-engagement
  .wp-block-ncst-email-signup
  .gform_wrapper
  form[id^="gform"]
  button[type="submit"].gform_button {
  background-color: #c00 !important;
  border: 1px solid #c00 !important;
  color: #ffffff !important;
}

/* 3. Audience Engagement Block - Blue Variant Context */
.has-blue-400-background-color
  .wp-block-ncst-audience-engagement
  .wp-block-ncst-email-signup[class*="background-color"]
  .gform_wrapper
  form[id^="gform"]
  button[type="submit"].gform_button {
  background-color: #427e93 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

/* Visually hide label text while preserving accessible properties */
.site-footer .gform_wrapper .gfield_label .gform-field-label__text,
.wp-block-ncst-email-signup .gfield_label .gform-field-label__text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  color: #fff !important;
  background-color: #000 !important;
}
.site-footer .gform-theme--foundation .gform_footer,
.gform-theme--foundation .gform_page_footer {
  margin-block-start: 2px;
}
