@use "00-base/configure" as *;

.ma__stacked-row {
  position: relative;

  &__section {

    & ~ & {

      @media ($bp-large-max) {
        border-top-width: 1px;
        border-top-style: solid;
      }

      .ma__stacked-row__title .ma__comp-heading {
        margin-top: 15px;
      }
    }

    & ~ &--borderless {

      @media ($bp-large-max) {
        border-top-width: 0;
      }
    }

    & .main-content .page-content {

      > .ma__action-finder,
      > .ma__divider,
      > .ma__event-listing,
      > .ma__mapped-locations {

        @include ma-component-spacing('large');
      }
    }

    & .main-content .page-content {

      > .ma__split-columns {

        @include ma-component-spacing;
      }
    }

    & .main-content.main-content--full .page-content > .ma__key-actions {

      @include ma-component-spacing('large');
    }

  }

  &__container {

    @include ma-container;
  }

  // reduce the width of the title and border

  &__section--restricted + &__section--restricted &__container {

    @include ma-container('restricted');
  }

  &__section ~ &__section &__container:before {
    content: "";
    display: block;

    @media ($bp-large-min) {
      border-top-width: 1px;
      border-top-style: solid;
    }
  }

  &__section ~ &__section--borderless &__container:before {

    @media ($bp-large-min) {
      border-top-width: 0;
    }
  }

  &__section--restricted &__title {
    max-width: 820px;
  }
  
  // margin adjustment for callout-message (feature message)

  // & &__section:first-child .main-content .page-content > section:not(.ma__callout-message__container)

  & &__section:first-child .main-content .page-content > .ma__featured-item-mosaic,
  & &__section:first-child .main-content .page-content > .ma__contact-list {
    margin-top: calc(0.45em + 22px);

    @media ($bp-x-small-min) {
      margin-bottom: calc(0.45em + 18px);
    }
  }
}

//theme

.ma__stacked-row {

  &__section {

    & ~ & {
      border-color: $c-bd-divider;

      .ma__stacked-row__container:before {
        border-color: $c-bd-divider;
      }
    }
  }
}
