/* Niguro page CSS: forums pages (built on the page kit in niguro.css; see dev/niguro-kit.md).
   Loaded on every page, so everything is scoped to .ng-forums (the forums hub wrapper). */

/* cards placed straight in the hub frame (tab lists, forms) keep the frame's 16px rhythm
   (.ng-lcard / .ng-fcard reset their margin to 0, which would otherwise win) */
.ng-forums.ng-hubwrap > * + * { margin-top: 16px; }

/* small shared bits: count pill, round icon button, phone-only / label-hide helpers, meta with icon */
.ng-forums .ng-fcount {
  flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--ng-fill); color: var(--ng-sub); font-size: 12.5px; font-weight: 700;
}
.ng-forums .ng-ficon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ng-sub); cursor: pointer; transition: background .15s, color .15s;
}
.ng-forums .ng-ficon:hover { background: var(--ng-fill); color: var(--ng-ink-strong); }
.ng-forums .ng-ficon .ng-ico { width: 20px; height: 20px; transition: rotate .2s; }
.ng-forums .js_forum-toggle[aria-expanded="false"] .ng-ico { rotate: -90deg; }
.ng-forums .ng-ficonbtn { width: 38px; padding: 0; }
.ng-forums .ng-fmeta { display: inline-flex; align-items: center; gap: 4px; }
.ng-forums .ng-fmeta .ng-ico { width: 14px; height: 14px; }
.ng-forums .ng-fclamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ng-forums .ng-fnote { margin: 0; padding: 16px 18px; font-size: 13.5px; color: var(--ng-sub); }
@media (min-width: 768px) { .ng-forums .ng-fsm { display: none; } }
@media (max-width: 767.98px) {
  .ng-forums .ng-flabel { display: none; }
  .ng-forums .ng-ptabs__acts .ng-pbtn { width: 38px; padding: 0; }
}

/* dropdowns (Start a Discussion, the post menus): icon + label items; the forum picker scrolls */
.ng-forums .dropdown-item { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: 14px; color: var(--ng-ink); }
.ng-forums .dropdown-item .ng-ico { width: 18px; height: 18px; color: var(--ng-sub); }
.ng-forums .dropdown-item.js_delete-forum, .ng-forums .dropdown-item.js_delete-forum .ng-ico { color: hsl(var(--destructive)); }
.ng-forums .ng-fpick { min-width: 240px; max-height: min(60vh, 420px); overflow-y: auto; }
.ng-forums .ng-fpick .dropdown-header { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ng-sub); }
.ng-forums .ng-fpick .dropdown-item { padding-left: calc(12px + var(--ng-fdepth, 0) * 14px); }

/* [Layout: forum sheets] under 1024px a menu opens as the theme's bottom sheet (forums.tpl's script dims the page and
   adds .ng-fsheet; niguro.css "[Niguro sheets]" has the same look for the header's and the create menu's): full
   width from the bottom, the handle, 24px top corners, a phone's width on tablets, safe-area padding, 48px rows;
   it slides up, and down when it closes. From 1024px the popovers stay. (user, 2026-10-18) */
@media (max-width: 1023.98px) {
  .ng-forums .dropdown-menu.ng-fsheet {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 1001;
    width: 100%; min-width: 0; max-width: none; margin: 0; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 0 max(8px, calc(50% - 320px)) calc(12px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 24px 24px 0 0; background: var(--ng-card); box-shadow: 0 -8px 32px hsl(30 20% 10% / .14);
    animation: ng-sheet-up .28s cubic-bezier(.2, .8, .2, 1) both;
  }
  .ng-forums .dropdown-menu.ng-fsheet::before { content: ""; display: block; width: 40px; height: 5px; margin: 8px auto 6px; border-radius: 3px; background: var(--ng-line); }
  .ng-forums .dropdown-menu.ng-fsheet.is-closing { animation: ng-sheet-down .24s cubic-bezier(.4, 0, .6, 1) both; }
  .ng-forums .dropdown-menu.ng-fsheet.ng-noanim { animation: none; }
  .ng-forums .ng-fsheet .dropdown-item { min-height: 48px; padding-top: 0; padding-bottom: 0; border-radius: 12px; font-size: 15px; }
  .ng-forums .ng-fsheet .dropdown-item .ng-ico { width: 20px; height: 20px; }
  .ng-forums .ng-fpick.ng-fsheet .dropdown-header { padding: 12px 12px 4px; }
}
@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
  .ng-forums .dropdown-menu.ng-fsheet, .ng-forums .dropdown-menu.ng-fsheet.is-closing { animation-duration: .01s; }
}
/* [/Layout: forum sheets] */

