/*
 * Copyright (c) 2026, Salesforce, Inc.,
 * All rights reserved.
 * For full license text, see the LICENSE.txt file
 */

/**
 * @summary Causes description list to display horizontally with `dt` followed immediately by the `dd`.
 * @selector .slds-dl_inline
 * @modifier
 */
.slds-dl_inline::after {
  content: '';
  display: table;
  clear: both;
}

@media (min-width: 30em) {
  /**
    * @summary Marks a term
    */
  .slds-dl_inline__label {
    float: inline-start;
    clear: inline-start;
  }

  /**
    * @summary Marks a description
    */
  .slds-dl_inline__detail {
    float: inline-start;
    padding-inline-start: var(--slds-g-spacing-1);
  }
}

.slds-region_narrow {
  .slds-dl_inline__label,
  .slds-dl_inline__detail {
    float: inline-start;
  }

  .slds-dl_inline__label {
    clear: inline-start;
  }

  .slds-dl_inline__detail {
    padding-inline-start: var(--slds-g-spacing-1);
  }

  .slds-dl_horizontal {
    display: flex;
    flex-wrap: wrap;

    .slds-dl_horizontal__label {
      width: 30%;
      padding-inline-end: var(--slds-g-spacing-3);
    }

    .slds-dl_horizontal__detail {
      width: 70%;
    }
  }
}

@media (min-width: 30em) {
  /**
    * @summary Causes description list to display horizontally with `dt` consuming 33% of the space and the `dd` taking up the rest.
    */
  .slds-dl_horizontal {
    display: flex;
    flex-wrap: wrap;
  }

  /**
    * @summary Marks a term
    */
  .slds-dl_horizontal__label {
    width: 30%;
    padding-inline-end: var(--slds-g-spacing-3);
  }

  /**
    * @summary Marks a description
    */
  .slds-dl_horizontal__detail {
    width: 70%;
  }
}
