/**
 * Copyright IBM Corp. 2016, 2023
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

@use '@carbon/styles/scss/breakpoint' as *;
@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '../../globals/utils/flex-grid' as *;
@use '../../globals/vars' as *;
@use '../../globals/imports' as *;
@use '../../internal/content-block';
@use '../card-group/card-group';

@mixin content-block-cards {
  :host(#{$c4d-prefix}-content-block-cards),
  .#{$prefix}--content-block-cards .#{$prefix}--content-block {
    display: block;
    padding-block: $spacing-07 $spacing-10;

    @include breakpoint(md) {
      padding-block: $spacing-07 $spacing-12;
    }

    @include breakpoint(lg) {
      padding-block: $spacing-10 $spacing-13;
    }
  }

  :host(#{$c4d-prefix}-content-block-cards) ::slotted([slot='heading']),
  .#{$prefix}--content-block-cards .#{$prefix}--content-block__heading {
    margin-block-end: $spacing-07;

    @include breakpoint(md) {
      margin-block-end: $spacing-09;
    }

    @include breakpoint(lg) {
      margin-block-end: $spacing-07;
    }
  }

  :host(#{$c4d-prefix}-content-block-cards) .#{$prefix}--content-block__cta,
  .#{$prefix}--content-block-cards .#{$prefix}--content-block__cta {
    @include breakpoint(lg) {
      @include make-col(4, 12);
    }
  }

  :host(#{$c4d-prefix}-content-block-cards) .#{$prefix}--content-block__cta {
    padding: 0;
  }

  .#{$prefix}--content-block-cards__content {
    .#{$prefix}--card__CTA {
      margin: 0;
      max-inline-size: none;
    }
  }
}
