/**
 * FORRE_DARK - Guest username blur ("registreringsvägg light")
 * Blurs registered users' names for logged-out visitors to drive registration.
 * Content (posts, threads, stats) stays readable; only the identity is gated.
 * Only active under body.tw-guest (logged-out). Logged-in users are unaffected.
 *
 * Mechanism: JS wraps a name's text node in .tw-uname-blur and appends a sharp
 * lock icon. CSS below blurs ONLY the text (transparent + shadow) so sibling
 * badges (LIVE / DU), avatars and pills stay crisp.
 */

/* The blurred name text itself */
body.tw-guest .tw-uname-blur {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

/* Locked nav menu items (guests): small lock + slightly dimmed */
body.tw-guest .tw-nav-menu-link.tw-nav-locked { opacity: 0.82; }
body.tw-guest .tw-nav-lock-ico {
  font-size: 9px;
  margin-left: auto;
  padding-left: 8px;
  color: var(--text-tertiary);
  opacity: 0.7;
}
body.tw-guest .tw-nav-menu-link.tw-nav-locked:hover .tw-nav-lock-ico { color: var(--primary); opacity: 1; }

/* The lock icon stays sharp (overrides inherited transparent/blur) */
body.tw-guest .tw-uname-lock {
  color: var(--text-tertiary) !important;
  -webkit-text-fill-color: var(--text-tertiary) !important;
  text-shadow: none !important;
  font-size: 0.72em;
  margin-left: 0.4em;
  cursor: pointer;
  vertical-align: baseline;
  opacity: 0.9;
}
body.tw-guest .tw-uname-lock:hover {
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
  opacity: 1;
}

/* Pre-blur for name-only elements to avoid a flash before JS runs.
   (Mixed containers like .tw-rk-name are handled by JS only, since they hold
   sibling badges that must stay sharp.) */
body.tw-guest .tw-lb-pname,
body.tw-guest .tw-lb-mobile-name,
body.tw-guest .tw-top10-name,
body.tw-guest .tw-fid-pop-name,
body.tw-guest .tw-shout-ticker-user,
body.tw-guest .tw-wall-fame-champion-name,
body.tw-guest .tw-wall-fame-widget strong,
body.tw-guest .tw-fp-name,
body.tw-guest .tw-event-lfg-name,
body.tw-guest .tw-guest-player-pill,
body.tw-guest .m-name {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
/* but keep the injected lock sharp even inside those pre-blurred elements */
body.tw-guest .tw-lb-pname .tw-uname-lock,
body.tw-guest .tw-lb-mobile-name .tw-uname-lock,
body.tw-guest .tw-top10-name .tw-uname-lock,
body.tw-guest .tw-fid-pop-name .tw-uname-lock,
body.tw-guest .tw-shout-ticker-user .tw-uname-lock,
body.tw-guest .tw-wall-fame-champion-name .tw-uname-lock,
body.tw-guest .tw-wall-fame-plaque strong .tw-uname-lock,
body.tw-guest .tw-fp-name .tw-uname-lock,
body.tw-guest .tw-event-lfg-name .tw-uname-lock,
body.tw-guest .tw-guest-player-pill .tw-uname-lock,
body.tw-guest .m-name .tw-uname-lock {
  color: var(--text-tertiary) !important;
  -webkit-text-fill-color: var(--text-tertiary) !important;
  text-shadow: none !important;
}
