/**
 * @file        sg-help.css
 * @description Styles of the help module: help center, article, contextual tip, announcement banner, feedback button and dialog, support threads, feature board, what's new (H3-01 to H3-08, D3-11 to D3-15)
 *
 * @author      Thomas Dobler - SYNTHETIXMIND LTD
 * @company     SYNTHETIXMIND LTD, Paphos, Cyprus
 * @url         https://synthetixmind.com
 *
 * @uid         2011a460-e1a4-4996-80da-d1ff0ec4e753
 * @version     0.1.0.2
 * @created     2026-12-01
 * @updated     2026-12-02
 *
 * @copyright   (c) 2026 by SYNTHETIXMIND LTD
 * @license     Proprietary — All rights reserved
 */

/* Mobile first: one column at 360 px, everything wraps; wider screens get the category grid. */
.sg-help { display: grid; gap: 24px; min-width: 0; }
.sg-help-hero { padding: 24px 16px; border-radius: var(--radius-lg); background: var(--beige); color: var(--warm-ink); }
.sg-help-hero h1 { margin: 4px 0 8px; color: var(--ink); }
.sg-help-search { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sg-help-search input[type="search"] { flex: 1 1 200px; min-width: 0; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.sg-help-section h2, .sg-help-results h2 { font-size: 1.15rem; margin: 0 0 12px; }
.sg-help-results__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.sg-help-cats { display: grid; grid-template-columns: 1fr; gap: 12px; }
.sg-help-cat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.sg-help-cat:hover, .sg-help-cat[aria-current="true"] { border-color: var(--accent); }
.sg-help-cat__icon { grid-row: span 2; color: var(--accent); }
.sg-help-cat__name { font-weight: 600; overflow-wrap: anywhere; }
.sg-help-cat__count { color: var(--ink-muted); font-size: .9rem; }
.sg-help-list, .sg-help-reqs, .sg-help-ideas, .sg-help-thread, .sg-help-modlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-help-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.sg-help-list a:hover { border-color: var(--accent); }
.sg-help-list__title { font-weight: 500; overflow-wrap: anywhere; }
.sg-help-noresult { text-align: center; padding: 24px 16px; }
.sg-help-stuck h2, .sg-help-stuck h3 { margin-top: 0; }
.sg-help-stuck .sg-button { display: inline-flex; align-items: center; gap: 8px; }
.sg-help-noresult__icon { display: inline-flex; color: var(--accent); }
.sg-help-list--plain a { border-width: 0 0 1px; border-radius: 0; background: transparent; padding: 12px 0; }
.sg-help-list--plain { gap: 0; }

/* Shared header row: title and lead on the left, action or count on the right (wraps on phones). */
.sg-help-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; min-width: 0; }
.sg-help-head h1, .sg-help-head h2, .sg-help-head h3 { margin: 0; overflow-wrap: anywhere; }
.sg-help-head > div { min-width: 0; flex: 1 1 240px; }
.sg-help-actions-end { justify-content: flex-end; }
.sg-help-label { display: block; font-weight: 600; margin-bottom: 4px; }
.sg-help-readonly { margin: 0; padding: 12px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--ink-muted); overflow-wrap: anywhere; }
.sg-help-empty { text-align: center; padding: 24px 16px; }

