.shortcut {
  padding: spacing(-1);
  box-shadow: $shadow-style-front color('shadow');
  @include set-colors('interactive');
  
  &:hover {
    background-color: color('interactive-hover');
    outline: none;
  }
  
  &:active {
    box-shadow: $shadow-style-back color('shadow');
    outline: none;
  }
  
  &--highlighted {
    @include set-colors('theme');

    &:hover {
      background-color: color('theme-hover');
    }
  }

  &--icon {
    padding-right: spacing(0);
    display: flex;
    justify-content: space-between;

    &::before {
      font-family: "font-awesome"; // Ensure the font is loaded correctly
      font-weight: 300;
      -moz-osx-font-smoothing: grayscale;
      -webkit-font-smoothing: antialiased;
      text-rendering: auto;
      font-size: var(--font-size-p1);
      width: var(--font-size-p1);
      line-height: calc(1.1em + 0.3rem);
      align-self: center;
      order: 10; // Ensure the icon is positioned far right
      margin-left: spacing(-2); // Keep space between text and icon
    }

    &--internal::before {
      content: "\f105"; // Matches .icon-link-internal
    }

    &--external::before {
      content: "\e09f"; // Matches .icon-link-external
    }
  }

  p {
    line-height: line-height('single');
  }
}

.shortcut__text {
  order: 1; // Ensure the text is positioned far left when .shortcut--icon is used
  min-width: 0;
  @include content-container;
  hyphens: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}