// ============================================================================
// :: Section
// ============================================================================

// ============================================================================
// :: Root
// ============================================================================
.l-section {
  padding: 2rem 0;
  width: 100%;

  @include respond-at($breakpoint-tablet-default) {
    padding: 3rem 0;
  }
}

// ============================================================================
// :: Elements
// ============================================================================
.l-section__header {
  margin-bottom: 3rem;
}

.l-section__header-actions {
  >* {
    margin-right: 1.5rem;

    @include respond-at($breakpoint-desktop-default) {
      margin-right: 2.5rem;
    }

    &:last-child {
      margin-right: 0;
    }
  }
}

.l-section__title {
  margin-bottom: 0.2rem;

  word-break: break-word;

  @include respond-at($breakpoint-tablet-default) {
    margin-bottom: 0.5rem;
  }

  &:only-child,
  &:last-child {
    margin-bottom: 0;
  }
}

.l-section__sub-title {
  display: block;

  font-style: normal;

  @extend %__text-default;
}

//.l-section__content {}

.l-section__footer {
  margin-top: 3rem;

  @include respond-at($breakpoint-tablet-default) {
    margin-top: 4rem;
  }
}

// Mobile bottom inset for the fixed nav is on `main.l-root__content` (_root.scss).

// ============================================================================
// :: Modifiers
// ============================================================================
.l-section__header--with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.l-section__footer--full-width,
.l-section__header--full-width {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;

  >* {
    width: 100%;
    margin-bottom: 1.5rem;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.l-section__header--center {
  text-align: center;
}

.l-section__header--spacing-small {
  margin-bottom: 1.5rem;
}

.l-section__footer--center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;

  @include respond-at($breakpoint-tablet-default) {
    flex-direction: row;
    align-items: center;
  }
}

.l-section__sub-title--italic {
  font-style: italic;
}

.l-section__sub-title--grey {
  color: $text-color-medium;
}