/**
 * Seeds Link component classes
 * Use these instead of writing out individual Tailwind utility classes.
 *
 * Requires @sproutsocial/seeds-react-theme/dist/theme-all.css imported for
 * CSS variable definitions and dark mode support.
 *
 * Rules live in the Tailwind `components` layer so consumer utility classes
 * (e.g. mx-200, p-300, inline-flex) win the cascade over these defaults.
 */

@layer components {
  .seeds-link {
    border: 0;
    appearance: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    color: var(--color-link-base);
    text-decoration: none;
  }

  .seeds-link-underline {
    text-decoration: underline;
  }

  .seeds-link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
  }

  .seeds-link:active {
    color: var(--color-link-hover);
  }

  .seeds-link:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-button-primary-bg-base),
      0 0 0 4px
        color-mix(in srgb, var(--color-button-primary-bg-base) 30%, transparent);
  }

  .seeds-link:focus:active {
    box-shadow: none;
  }

  .seeds-link-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* When rendered as a button (no href) reset native button chrome so it
     renders as inline text, matching Tailwind Preflight on or off */
  .seeds-link-no-href {
    background: none;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
  }
}
