@use "uswds-core" as *;
@use "cisa_colors" as *;

// Normalize typography in forms
.usa-form,
.usa-form fieldset {
  font-size: 1rem;
  .usa-legend {
    font-size: 1rem;
  }
}
.usa-form .usa-button {
  margin-top: units(3);
}

.usa-form .usa-button.margin-bottom-075 {
  margin-bottom: units(1.5);
}

.usa-form .usa-button.margin-top-1 {
  margin-top: units(1);
}

.usa-form--extra-large {
  max-width: none;
}

.usa-form--text-width {
  max-width: measure(5);
}

.usa-textarea {
  @include at-media('tablet') {
    height: units('mobile');
  }
}

.usa-form-editable {
  border-top: 2px #{$dhs-dark-gray-15} solid;

  .bold-usa-label label.usa-label{
    font-weight: bold;
  }

  &.bold-usa-label label.usa-label{
    font-weight: bold;
  }

  &.usa-form-editable--no-border {
    border-top: None;
    margin-top: 0px !important;
  }

}

.usa-form-editable > .usa-form-group:first-of-type {
  margin-top: unset;
}

@media (min-width: 35em) {
  .usa-form--largest {
      max-width: 35rem;
  }
}

.usa-form-group--unstyled-error {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

legend.float-left-tablet + button.float-right-tablet {
  margin-top: .5rem;
  @include at-media('tablet') {
    margin-top: 1rem;
  }
}

.bg-gray-1 .usa-radio {
  background: color('gray-1');
}

.usa-textarea--digest {
  max-height: 4rem;
  min-width: 13rem;
  resize: none;
  overflow: hidden;
}

.usa-form .usa-button.margin-top-2 {
  margin-top: units(2) !important;
}
