/**
 * @file
 * Impact report subscribe form (templates/forms/subscribe/impact.html.twig).
 */

.group-impact {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 190px;
  grid-template-areas: "fname lname email submit";
  align-items: end;
  gap: 15px 20px;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0;
  border: 0;
}

.group-impact__field {
  position: relative;
  min-width: 0;
}

.group-impact__field:nth-of-type(1) {
  grid-area: fname;
}

.group-impact__field:nth-of-type(2) {
  grid-area: lname;
}

.group-impact__field--email {
  grid-area: email;
}

.group-impact .form-submit {
  grid-area: submit;
  max-width: none;
  min-width: 0;
  width: 100%;
  margin-bottom: 4px;
}

.group-impact input[type="text"],
.group-impact input[type="email"] {
  width: 100%;
  padding-top: 2px;
  padding-bottom: 9px;
  margin-bottom: 4px;
  font-size: 18px;
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
  transition: border-color 0.2s ease;
}

.group-impact input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.group-impact input[type="text"]:hover,
.group-impact input[type="email"]:hover {
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* Base theme removes focus outlines; restore a visible one for keyboard users. */
.group-impact input:focus,
.group-impact input:focus-visible {
  outline: 2px solid #66ba00;
  outline-offset: 4px;
  border-bottom-color: #66ba00;
}

/* Error state set by ai_subscribe_rest.js on failed validation. */
.group-impact input.error {
  border-bottom-color: #e4573d;
}

.group-impact__note {
  display: block;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.7);
}

@media only screen and (max-width: 1024px) {
  .group-impact {
    grid-template-columns: 1fr 1fr 190px;
    grid-template-areas:
      "fname lname ."
      "email email submit";
    max-width: 860px;
  }
}

@media only screen and (max-width: 780px) {
  .group-impact {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "fname lname"
      "email email"
      "submit submit";
  }

  .group-impact .form-submit {
    justify-self: center;
    width: auto;
    min-width: 210px;
  }
}

@media only screen and (max-width: 480px) {
  .group-impact {
    grid-template-columns: 100%;
    grid-template-areas:
      "fname"
      "lname"
      "email"
      "submit";
    margin-top: 20px;
  }

  .group-impact .form-submit {
    width: 100%;
  }
}
