/**
 * Copyright IBM Corp. 2016, 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/utilities/convert';
@use '@carbon/type';

@include type.reset();

@mixin notice-choice {
  .#{$prefix}--nc {
    max-inline-size: 640px;

    p,
    .#{$prefix}--checkbox-group {
      margin-block-end: $spacing-06;
      @include type.type-style('legal-02');
    }

    a {
      color: $link-primary;
    }

    // RTL styling
    :dir(rtl) {
      .#{$prefix}--checkbox-label-text {
        padding-inline-end: convert.to-rem(10px);
      }

      .#{$prefix}--checkbox-label::after {
        margin-block-start: 0;
        margin-inline-start: convert.to-rem(-1px);
        transform-origin: center;
      }

      .#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::after,
      .#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
        transform: scale(1.2) rotate3d(0.5, 1, 0, 158deg);
      }
    }
  }
}
