/*
 * User Preference: Link Indicators
 *
 * When body has the .link-indicators class (set from current_user.preference(:show_link_indicators)),
 * a small ↗ arrow is appended after content links to make them visually distinct from plain text.
 *
 * Excluded:
 *   - Sidebar / navbar navigation
 *   - Icon-only links (svg/img/i with no text)
 *   - Empty or javascript: hrefs
 *   - Links with explicit .no-indicator class
 */

body.link-indicators a[href]:not([href=""]):not([href^="javascript"]):not(.no-indicator)::before {
  content: "⋮⋮ ";
  font-size: 1.0em;
  vertical-align: baseline;
  line-height: 1;
  opacity: 1.00;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

/* Exclude sidebar, navbar, and header navigation areas */
body.link-indicators nav a::after,
body.link-indicators aside a::after,
body.link-indicators header a::after,
body.link-indicators [data-controller*="sidebar"] a::before {
  content: none !important;
}

/* Exclude icon-only links (containing only an svg, i, or img child) */
body.link-indicators a:has(> svg:only-child)::after,
body.link-indicators a:has(> i:only-child)::after,
body.link-indicators a:has(> img:only-child)::before {
  content: none !important;
}

/* ─── Preferences page live preview ─────────────────────────────────────── */
#link-indicator-preview.preview-indicators-on a.preview-link::before {
  content: "⋮ ";
  font-size: 1em;
  vertical-align: baseline;
  opacity: 1;
  font-weight: 900;
}
