.c-resource-blue-banner {
  background-color: #002d54; /* Deep Navy Blue */
  padding: 50px 0;
  width: 100%;
  box-sizing: border-box;
}

.c-resource-blue-banner__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  box-sizing: border-box;
}

.c-resource-blue-banner__content {
  flex: 1.2;
  max-width: 600px;
  text-align: left;
}

.c-resource-blue-banner__title {
  font-family: var(--font-family, "Noto Sans", sans-serif);
  font-size: 28px;
  line-height: 36px;
  color: #ffffff;
  font-weight: 400;
  margin: 0;
}

.c-resource-blue-banner__title p {
  margin: 0;
}

.c-resource-blue-banner__title-highlight {
  color: #00b050;
  display: block;
  font-weight: 700;
  margin: 8px 0;
}

.c-resource-blue-banner__form-wrapper {
  flex: 1;
  max-width: 390px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Form Styles */
.c-resource-blue-banner__form-wrapper form.webform-submission-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  position: relative;
  padding-bottom: 25px; /* Reserve space for absolutely positioned error message to prevent layout flicker */
}

.c-resource-blue-banner__form-wrapper .form-item,
.c-resource-blue-banner__form-wrapper .js-form-item {
  width: 100%;
  margin: 0;
  position: relative;
  background-color: #ffffff;
  border-radius: 9999px; /* Pill shape */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  height: 40px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.c-resource-blue-banner__form-wrapper .form-item:focus-within,
.c-resource-blue-banner__form-wrapper .js-form-item:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.3), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.c-resource-blue-banner__form-wrapper input[type="email"] {
  background-color: transparent;
  height: 40px;
  line-height: 40px;
  font-size: 16px;
  outline: none;
  border: none;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  color: #002d54;
  font-family: var(--font-family, "Noto Sans", sans-serif);
}

.c-resource-blue-banner__form-wrapper input[type="email"]::placeholder {
  color: rgb(117, 117, 117);
  text-transform: none;
  font-size: 16px;
}

.c-resource-blue-banner__form-wrapper .form-actions {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.c-resource-blue-banner__form-wrapper input[type="submit"],
.c-resource-blue-banner__form-wrapper button.webform-button--submit {
  max-width: 150px;
  width: 100%;
  text-transform: uppercase !important;
  background: #00ac41 0% 0% no-repeat padding-box;
  border-radius: 20px;
  outline: none;
  border: none;
  font-size: 14px;
  letter-spacing: 0px;
  color: #ffffff;
  padding: 12px 20px 10px;
  line-height: 18px;
  font-family: var(--font-family, "Noto Sans", sans-serif);
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 172, 65, 0.2);
}

/* Error Messages */
.c-resource-blue-banner__error-msg {
  position: absolute;
  bottom: 0;
  left: 10px;
  color: #ff3b30; /* Bright red matching error text */
  font-family: var(--font-family, "Noto Sans", sans-serif);
  font-size: 12px;
  text-align: left;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; /* Prevent blocking any clicks */
}

.c-resource-blue-banner__error-msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hide standard Drupal server-side validation error containers to prioritize custom JS messages */
.c-resource-blue-banner__form-wrapper .form-item--error-message,
.c-resource-blue-banner__form-wrapper .messages--error,
.c-resource-blue-banner__form-wrapper .messages,
.c-resource-blue-banner__form-wrapper .messages-list {
  display: none !important;
}

/* Override and reset default Drupal error borders/backgrounds on the form item and input elements */
.c-resource-blue-banner__form-wrapper .form-item.error,
.c-resource-blue-banner__form-wrapper .form-item.form-item--error,
.c-resource-blue-banner__form-wrapper .js-form-item.error,
.c-resource-blue-banner__form-wrapper .js-form-item.form-item--error {
  border: none !important;
  background-color: #ffffff !important;
  outline: none !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}

.c-resource-blue-banner__form-wrapper input.error {
  border: none !important;
  background-color: transparent !important;
  outline: none !important;
}

/* Webform Confirmation Message */
.c-resource-blue-banner__success-msg {
  color: #00b050;
  font-family: var(--font-family, "Noto Sans", sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .c-resource-blue-banner {
    padding: 50px 16px;
  }

  .c-resource-blue-banner__inner {
    flex-direction: column;
    text-align: center;
    gap: 35px;
  }

  .c-resource-blue-banner__content {
    max-width: 100%;
    text-align: center;
  }

  .c-resource-blue-banner__form-wrapper {
    max-width: 390px;
    margin: 0 auto;
  }

  .c-resource-blue-banner__title {
    font-size: 26px;
  }

  .c-resource-blue-banner__form-wrapper .form-item,
  .c-resource-blue-banner__form-wrapper .js-form-item,
  .c-resource-blue-banner__form-wrapper .form-item.error,
  .c-resource-blue-banner__form-wrapper .form-item.form-item--error,
  .c-resource-blue-banner__form-wrapper .js-form-item.error,
  .c-resource-blue-banner__form-wrapper .js-form-item.form-item--error {
    background-color: #f1f3f5 !important;
  }
  
  .c-resource-blue-banner__error-msg {
    left: 50%;
    transform: translate(-50%, -5px);
    text-align: center;
    width: 100%;
    padding-left: 0;
  }

  .c-resource-blue-banner__error-msg.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .c-resource-blue-banner__form-wrapper .form-actions {
    justify-content: center;
  }
}
