/* Chat Stats — dark "analytics" dashboard (matches the mockup; self-contained so it reads the same on
   either forum theme). */
.cs-page { max-width: 820px; margin: 0 auto; }
.cs-page .forumhead { margin-bottom: 14px; }

.cs-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cs-card { flex: 1 1 220px; background: #14171d; border: 1px solid #262b34; border-radius: 10px; padding: 16px 18px; }
.cs-card-n { font-size: 30px; font-weight: 800; color: #eef1f5; line-height: 1.1; letter-spacing: -.5px; }
.cs-card-l { font-size: 13px; font-weight: 700; color: #cdd3dc; margin-top: 4px; }
.cs-card-s { font-size: 11px; color: #7f8792; margin-top: 3px; }

.cs-panel { background: #14171d; border: 1px solid #262b34; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.cs-panel-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8b93a1; margin-bottom: 12px; }

.cs-board { display: flex; flex-direction: column; }
.cs-board-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-top: 1px solid #20242c; font-size: 14px; color: #dfe3e9; }
.cs-board-row:first-child { border-top: 0; }
.cs-board-rank { flex: 0 0 auto; width: 20px; color: #7f8792; font-size: 12px; text-align: center; }
.cs-board-sw { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 3px; }
.cs-board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cs-board-count { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: #eef1f5; font-weight: 700; }
.cs-board-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8b93a1; margin: 16px 0 8px; }

.cs-search { display: flex; gap: 8px; margin-bottom: 6px; }
.cs-q { flex: 1; min-width: 0; background: #0f1216; border: 1px solid #2c323c; color: #eef1f5; border-radius: 6px; padding: 9px 12px; font-size: 14px; }
.cs-q:focus { outline: none; border-color: #4aa3ff; }
.cs-go { flex: 0 0 auto; }

.cs-result { margin-top: 10px; }
.cs-chart-title { font-size: 15px; font-weight: 700; color: #eef1f5; margin: 4px 0 6px; }
.cs-chart { position: relative; width: 100%; }
.cs-svg { display: block; width: 100%; overflow: visible; }
.cs-grid { stroke: #262b34; stroke-width: 1; }
.cs-yl, .cs-xl { fill: #7f8792; font: 10px -apple-system, "Segoe UI", Roboto, sans-serif; }
.cs-line { stroke-linejoin: round; stroke-linecap: round; }
.cs-guide { stroke: #5a6472; stroke-width: 1; stroke-dasharray: 3 3; }
.cs-hit { cursor: crosshair; }

.cs-tip { position: absolute; z-index: 5; pointer-events: none; background: #0d0f13; border: 1px solid #333a45; border-radius: 6px; padding: 8px 11px; box-shadow: 0 6px 20px rgba(0,0,0,.5); min-width: 110px; }
.cs-tip-m { font-size: 13px; font-weight: 700; color: #eef1f5; margin-bottom: 5px; }
.cs-tip-row { font-size: 12.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }

.cs-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin: 10px 0 2px; }
.cs-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #cdd3dc; }
.cs-leg-dot { width: 9px; height: 9px; border-radius: 50%; }

.cs-note { font-size: 11px; color: #6d7580; margin-top: 12px; }
.cs-empty { color: #8b93a1; font-size: 14px; padding: 24px 4px; text-align: center; }
/* ===== in-chat overview popup (public: totals, top chatters, heatmap) ===== */
.cs-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-start; justify-content: center; background: rgba(0,0,0,.55); padding: 30px 16px; overflow: auto; }
.cs-modal { width: min(760px, 96vw); background: #14171d; border: 1px solid #262b34; border-radius: 12px; box-shadow: 0 16px 50px rgba(0,0,0,.6); overflow: hidden; }
/* "fills the chat area" mode: an absolute overlay covering the whole #fb-chat widget */
.cs-fill { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #14171d; border-radius: inherit; overflow: hidden; }
.cs-fill .cs-modal-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* fill-mode header matches the real chat header (.chat-head): same padding/weight/background */
.cs-fill .cs-modal-h { padding: 8px 13px; font-size: 14px; font-weight: bold; background: rgba(127,127,127,.12); border-bottom: 1px solid rgba(127,127,127,.25); }
/* compact so it fits without scrolling at a normal chat height */
#cs-overlay .cs-modal-b { padding: 12px; }
#cs-overlay .cs-card { padding: 10px 14px; flex: 1 1 130px; }
#cs-overlay .cs-card-n { font-size: 24px; }
#cs-overlay .cs-card-l { font-size: 12px; }
#cs-overlay .cs-panel { padding: 12px 14px; margin-bottom: 12px; }
#cs-overlay .cs-panel-h { margin-bottom: 8px; }
#cs-overlay .cs-sub { margin: 8px 2px; }
#cs-overlay .cs-heat-cell { height: 11px; }
#cs-overlay .cs-heat-day, #cs-overlay .cs-heat-hh { font-size: 9px; }
.cs-modal-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #1b1f27; border-bottom: 1px solid #262b34; font-size: 15px; font-weight: 700; color: #eef1f5; flex: 0 0 auto; }
.cs-modal-x { background: none; border: 0; color: #9aa3b2; font-size: 16px; cursor: pointer; line-height: 1; padding: 2px 7px; border-radius: 5px; }
.cs-modal-x:hover { background: rgba(255,255,255,.1); color: #fff; }
.cs-modal-b { padding: 16px; }
#cs-overlay .cs-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
#cs-overlay .cs-card { flex: 1 1 150px; }
.cs-delta { font-size: 11px; margin-top: 3px; font-weight: 700; }
.cs-delta.up { color: #3ecf7a; }
.cs-delta.down { color: #e0655a; }
.cs-sub { font-size: 12px; color: #9aa3b2; margin: 10px 2px; }
#cs-overlay .cs-panel { background: #0f1216; border: 1px solid #20242c; }
#cs-overlay .cs-panel-h { display: flex; align-items: center; justify-content: space-between; }
.cs-toggle { display: inline-flex; border: 1px solid #333a45; border-radius: 6px; overflow: hidden; }
.cs-tg { background: transparent; border: 0; color: #9aa3b2; font-size: 11px; font-weight: 600; padding: 4px 10px; cursor: pointer; }
.cs-tg.active { background: #2f6fb3; color: #fff; }
.cs-topwrap { display: flex; flex-direction: column; gap: 2px; }
.cs-trow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #dfe3e9; padding: 3px 0; }
.cs-trank { flex: 0 0 auto; width: 16px; color: #7f8792; font-size: 11px; text-align: center; }
.cs-tname { flex: 0 0 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cs-tbarwrap { flex: 1; height: 8px; background: rgba(127,127,127,.15); border-radius: 4px; overflow: hidden; }
.cs-tbar { display: block; height: 100%; background: #4aa3ff; border-radius: 4px; }
.cs-tcount { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: #eef1f5; font-weight: 700; min-width: 36px; text-align: right; }
.cs-heat { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
.cs-heat-row { display: flex; gap: 2px; align-items: center; }
.cs-heat-day { flex: 0 0 22px; font-size: 10px; color: #7f8792; text-align: right; padding-right: 4px; }
.cs-heat-hh { flex: 1 1 0; min-width: 12px; font-size: 9px; color: #6d7580; text-align: center; }
.cs-heat-cell { flex: 1 1 0; min-width: 12px; height: 14px; border-radius: 2px; background: rgba(127,127,127,.08); }
