/*
 * Copyright IBM Corp. 2022, 2025
 *
 * 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/react/scss/breakpoint' as breakpoint;
@use '@carbon/react/scss/spacing' as spacing;
@use '@carbon/react/scss/theme' as theme;
@use '@carbon/react/scss/type' as type;

@use '../utils' as *;

.#{with-prefix('aside')} {
  @include type.type-style('body-01');

  position: relative;
  color: theme.$text-primary;
  inset-block-start: -(spacing.$spacing-04);

  @include breakpoint.breakpoint('lg') {
    padding-block-start: spacing.$spacing-04;
  }

  @include breakpoint.breakpoint('lg') {
    //spacing values came from IDL site design
    padding-inline-end: 26%;
  }

  > div,
  > div ol:first-child {
    margin-block-start: 0;
  }

  p,
  li {
    @include type.type-style('body-01');
  }

  @include breakpoint.breakpoint('md') {
    &::before {
      position: absolute;
      background: theme.$border-inverse;
      block-size: 1px;
      content: '';
      inline-size: 40%;
      inset-block-start: 0;
      inset-inline-start: -(spacing.$spacing-05);
    }
  }
}

.#{with-prefix('aside--no-rule')}::before {
  content: none;
}
