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

// Standard imports.
@import '../../global/styles/project-settings';

// CreateTearsheetNarrow uses the following Carbon components:
// Form
@import 'carbon-components/scss/components/form/form';

// CreateTearsheetNarrow uses the following IBM Products components:
// TearsheetNarrow
@import '../Tearsheet/tearsheet';

// Define all component styles in a mixin which is then exported using
// the Carbon import-once mechanism.
@mixin create-tearsheet-narrow {
  // The block part of our conventional BEM class names (blockClass__E--M).
  $block-class: #{$pkg-prefix}--create-tearsheet-narrow;

  .#{$block-class} .#{$carbon-prefix}--modal-header__heading,
  .#{$block-class} .#{$carbon-prefix}--modal-header__label,
  .#{$block-class} .#{$pkg-prefix}--tearsheet__header-description {
    max-width: 100%;
    padding-right: calc(20% - #{$spacing-05});
  }

  .#{$block-class} .#{$pkg-prefix}--tearsheet__header-description {
    margin-top: $spacing-02;
  }

  .#{$block-class} .#{$pkg-prefix}--tearsheet__header {
    border-bottom: 1px solid $decorative-01;
  }

  .#{$block-class} .#{$pkg-prefix}--tearsheet__content {
    padding: $spacing-05;
  }

  .#{$block-class} .#{$block-class}__form {
    padding-top: $spacing-05;
  }

  .#{$block-class} .#{$block-class}__form > * {
    margin-bottom: $spacing-05;

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

  .#{$block-class} .#{$block-class}__form-title-text {
    @include carbon--type-style('productive-heading-02');

    padding-bottom: $spacing-03;
  }

  .#{$block-class} .#{$block-class}__form-description-text {
    @include carbon--type-style('body-long-01');
  }
}

@include exports('create-tearsheet-narrow') {
  @include create-tearsheet-narrow;
}