/* H3-02 article column and sidebar; H3-04, D3-11 and D3-15 list (or preview) beside the detail. One column on phones. */
.sg-help-layout, .sg-help-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sg-help-single { display: grid; gap: 16px; min-width: 0; }
.sg-help-layout__main, .sg-help-layout__side, .sg-help-split__list, .sg-help-split__detail { min-width: 0; display: grid; gap: 16px; align-content: start; }
.sg-help-split:not(.sg-help-split--form) > .sg-help-split__list { display: none; }
.sg-help-related h2 { margin-top: 0; font-size: 1.05rem; }
.sg-help-missing { display: flex; align-items: flex-start; gap: 8px; }
.sg-help-crumbs { font-size: .9rem; color: var(--ink-muted); overflow-wrap: anywhere; }
.sg-help-article h1 { margin: 4px 0; overflow-wrap: anywhere; }
.sg-help-article__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--ink-muted); font-size: .9rem; }
.sg-help-article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.sg-help-langswitch { text-decoration: none; color: var(--ink); }
.sg-help-article__body { overflow-wrap: anywhere; }
.sg-help-article__body img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.sg-help-helpful { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sg-help-helpful h2 { font-size: 1.05rem; margin: 0; }
.sg-help-helpful > .sg-alert { flex: 1 1 100%; margin: 0; }
.sg-help-helpful__form { max-width: 100%; }

/* H3-03 contextual tip */
.sg-help-tip { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border-warm); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.sg-help-tip__icon { color: var(--accent); }
.sg-help-tip__body { min-width: 0; overflow-wrap: anywhere; }
.sg-help-tip__text { margin: 0 0 4px; }
.sg-help-tip__more { font-weight: 600; }
.sg-help-tip__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.sg-help-tip__actions form { margin: 0; }

/* H3-07 announcement banner */
.sg-help-announce { background: var(--navy); color: #F2F4F6; }
.sg-help-announce .sg-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
.sg-help-announce__text { display: flex; align-items: flex-start; gap: 8px; margin: 0; flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.sg-help-announce a, .sg-help-announce .sg-link-button, .sg-help-announce .sg-muted { color: #F2F4F6; }
.sg-help-announce form { margin: 0; }
.sg-help-announce__count { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.sg-help-announce__more { font-weight: 600; white-space: nowrap; }

/* H3-08 unread marker in the top bar */
.sg-help-news-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: inherit; }
.sg-help-news-link__dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.sg-help-newslist { display: grid; gap: 16px; }
.sg-help-news { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.sg-help-news--unread { border-left: 4px solid var(--accent); }
.sg-help-news h2 { margin: 4px 0 8px; font-size: 1.15rem; }
.sg-help-news__date { margin: 0; color: var(--ink-muted); font-family: var(--font-mono); font-size: .9rem; }
.sg-help-news__img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 8px 0; }

/* H3-05 feedback button and dialog */
.sg-help-fab { position: fixed; right: 16px; bottom: 88px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--navy); color: #F2F4F6; text-decoration: none; font-weight: 600; box-shadow: 0 4px 16px rgba(28, 44, 55, .25); }
.sg-help-fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (min-width: 900px) { .sg-help-fab { bottom: 24px; } }
.sg-help-dialog { width: min(560px, calc(100vw - 16px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); }
.sg-help-dialog::backdrop { background: rgba(20, 33, 42, .6); }
.sg-help-feedback { padding: 16px; display: grid; gap: 12px; }
.sg-help-feedback__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.sg-help-feedback__head h2 { margin: 0; font-size: 1.2rem; }
.sg-help-feedback__head p { margin: 2px 0 0; font-size: .9rem; }
.sg-help-feedback__icon { display: inline-flex; padding: 8px; border-radius: var(--radius); background: var(--beige); color: var(--accent); }
.sg-help-feedback__done { display: flex; align-items: flex-start; gap: 12px; }
.sg-help-feedback__done h3 { margin: 0 0 4px; }
.sg-help-context { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.sg-help-context h3 { margin: 0; font-size: .95rem; }
.sg-help-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-help-feedback textarea { width: 100%; }
.sg-help-context dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 16px; margin: 8px 0 0; }
.sg-help-context dl > div { min-width: 0; }
.sg-help-context dt { font-weight: 600; font-size: .9rem; }
.sg-help-context dd { margin: 0 0 8px; overflow-wrap: anywhere; font-size: .85rem; }
.sg-help-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 0 0 16px; min-width: 0; }
.sg-help-shot__preview { margin: 0 0 8px; }
.sg-help-shot__preview img { display: block; max-width: 100%; max-height: 240px; border: 1px solid var(--border); border-radius: var(--radius); }
.sg-help-shot__actions { align-items: center; }
.sg-help-shot__file { font-weight: 500; }
.sg-help-shot input[type="file"] { max-width: 100%; }

/* H3-04 and D3-11 threads */
.sg-help-req { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sg-help-req a { display: grid; gap: 4px; flex: 1 1 100%; color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.sg-help-req__top, .sg-help-req__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: .9rem; }
.sg-help-req:has(a[aria-current]), .sg-help-req--current { border-color: var(--accent); border-left-width: 4px; }
.sg-help-req__subject { font-weight: 500; }
.sg-help-msg { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.sg-help-msg--staff { border-left: 4px solid var(--navy); }
.sg-help-msg__meta { margin: 0 0 4px; font-size: .9rem; }
.sg-help-msg__text { margin: 0; }
.sg-help-msg__shot { max-width: 100%; max-height: 320px; border: 1px solid var(--border); border-radius: var(--radius); }
.sg-help-state--waiting { border-color: var(--accent); color: var(--accent); }
.sg-help-state--closed { color: var(--ink-muted); }
.sg-help-context-box dl { display: grid; grid-template-columns: 1fr; gap: 2px 16px; }
.sg-help-context-box dd { margin: 0 0 8px; overflow-wrap: anywhere; }
.sg-help-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin-bottom: 16px; }
.sg-help-filters .sg-field { margin: 0; }

/* H3-06 feature board */
.sg-help-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-help-idea { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sg-help-idea--own { border-style: dashed; border-color: var(--border-warm); background: var(--bg); }
.sg-help-idea__body .sg-chips { margin: 0 0 8px; }
.sg-help-ideas { margin-bottom: 16px; }
.sg-help-idea__votes { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.sg-help-idea__count { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 500; }
.sg-help-idea__body { min-width: 0; overflow-wrap: anywhere; }
.sg-help-idea__body h3 { margin: 0 0 4px; }
.sg-help-idea__note { font-size: .95rem; }
.sg-help-voted { border-color: var(--accent); color: var(--accent); }
.sg-help-idea-state--done { color: var(--ink-muted); }
.sg-help-propose > summary { cursor: pointer; list-style: none; width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 8px; }
.sg-help-propose > summary::-webkit-details-marker { display: none; }
.sg-help-propose[open] > summary { margin-bottom: 12px; }
.sg-help-propose form h2 { margin: 0; font-size: 1.15rem; }
.sg-help-news__status { margin: 0; }

/* D3-13 moderation cards: vote figure, then author, state, title and the forms. */
.sg-help-moditem { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 16px; }
.sg-help-moditem__body { min-width: 0; overflow-wrap: anywhere; }
.sg-help-moditem__body h3 { margin: 4px 0; }
.sg-help-moditem__votes { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.sg-help-moditem--waiting { border-left: 4px solid var(--accent); }

/* D3-15 preview and states */
.sg-help-preview .sg-help-announce { border-radius: var(--radius); margin-bottom: 8px; }
.sg-help-ann--running { border-color: var(--accent); color: var(--accent); }
.sg-help-ann--ended { color: var(--ink-muted); }

@media (min-width: 600px) {
  .sg-help-cats { grid-template-columns: repeat(2, 1fr); }
  .sg-help-hero { padding: 32px; }
  .sg-help-context-box dl { grid-template-columns: max-content 1fr; }
  .sg-help-context dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-help-context__wide { grid-column: 1 / -1; }
  .sg-help-stuck:not(.sg-help-stuck--compact) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
  .sg-help-stuck:not(.sg-help-stuck--compact) p { margin-bottom: 0; }
  .sg-help-tip { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
  .sg-help-tip__actions { grid-column: 3; }
  .sg-help-moditem:not(.sg-help-moditem--waiting) { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .sg-help-cats { grid-template-columns: repeat(3, 1fr); }
  .sg-help-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* WHY: the split pages sit inside the app shell or admin frame (240 px / 220 px side menu from 900 px), so two
        columns only start where the content column itself is about 900 px wide. */
@media (min-width: 1100px) { .sg-help-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; } }
@media (min-width: 1200px) {
  .sg-help-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .sg-help-split:not(.sg-help-split--form) > .sg-help-split__list { display: grid; }
  .sg-help-split--form { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (prefers-reduced-motion: reduce) { .sg-help-fab { transition: none; } }
