// Lightning Design System 2.8.0
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

@import 'deprecate';

/**
 * @summary Creates a form that consists of multiple form groups
 *
 * @name compound
 * @selector .slds-form_compound
 * @restrict div, fieldset
 * @variant
 */
.slds-form_compound,
.slds-form--compound {
  width: 100%;

  .slds-form-element__row {
    display: flex;
    margin-bottom: $spacing-xx-small;

    + .slds-form-element__row {
      clear: both;
    }

    .slds-form-element {
      margin-bottom: 0;
    }

    .slds-form-element + .slds-form-element {
      padding-left: $spacing-x-small;
      margin-top: 0;
    }

    .slds-form-element__label {
      padding-top: 0;
    }
  }
}

/**
 * @summary Creates a form that consists of multiple form groups specific to an address form
 *
 * @name address
 * @selector .slds-form-element_address
 * @restrict .slds-form_compound
 * @modifier
 */
.slds-form-element_address {

  .slds-form-element__row {
    align-items: flex-end;
  }
}
