/**
 * Bootstrap grid
 */

@use "../settings" as *;
@use "../tools" as *;

@import "bootstrap/scss/containers";
@import "bootstrap/scss/grid";

/* Change default vertical gutter on wrapping columns when in a grid. */
.row-card {
  --#{$prefix}gutter-y: #{$grid-gutter-height};

  margin-bottom: $grid-gutter-height;

  .card {
    height: 100%;
    &:not(:last-child) {
      margin-bottom: $grid-gutter-height;
    }
  }
}

.row-card-uneven {
  --#{$prefix}gutter-y: #{$grid-gutter-height};

  margin-bottom: $grid-gutter-height;
}

/* Add special 2/9 and 3/9 column widths for the "4-col with wide right" layout */
.col-narrow {
  @include media-breakpoint-only(md) {
    @include make-col(1, 3);
  }
  @include media-breakpoint-up(lg) {
    @include make-col(2, 9);
  }
}

.col-wide {
  @include media-breakpoint-up(lg) {
    @include make-col(3, 9);
  }
}

/* Allow cards to be stacked in a column */
.col-stacked > .card {
  &:not(:last-child) {
    margin-bottom: $grid-gutter-height;
  }
}
