@use "@s360-base-theme/ui-core/site-config";
@use "@s360-base-theme/ui-core/content-containers";

.layout {
  container-name: layout;
  container-type: inline-size;

  > .layout__content {
    > .layout__regions {
      display: grid;
      row-gap: site-config.$spacer-0;
      column-gap: site-config.$column-gap;
    }
  }

  // Make sure paragraphs inside regions don't touch each other.
  .layout__region {
    container-name: layout-region;
    container-type: inline-size;
    display: grid;
    grid-auto-rows: min-content;
    grid-template-columns: minmax(0, 1fr);
    row-gap: site-config.$spacer-0;
  }

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

  // **************************************************
  // BOTTOM MARGINS

  &.layout--margin-bottom-sm {
    margin-bottom: site-config.$spacer-0;
  }

  &.layout--margin-bottom-md {
    margin-bottom: site-config.$spacer-0;
  }

  &.layout--margin-bottom-lg {
    margin-bottom: site-config.$spacer-0;
  }
}
