.webform,
.webform-submission-form {
  h2 {
    color: white;
    font-size: 1.75rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  label {
    display: block;
    font-weight: 700;
    margin-bottom: .25rem;

    &.form-required {
      &:after {
        content: '*';
        display: inline-block;
        margin-left: .25rem;
      }
    }
  }
  .fieldset-legend {
    &.form-required {
      &:after {
        content: '*';
        display: inline-block;
        margin-left: .25rem;
      }
    }
  }

  .form-textarea,
  .form-text {
    width: 100%;
  }

  .form-actions {
    display: flex;
    flex-direction: column;
    margin: 1em -0.5em;
    gap: 1rem;
    @media (min-width: 640px) {
      flex-direction: row;
      justify-content: space-between;
    }
    @media (min-width: 1280px) {
      justify-content: flex-start;
    }
    > div {
      flex-basis: 100%;
      input {
        width: 100%;
      }
      @media (min-width: 640px) {
        flex-basis: 33%;
      }
      @media (min-width: 1280px) {
        flex: 2;
        justify-content: flex-start;
        input {
          width: 50%;
        }
      }
      margin: 0 0.5em;
    }
  }
  .webform-flexbox {
    margin: 0;
    @media (min-width: 768px) {
      margin: 0 -0.5em;
    }
  }
  &.newsletter {
    .form-actions {

      > div {

        input {
          width: auto;
          white-space: break-spaces;
          background-color: white;
          border-color: rgb(0, 86, 98);
          color: rgb(0, 86, 98);
          &:hover {
            background-color: rgb(0, 86, 98);
            color: white;
          }
          &:focus {
            background-color: rgb(0, 86, 98);
            color: white;
            border-color: #E65215;
          }
          &:active {
            background-color: #30737F;
            color: white;
            border-color: #30737F;
          }
        }
      }
    }
    legend, label {
      color: rgb(0, 86, 98);
    }
    h3 {
      font-size: 1.75rem;
      line-height: 2.25rem;
      font-weight: 700;
      color: rgb(0, 86, 98);
      margin-bottom: 1rem;
      text-transform: uppercase;
    }
    .form-type-checkbox {
      input {
        width: 25px;
        border-radius: 5px;
      }
      label {
        color: black;
        margin-top: 0;
        margin-bottom: 0;
        font-weight: 400;
        a {
        text-decoration: underline;
        }
      }
    }
    .form-item {
      input {
        border: 1px solid #000;
      }
    }
  }
}
.bg-primary {
  .webform,
  .webform-submission-form {
    label,
    h1,
    h2,
    h3,
    h4,
    h5 {
      color: #fff;
    }
    .form-textarea,
    .form-text,
    .form-type-email {
      color: #000;
    }
    &.newsletter {
      fieldset {
        hyphens: auto;
        @media (min-width: 640px) {
          hyphens: none;
        }
        legend {
          color: white;display: block;
          font-weight: 700;
          margin-bottom: .25rem;
        }
        .form-type-checkbox {
          display: flex;
          justify-content: flex-start;
          align-items: first baseline;
          input {
            position: relative;
            top: 1px;
          }
          label {
            margin-left: .5rem;
            font-weight: 400;
            text-transform: none;
          }
        }
      }
    }
  }
}
