/* @define FormFieldset */
.FormFieldset {
    position: relative;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 17px 9px 9px; /* Ensures consistent 24px padding around FormGroups */
    margin: 28px 0;
    background-color: var(--surface-default);
}

.FormFieldset-legend {
    position: absolute;
    left: 0;
    top: -24px;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
}

.FormFieldset-content {
    display: flex;
    flex-direction: column;
}

/* Ideally we would not style the FormGroup component here, but this is safest until we retire vanilla fieldsets in favour of FormFieldset */
/* stylelint-disable plugin/selector-bem-pattern */
.FormFieldset .FormGroup {
    margin-bottom: 0;
}
/* stylelint-enable plugin/selector-bem-pattern */
