// Common CSS for WFieldSet and multi-input controls
// #############################################################################

fieldset {
  // @include padded-box($pad: $wc-gap-small);
  margin: 0;
  min-width: 0; // Issue #1146

  @if $wc-border-color != -1 {
    border-color: $wc-border-color;
  }
  @if $wc-border-style != -1 {
    border-style: $wc-border-style;
  }
  @if $wc-border-width != -1 {
    border-width: $wc-border-width;
  }

  &.wc_noborder {
    border: 0;
    padding: 0;
  }
}

legend {
  .wc_noborder > & {
    padding-left: 0;
  }

  // force offscreen legends back on screen if they are in an error state.
  &.wc-off.wc-err {
    @include onscreen($important: 1);
  }

  > .fa-asterisk {
    @include mandatory-indicator;
  }

  .wc_req > & {
    > .fa-asterisk {
      display: inline-block;
    }
  }
}
