//
// Copyright IBM Corp. 2020, 2024
//
// 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/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/type' as *;
@use '@carbon/web-components/scss/components/modal/modal' as *;
@use '@carbon/ibmdotcom-styles/scss/globals/vars' as *;
@use '../../globals/imports' as *;

@mixin leaving-ibm {
  :host(#{$c4d-prefix}-leaving-ibm-composite),
  :host(#{$c4d-prefix}-leaving-ibm-container) {
    inline-size: 100%;
  }

  :host(#{$c4d-prefix}-leaving-ibm-modal) {
    @extend :host(#{$prefix}-modal);

    max-block-size: 100%;
  }
  :host(#{$c4d-prefix}-leaving-ibm-modal)[open] {
    @extend :host(#{$prefix}-modal[open]);
  }

  :host(#{$c4d-prefix}-leaving-ibm-modal-heading) {
    @include type-style('fluid-heading-04', true);
  }

  :host(#{$c4d-prefix}-leaving-ibm-modal-body) {
    @extend :host(#{$prefix}-modal-body);

    z-index: 1;

    padding-inline-end: 20%;

    ::slotted(#{$c4d-prefix}-leaving-ibm-modal-supplemental),
    ::slotted(slot[name='supplemental']) {
      display: block;
      color: $text-secondary;
      margin-block-start: $spacing-07;
      @include type-style('label-02');
    }

    > p {
      margin: 0;
      padding-inline-end: 0;
    }

    ::slotted(:last-child) {
      padding-block-end: 0;
    }
    #{$prefix}-link {
      display: inline-block;
      min-block-size: 24px;
    }
  }
  .#{$prefix}--modal-container {
    transform: translate3d(0, 0, 0);
  }
}
