/* forum-ux.css — Discourse-style forum interactions: user cards, topic scroll
   navigator, "where you left off", quote/live-like polish, profile summary.
   Visual skin stays neutral-glass so the Christmas theme, snow and background
   art (forum-festive.css) remain exactly as they are. */

/* ---------- User card popover ---------- */
.nsm-user-card {
  position: fixed;
  z-index: 4200;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: rgba(13, 18, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px;
  color: #e8ecf4;
  font-size: 13px;
  animation: nsm-ucard-in 0.14s ease-out;
}
@keyframes nsm-ucard-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.nsm-user-card .uc-top { display: flex; gap: 12px; align-items: center; }
.nsm-user-card .uc-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex: none;
}
.nsm-user-card .uc-name { font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.2; }
.nsm-user-card .uc-name a { color: #fff; text-decoration: none; }
.nsm-user-card .uc-handle { color: #9aa3b2; font-size: 12px; }
.nsm-user-card .uc-title { color: var(--xmas-gold, #f0c060); font-size: 12px; margin-top: 2px; }
.nsm-user-card .uc-role {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(47, 123, 255, 0.22); color: #9db9ff; border: 1px solid rgba(47, 123, 255, 0.4);
}
.nsm-user-card .uc-bio {
  margin: 10px 0 0; color: #c3cad6; line-height: 1.45;
  max-height: 62px; overflow: hidden;
}
.nsm-user-card .uc-meta { margin-top: 8px; color: #8b93a3; font-size: 11.5px; }
.nsm-user-card .uc-stats {
  display: flex; gap: 14px; margin-top: 11px; padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.nsm-user-card .uc-stat { text-align: center; flex: 1; }
.nsm-user-card .uc-stat b { display: block; font-size: 15px; color: #fff; }
.nsm-user-card .uc-stat span { color: #8b93a3; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.nsm-user-card .uc-actions { display: flex; gap: 8px; margin-top: 12px; }
.nsm-user-card .uc-actions a {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px;
  font-weight: 600; font-size: 12.5px; text-decoration: none;
  background: rgba(255, 255, 255, 0.08); color: #e8ecf4;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.nsm-user-card .uc-actions a.uc-primary {
  background: linear-gradient(180deg, #e05252, #d94141);
  border-color: rgba(240, 192, 96, 0.4); color: #fff;
}
.nsm-user-card .uc-actions a:hover { filter: brightness(1.12); }

/* ---------- Topic scroll navigator (the "scroll thing") ---------- */
.nsm-topic-progress {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4100;
  width: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.nsm-topic-progress .tp-track {
  position: relative;
  width: 6px;
  flex: 1;
  min-height: 120px;
  max-height: 46vh;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}
.nsm-topic-progress .tp-fill {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--xmas-gold, #f0c060), var(--xmas-green-hi, #35c46f));
}
.nsm-topic-progress .tp-thumb {
  position: absolute;
  left: 50%;
  width: 16px; height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #d94141;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.nsm-topic-progress .tp-tip {
  position: absolute;
  right: 26px;
  transform: translateY(-50%);
  background: rgba(10, 14, 26, 0.95);
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.nsm-topic-progress .tp-track:hover .tp-tip,
.nsm-topic-progress .tp-track.dragging .tp-tip { opacity: 1; }
.nsm-topic-progress .tp-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(13, 18, 34, 0.82);
  color: #e8ecf4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nsm-topic-progress .tp-btn:hover { background: rgba(217, 65, 65, 0.85); color: #fff; }
@media (max-width: 980px) {
  .nsm-topic-progress {
    right: 10px; top: auto; bottom: 64px; transform: none;
    flex-direction: row; width: auto;
  }
  .nsm-topic-progress .tp-track { width: 110px; min-height: 0; height: 6px; }
  .nsm-topic-progress .tp-fill { height: 100% !important; width: var(--tp-pct, 0%); }
  .nsm-topic-progress .tp-thumb { top: 50% !important; margin-top: -8px; margin-left: 0; left: var(--tp-pct, 0%); }
  .nsm-topic-progress .tp-tip { right: auto; bottom: 22px; transform: translateX(-50%); }
}

/* ---------- "Continue from where you left off" ---------- */
.nsm-leftoff {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(47, 123, 255, 0.14);
  border: 1px solid rgba(47, 123, 255, 0.35);
  color: #cfe0ff;
  font-size: 13.5px;
}
.nsm-leftoff b { color: #fff; }
.nsm-leftoff button {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nsm-leftoff button:hover { background: rgba(47, 123, 255, 0.5); }

/* ---------- Profile summary tiles (Discourse-style) ---------- */
.nsm-summary {
  margin: 14px 0;
  padding: 16px;
  border-radius: 12px;
  background: rgba(13, 18, 34, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8ecf4;
}
.nsm-summary h3 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--xmas-gold, #f0c060);
}
.nsm-summary .ns-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.nsm-summary .ns-tile {
  padding: 11px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.nsm-summary .ns-tile b { display: block; font-size: 17px; color: #fff; }
.nsm-summary .ns-tile span { color: #8b93a3; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.nsm-summary .ns-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
@media (max-width: 820px) { .nsm-summary .ns-cols { grid-template-columns: 1fr; } }
.nsm-summary .ns-list { list-style: none; margin: 0; padding: 0; }
.nsm-summary .ns-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  line-height: 1.45;
}
.nsm-summary .ns-list li:last-child { border-bottom: 0; }
.nsm-summary .ns-list a { color: #cfe0ff; text-decoration: none; font-weight: 600; }
.nsm-summary .ns-list a:hover { color: var(--xmas-gold, #f0c060); }
.nsm-summary .ns-list .ns-sub { color: #8b93a3; font-size: 11px; display: block; }
.nsm-summary .ns-empty { color: #8b93a3; font-size: 12px; }

/* ---------- Post action polish ---------- */
.widget-button.like.has-like svg { fill: #fa6c8d !important; transition: transform 0.15s; }
.widget-button.like.bump svg { transform: scale(1.35); }

/* ---------- Presence ("Seen …") ---------- */
.nsm-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nsm-presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex: none;
}
.nsm-presence.is-online .nsm-presence-dot {
  background: #35c46f;
  box-shadow: 0 0 0 3px rgba(53, 196, 111, 0.18);
  animation: nsm-presence-pulse 2.6s ease-in-out infinite;
}
@keyframes nsm-presence-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Centered reading column (FiveM/Discourse topic layout) ----------
   The post stream sits in the middle of the outlet with the timeline to its
   right — and stays centered whether the left sidebar is open or collapsed. */
.d-main-outlet > #topic-title,
.d-main-outlet > .container.posts {
  max-width: 996px;
  margin-left: auto;
  margin-right: auto;
}
.container.posts > .row {
  justify-content: center;
}
@media (max-width: 980px) {
  .d-main-outlet > #topic-title,
  .d-main-outlet > .container.posts {
    max-width: none;
  }
}

/* ==========================================================================
   Forum index: NSMultiplayer + AFX category sections, taller Latest column
   ========================================================================== */
.category-section { margin-bottom: 26px; }
.category-section:last-child { margin-bottom: 0; }
.category-section-heading {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f0f2f5;
  padding: 4px 8px 10px;
  border-bottom: 3px solid #262a34;
  margin-bottom: 4px;
}
/* Latest column stretches to the bottom of the categories column so many
   posts can be shown in it. */
.categories-and-latest { align-items: stretch; }
.categories-and-latest .column.latest-col { display: flex; flex-direction: column; }
.latest-topic-list { flex: 1; display: flex; flex-direction: column; }
.latest-topic-list .latest-topic-list-item { flex: 1; align-items: center; }

/* ==========================================================================
   Topic page: post action buttons (Reply etc.) must never wrap into a mess
   ========================================================================== */
nav.post-controls .actions { flex-wrap: nowrap; }
.widget-button { white-space: nowrap; flex-shrink: 0; }
.widget-button .d-button-label { white-space: nowrap; }

/* ==========================================================================
   Topic page: the gray sheet behind the posts is narrower so a little of the
   site background shows around it (topic pages only).
   ========================================================================== */
body.dc-ember-body.archetype-regular .d-main-outlet {
  max-width: 1180px;
  margin: 14px auto;
}

/* ==========================================================================
   Topic page: topic-map bubble — stats and avatars must fit, never overflow
   ========================================================================== */
.topic-map { max-width: 100%; overflow: hidden; }
.topic-map section.map ul { gap: 8px 12px; padding: 10px 12px; }
.topic-map li { min-width: 0; }
.topic-map li .number,
.topic-map li .relative-date { white-space: nowrap; }
.topic-map li.avatars { margin-left: auto; flex-shrink: 0; }
.topic-map li.avatars img.avatar { width: 24px; height: 24px; }

/* Post signature / user title: long text wraps inside its bubble */
.d-post-signature { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.topic-meta-data { min-width: 0; }
.topic-meta-data .names { min-width: 0; flex: 1 1 auto; }
.post-infos { flex-shrink: 0; }
.topic-meta-data .names .user-title { overflow-wrap: anywhere; }
.topic-meta-data .names { min-width: 0; }
.topic-meta-data .names .first.username,
.topic-meta-data .names .second.full-name { overflow-wrap: anywhere; }

/* ==========================================================================
   Header: notification bell + red dot on the N logo
   ========================================================================== */
.d-logo-link { position: relative; }
.nsm-logo-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f43f5e;
  border: 2px solid #10131a;
  box-shadow: 0 0 0 1px rgba(244,63,94,0.4);
}
.d-header-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #e6e8ec;
  flex-shrink: 0;
}
.d-header-bell:hover { background: rgba(255,255,255,0.08); }
.d-header-bell svg { width: 20px; height: 20px; }
.d-header-bell .nsm-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  border: 2px solid #10131a;
}

/* ==========================================================================
   Header notification bell dropdown
   ========================================================================== */
.nsm-bell-wrap { position: relative; }
button.d-header-bell { background: transparent; border: none; cursor: pointer; padding: 0; }
.nsm-bell-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #171a21;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 1200;
  overflow: hidden;
}
.nsm-bell-head {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  color: #f0f2f5;
  border-bottom: 1px solid #262a34;
}
.nsm-bell-list { max-height: 340px; overflow-y: auto; }
.nsm-bell-item {
  display: block;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #d6dce8;
  text-decoration: none;
}
.nsm-bell-item:hover { background: rgba(255,255,255,0.05); }
.nsm-bell-item .t { font-weight: 600; font-size: 13.5px; color: #f0f2f5; display: block; }
.nsm-bell-item .e { font-size: 12.5px; color: #9aa3b2; display: block; margin-top: 2px; }
.nsm-bell-item.unread { background: rgba(47,123,255,0.10); }
.nsm-bell-item.unread .t::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #2F7BFF; margin-right: 7px; vertical-align: 1px;
}
.nsm-bell-empty { padding: 18px 16px; color: #9aa3b2; font-size: 13.5px; text-align: center; }
.nsm-bell-foot {
  display: block;
  padding: 11px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #7fb3ff;
  border-top: 1px solid #262a34;
}
.nsm-bell-foot:hover { background: rgba(255,255,255,0.04); }

/* ==========================================================================
   Sidebar scrollbar: bigger grabbable slider, up/down cursor, smooth drag
   ========================================================================== */
.sidebar-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #3a4152 transparent;
  scroll-behavior: smooth;
}
.sidebar-wrapper::-webkit-scrollbar { width: 12px; }
.sidebar-wrapper::-webkit-scrollbar-track { background: transparent; }
.sidebar-wrapper::-webkit-scrollbar-thumb {
  background: #3a4152;
  border-radius: 8px;
  border: 2px solid #13151a;
  cursor: ns-resize;
}
.sidebar-wrapper::-webkit-scrollbar-thumb:hover { background: #4a5266; }
.sidebar-wrapper::-webkit-scrollbar-thumb:active { background: #5a6478; cursor: ns-resize; }

/* ==========================================================================
   Verified (founder) + staff avatar flairs — green check / shield badge
   ========================================================================== */
.avatar-flair.flair-verified {
  background: #22c55e !important;
  color: #ffffff !important;
}
.avatar-flair.flair-verified svg { width: 12px; height: 12px; }
.avatar-flair.flair-staff {
  background: #2F7BFF !important;
  color: #ffffff !important;
}
.avatar-flair.flair-staff svg { width: 11px; height: 11px; }
.user-main .about .details .user-profile-avatar .avatar-flair.flair-verified svg { width: 17px; height: 17px; }
.user-main .about .details .user-profile-avatar .avatar-flair.flair-staff svg { width: 16px; height: 16px; }

/* Topic watch bell: solid/filled while watching */
.nsm-watch-btn.watching {
  background: #2F7BFF !important;
  border-color: #2F7BFF !important;
  color: #ffffff !important;
}
.nsm-watch-btn.watching svg { fill: currentColor; }

/* Verified badge next to the founder's avatar in topic lists */
.nsm-verified-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  color: #22c55e;
  display: inline-flex;
}
.nsm-verified-badge svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.topic-poster { position: relative; }