/* section cards: Sngine's .forum-category (kept for the js_forum-toggle hook) reset to the kit's head */
.ng-forums .ng-lcard__head.forum-category { margin: 0; padding: 8px 10px 8px 18px; border-radius: 0; background: transparent; color: var(--ng-ink-strong); font-size: 15px; }
.ng-forums .ng-lcard__head.forum-category a { color: inherit; text-decoration: none; }
.ng-forums .ng-lcard__head.forum-category a:hover { color: var(--ng-brand); text-decoration: none; }
.ng-forums .ng-lcard__head .ng-ico { flex: none; }
.ng-forums .ng-lcard__more { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.ng-forums .ng-lcard__more .ng-ico { width: 16px; height: 16px; color: currentColor; }
.ng-forums .ng-lcard__title q { quotes: "\201C" "\201D"; color: var(--ng-brand); }

/* forum rows: name, description, sub-forums in two columns, stat boxes, last post */
.ng-forums .ng-frow { align-items: start; }
.ng-forums .ng-frow > .ng-lrow__stats, .ng-forums .ng-frow > .ng-lrow__last { align-self: center; }
.ng-forums .ng-frow__name { margin: 0; font: inherit; }
.ng-forums .ng-frow .ng-lrow__title:hover { color: var(--ng-brand); text-decoration: none; }
.ng-forums .ng-frow .ng-lrow__sub { margin: 2px 0 0; }
.ng-forums .ng-fsubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.ng-forums .ng-fsubs li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ng-forums .ng-fsubs li::before { content: "\25B8"; flex: none; color: var(--ng-brand); font-size: 12px; }
.ng-forums .ng-fsubs a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ng-ink); font-weight: 600; text-decoration: none; }
.ng-forums .ng-fsubs a:hover { color: var(--ng-brand); }
.ng-forums a.ng-lrow__last { color: var(--ng-ink); text-decoration: none; }
.ng-forums a.ng-lrow__last:hover span { color: var(--ng-brand); }
.ng-forums .ng-frow .ng-lrow__last span { -webkit-line-clamp: 1; }
.ng-forums .ng-lrow__last small b { font-weight: 600; color: var(--ng-ink-strong); }
.ng-forums .ng-lrow__last.is-empty { border-left-color: var(--ng-line); }
.ng-forums .ng-lrow__last.is-empty small { margin: 0; color: var(--ng-faint); }

