/*
 * THE fixed-blue destination, set as the subtree's default ink, since a run addresses ink only via
 * roles; a caller's `Text` inside inherits it too.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-link {
    /* A destination is its own line or flex item; inline is `TextLink`. */
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
    border: 0 solid var(--border);
    border-radius: 0;
    background-color: transparent;
    padding: 0;
    /* §5 rule 1: the UA's button font reaches unwrapped children. */
    font-family: var(--font-sans);
    font-size: var(--lotics-text-sm);
    line-height: var(--lotics-leading-sm);
    letter-spacing: var(--lotics-tracking-sm);
    appearance: none;
    cursor: pointer;
    --lotics-ink-default: var(--lotics-accent);
    color: var(--lotics-ink-default);
    --lotics-icon-color: currentColor;
  }

  /*
   * Drawn by the link on reach: a decoration propagates to descendants (CSS Text Decoration 3
   * §2.4), so no other component's class is named.
   */
  .lotics-link:hover,
  .lotics-link:focus-visible {
    text-decoration-line: underline;
  }

  .lotics-link:focus-visible {
    outline: var(--lotics-ring-width) solid var(--ring);
    outline-offset: 0;
  }
}
