@use "@naomi-2025/ui-core/site-config";
@use "@naomi-2025/ui-core/heading-styles";
@use "@naomi-2025/ui-core/text-styles";
@use "@naomi-2025/ui-core/animate-underline";
@use "s360-scss-toolkit";

.ckeditor {
  // Set ul/ol vars.
  --list--line-height: #{ site-config.$text-line-height };
  --list--max-width: #{ site-config.$max-line-length };

  :is(h2, h3, h4, h5, h6) {
    @extend %heading-style-margin-top;
    @extend %heading-style-margin-bottom;
  }

  figure {
    --figure--display: table;

    margin-bottom: site-config.spacer(0);

    &.align-left {
      margin-right: site-config.spacer(0);
      float: left;
    }

    &.align-right {
      margin-left: site-config.spacer(0);
      float: right;
    }
  }

  code,
  p.intro-copy {
    @extend %text-style-intro-copy;
  }

  p.small-copy {
    @extend %text-style-small-copy;
  }

  ul, ol {
    li {
      a {
        @extend %animate-underline-to-right;
      }
    }
  }
}