/* the last-post column needs room: three columns until it shows, and with a side column only from 1280px */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .ng-forums .ng-lrow--last { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .ng-forums .ng-hub--side .ng-lrow--last { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ng-forums .ng-hub--side .ng-lrow__last { display: none; }
}

/* thread rows */
.ng-forums .ng-ftrow .ng-lrow__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ng-forums .ng-ftrow .ng-lrow__sub { margin-top: 4px; }
.ng-forums .ng-ftrow .ng-lrow__meta { margin-top: 8px; }

/* side cards: Recent (compact rows) and Who's online (avatar chips with an online dot) */
.ng-forums .ng-fmini { gap: 12px; padding: 11px 16px; }
.ng-forums .ng-fmini .ng-lrow__ava { width: 36px; height: 36px; }
.ng-forums .ng-fmini .ng-lrow__title { font-size: 14px; }
.ng-forums .ng-fmini .ng-lrow__meta { margin-top: 3px; font-size: 12px; }
.ng-forums .ng-fonline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 14px 16px 16px; list-style: none; }
.ng-forums .ng-fonline a {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 38px; padding: 0 12px 0 4px; border-radius: 10px;
  background: var(--ng-fill); color: var(--ng-ink-strong); font-size: 13px; font-weight: 600; text-decoration: none;
}
.ng-forums .ng-fonline a:hover { background: var(--ng-fill-2); }
.ng-forums .ng-fonline__ava { position: relative; flex: none; }
.ng-forums .ng-fonline__ava img { display: block; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ng-forums .ng-fonline__ava i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--ng-fill); border-radius: 50%; background: hsl(142 70% 42%); }
.ng-forums .ng-fonline__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* pagination (Sngine's pager) at a card's foot, or bare under the posts */
.ng-forums .ng-fpager { padding: 14px 18px; border-top: 1px solid var(--ng-line); }
.ng-forums .ng-fpager--bare { padding: 0; border: 0; }
.ng-forums .ng-fpager .pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.ng-forums .ng-fpager .page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; margin: 0; padding: 0 11px; border: 0; border-radius: 10px;
  background: var(--ng-fill); color: var(--ng-ink-strong); font-size: 13.5px; font-weight: 600; box-shadow: none;
}
.ng-forums .ng-fpager--bare .page-link { background: var(--ng-card); }
.ng-forums .ng-fpager a.page-link[href]:hover { background: var(--ng-fill-2); color: var(--ng-ink-strong); }
.ng-forums .ng-fpager .active .page-link { background: var(--ng-brand); color: #fff; }
.ng-forums .ng-fpager .disabled .page-link { background: transparent; color: var(--ng-sub); font-weight: 500; padding-left: 4px; }

/* a thread: big title, tags, actions; on phones Post Reply sits here (the side column is desktop only) */
.ng-forums .ng-fthead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ng-forums .ng-fthead__text { min-width: 0; }
.ng-forums .ng-fthead__title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--ng-ink-strong); overflow-wrap: anywhere; }
@media (min-width: 768px) { .ng-forums .ng-fthead__title { font-size: 30px; } }
.ng-forums .ng-fthead__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ng-forums .ng-fthead__tags .ng-tag { height: 28px; padding: 0 11px; font-size: 12.5px; }
.ng-forums .ng-fthead__tags .ng-tag .ng-ico { width: 14px; height: 14px; }
.ng-forums .ng-tag--brand { background: var(--ng-tint); color: var(--ng-brand); }
body.night-mode .ng-forums .ng-tag--brand { background: hsl(var(--primary) / .16); color: var(--ng-brand); }
.ng-forums .ng-fthead__acts { display: flex; flex: none; align-items: center; gap: 8px; }
@media (max-width: 767.98px) {
  .ng-forums .ng-fthead { flex-direction: column; gap: 12px; }
  .ng-forums .ng-fthead__acts { align-self: stretch; }
  .ng-forums .ng-fthead__reply { flex: 1; }
}
@media (min-width: 1024px) { .ng-forums .ng-fthead__reply { display: none; } }
@media (max-width: 1023.98px) { .ng-forums .ng-fside { display: none; } }

/* posts in one card: avatars on a rail joined by a thin line, a separator between posts */
.ng-forums .ng-fposts { overflow: visible; padding: 2px 20px; }
.ng-forums .ng-fpost { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; scroll-margin-top: calc(var(--ng-top, 56px) + 16px); }
.ng-forums .ng-fpost__rail { position: relative; padding-top: 18px; }
.ng-forums .ng-fpost__rail::after { content: ""; position: absolute; left: 21px; top: 70px; bottom: -12px; width: 2px; border-radius: 2px; background: hsl(var(--muted-foreground) / .22); }
.ng-forums .ng-fpost:last-of-type .ng-fpost__rail::after { display: none; }
.ng-forums .ng-fpost__ava { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ng-forums .ng-fpost__body { min-width: 0; padding: 18px 0 20px; }
.ng-forums .ng-fpost + .ng-fpost .ng-fpost__body { border-top: 1px solid var(--ng-line); }
.ng-forums .ng-fpost.x-hidden { display: none; }
.ng-forums .ng-fpost.x-hidden + .ng-fpost .ng-fpost__body { border-top: 0; }
.ng-forums .ng-fpost__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ng-forums .ng-fpost__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; padding-top: 2px; }
.ng-forums .ng-fpost__name { font-size: 15px; font-weight: 700; color: var(--ng-brand); text-decoration: none; }
.ng-forums .ng-fpost__name:hover { text-decoration: underline; color: var(--ng-brand); }
.ng-forums .ng-fpost__who .ng-tag { height: 22px; padding: 0 8px; font-size: 11.5px; }
.ng-forums .ng-fpost__when { font-size: 13px; color: var(--ng-sub); }
.ng-forums .ng-fpost__tools { display: flex; flex: none; align-items: center; gap: 2px; margin-top: -4px; }
.ng-forums .ng-fpost__num { padding: 6px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ng-sub); text-decoration: none; }
.ng-forums .ng-fpost__num:hover { background: var(--ng-fill); color: var(--ng-brand); }
@media (max-width: 575.98px) {
  .ng-forums .ng-fposts { padding: 0 14px; }
  .ng-forums .ng-fpost { grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; }
  .ng-forums .ng-fpost__ava { width: 36px; height: 36px; }
  .ng-forums .ng-fpost__rail { padding-top: 16px; }
  .ng-forums .ng-fpost__rail::after { left: 17px; top: 60px; }
  .ng-forums .ng-fpost__body { padding: 16px 0 18px; }
}

/* the post text (rich text from the editor): paragraphs, lists, quotes as an inset box, code, media */
.ng-forums .ng-fpost__text { font-size: 15px; line-height: 1.6; color: var(--ng-ink); overflow-wrap: anywhere; }
.ng-forums .ng-fpost__text > :first-child { margin-top: 0; }
.ng-forums .ng-fpost__text > :last-child { margin-bottom: 0; }
.ng-forums .ng-fpost__text p { margin: 0 0 .8em; }
.ng-forums .ng-fpost__text ul, .ng-forums .ng-fpost__text ol { margin: 0 0 .8em; padding-inline-start: 1.4em; list-style: revert; }
.ng-forums .ng-fpost__text li + li { margin-top: .2em; }
.ng-forums .ng-fpost__text blockquote { margin: 0 0 .9em; padding: 12px 14px; border-left: 3px solid hsl(var(--primary) / .55); border-radius: 4px 14px 14px 4px; background: var(--ng-fill); font-size: 14.5px; color: var(--ng-ink); }
.ng-forums .ng-fpost__text blockquote p { margin: 0 0 .4em; }
.ng-forums .ng-fpost__text blockquote > :last-child { margin-bottom: 0; }
.ng-forums .ng-fpost__text blockquote strong:first-child { color: var(--ng-ink-strong); }
.ng-forums .ng-fpost__text img, .ng-forums .ng-fpost__text iframe, .ng-forums .ng-fpost__text video { max-width: 100%; height: auto; border-radius: 14px; }
.ng-forums .ng-fpost__text pre { padding: 12px 14px; border-radius: 14px; background: var(--ng-fill); font-size: 13.5px; white-space: pre-wrap; }
.ng-forums .ng-fpost__text code { padding: 1px 5px; border-radius: 6px; background: var(--ng-fill); font-size: .9em; color: var(--ng-ink-strong); }
.ng-forums .ng-fpost__text pre code { padding: 0; background: none; }
.ng-forums .ng-fpost__text a { color: var(--ng-brand); }

/* thread side: Post Reply and the timeline (Original Post, which post is in view, Now) */
.ng-forums .ng-ftime { display: flex; flex-direction: column; padding: 16px 18px; border-radius: var(--ng-r); background: var(--ng-card); }
.ng-forums .ng-ftime__end { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; font-weight: 700; color: var(--ng-ink-strong); text-decoration: none; }
.ng-forums .ng-ftime__end:hover { color: var(--ng-brand); }
.ng-forums .ng-ftime__end small { font-size: 12.5px; font-weight: 500; color: var(--ng-sub); }
.ng-forums .ng-ftime__track { position: relative; height: 200px; margin: 12px 0 12px 4px; border-left: 2px solid var(--ng-line); cursor: pointer; }
.ng-forums .ng-ftime__thumb {
  position: absolute; top: 0; left: -3px; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 46px; padding-left: 14px;
  border-left: 4px solid var(--ng-brand); border-radius: 2px; transition: transform .2s ease;
}
.ng-forums .ng-ftime__thumb b { font-size: 13.5px; font-weight: 700; color: var(--ng-ink-strong); white-space: nowrap; }
.ng-forums .ng-ftime__thumb small { font-size: 12.5px; color: var(--ng-sub); }

/* forms: labelled fields stacked 16px apart; the search fields in two columns from 768px */
.ng-forums .ng-ffield + .ng-ffield { margin-top: 16px; }
.ng-forums .ng-ffield .form-label { margin-bottom: 6px; }
.ng-forums .ng-fcard .tox-tinymce { border-radius: 14px; }
.ng-forums .ng-phead p b { color: var(--ng-ink-strong); font-weight: 600; }
.ng-forums .ng-fsearch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ng-forums .ng-fsearch .ng-ffield + .ng-ffield { margin-top: 0; }
@media (min-width: 768px) {
  .ng-forums .ng-fsearch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ng-forums .ng-fsearch__query, .ng-forums .ng-fsearch__check, .ng-forums .ng-fsearch > .alert { grid-column: 1 / -1; }
}
.ng-forums .ng-fsearch > .alert { margin: 0 !important; }
.ng-forums .ng-fsearch__check .checkbox { margin: 0; }
.ng-forums .ng-fsearch__check label { font-size: 14px; font-weight: 500 !important; color: var(--ng-ink) !important; }
