/* ==========================================================================
   css/components/dm-panel.css
   Split from app.html (build 2026.10.08.9-beta), original lines 4009-4089.
   Rules are in their ORIGINAL order; load order is defined in index.html.
   ========================================================================== */
/* DOCKED DM panel (NONONONONO): a normal-width right sidebar that's part of the
   layout and PUSHES #app over (via the body.dmpop-open rules below) instead of
   floating on top. --dmp-w is the single source of truth for its width + the push. */
:root { --dmp-w: 400px; }
.dmp { position:fixed; right:0; top:0; bottom:0; left:auto; width:var(--dmp-w); background:var(--bg-chat, var(--bg-base)); border:none; border-left:1px solid var(--border-strong); border-radius:0; z-index:120; display:flex; flex-direction:column; overflow:hidden; animation:dmp-slidein 0.22s var(--ease-out, ease); }
@keyframes dmp-slidein { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:none; } }
.dmp-head { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--border); flex-shrink:0; background:var(--bg-chat, var(--bg-base)); user-select:none; }
.dmp-head-title { display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:700; color:var(--text-primary); }
.dmp-close { background:none; border:none; color:var(--text-muted); font-size:20px; line-height:1; cursor:pointer; padding:2px 6px; border-radius:6px; }
.dmp-close:hover { color:var(--text-primary); background:var(--bg-hover); }
.dmp-body { flex:1; display:flex; min-height:0; }
.dmp-list { width:128px; flex-shrink:0; border-right:1px solid var(--border); overflow-y:auto; padding:6px; background:transparent; }
.dmp-li { display:flex; align-items:center; gap:8px; padding:6px 7px; border-radius:8px; cursor:pointer; }
.dmp-li:hover { background:var(--bg-hover); }
.dmp-li.active { background:var(--bg-active); }
.dmp-li-av { position:relative; width:28px; height:28px; flex-shrink:0; }
.dmp-li-av img, .dmp-li-av span { width:28px; height:28px; border-radius:50%; object-fit:cover; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.dmp-on { position:absolute; bottom:-1px; right:-1px; width:10px; height:10px; border-radius:50%; background:#3ba55d; border:2px solid var(--bg-chat, var(--bg-base)); }
.dmp-li-name { flex:1; font-size:12.5px; font-weight:500; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dmp-li.active .dmp-li-name { color:var(--text-primary); }
.dmp-li-badge { background:var(--red); color:#fff; font-size:10px; font-weight:700; border-radius:9px; padding:1px 6px; }
.dmp-conv { flex:1; display:flex; flex-direction:column; min-width:0; }
.dmp-conv-head { padding:10px 14px; border-bottom:1px solid var(--border); font-size:13px; font-weight:700; color:var(--text-primary); flex-shrink:0; }
.dmp-msgs { flex:1; overflow-y:auto; padding:12px 14px; display:flex; flex-direction:column; gap:7px; }
.dmp-empty { color:var(--text-muted); font-size:12.5px; text-align:center; margin:auto; padding:0 16px; }
.dmp-msg { display:flex; gap:8px; align-items:flex-end; max-width:82%; }
.dmp-msg.me { margin-left:auto; flex-direction:row-reverse; }
.dmp-b-av { width:24px; height:24px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.dmp-bubble { background:var(--bg-elevated); color:var(--text-primary); font-size:13px; line-height:1.42; padding:7px 11px; border-radius:14px; word-break:break-word; }
.dmp-msg.me .dmp-bubble { background:var(--accent); color:#fff; }
.dmp-bubble a { color:inherit; text-decoration:underline; }
.dmp-img { max-width:200px; max-height:180px; border-radius:10px; display:block; margin:2px 0; }
.dmp-input-bar { display:flex; align-items:flex-end; gap:8px; padding:9px 11px; border-top:1px solid var(--border); flex-shrink:0; }
.dmp-input-bar textarea { flex:1; resize:none; background:var(--bg-chat, var(--bg-base)); border:1px solid var(--border-strong); border-radius:12px; padding:8px 11px; color:var(--text-primary); font-size:13px; font-family:var(--font-body); line-height:1.4; max-height:110px; }
.dmp-input-bar textarea:focus { outline:none; border-color:var(--accent); }
.dmp-send { width:36px; height:36px; flex-shrink:0; border-radius:10px; background:var(--accent); border:none; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.dmp-send:hover { background:var(--accent-bright); }
@media (max-width:640px) { .dmp { width:100vw; } .dmp-list { width:120px; } }
.forum-tags { display: flex; gap: 6px; padding: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.forum-tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: all 0.15s; color: var(--text-secondary); background: var(--bg-surface); border-color: var(--border); }
.forum-tag:hover { border-color: var(--border-strong); }
.forum-tag.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* modern-style colored-dot tag pills */
.forum-tag-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); white-space: nowrap; transition: all 0.15s; user-select: none; color: var(--text-secondary); background: transparent; }
.forum-tag-pill:hover { border-color: color-mix(in srgb, var(--tc, var(--border-strong)) 60%, var(--border-strong)); }
.forum-tag-pill.sel { background: color-mix(in srgb, var(--tc) 20%, transparent); border-color: var(--tc); color: var(--text-primary); }
.forum-tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
/* Grouped filter bar: separate User Tags from Mod Tags so it's clear which
   are member-applied vs moderator-only. */
.forum-tags.forum-tags-grouped { flex-direction: column; align-items: stretch; gap: 8px; }
.forum-tag-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.forum-tag-grouplabel { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-right: 6px; flex-shrink: 0; }
.forum-tag-group + .forum-tag-group { border-top: 1px solid var(--border); padding-top: 8px; }
/* Per-tag color swatch picker in channel settings */
.ch-tag-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ch-tag-swatches:empty { display: none; }
.ch-tag-swatch {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px;
  border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; user-select: none;
  border: 1px solid var(--tc, var(--border)); color: var(--text-secondary);
  background: color-mix(in srgb, var(--tc, transparent) 14%, transparent); position: relative;
}
.ch-tag-swatch input[type=color] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: none; padding: 0;
}
.ch-tag-swatch-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; background: var(--tc, #888); box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.forum-posts { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.forum-post-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.forum-post-card:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.forum-post-card.active { border-color: var(--accent); background: var(--accent-dim); }
.forum-post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.forum-post-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.forum-post-tag .forum-tag-dot { width: 7px; height: 7px; }
.forum-post-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.forum-post-preview { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum-post-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-muted); }
.forum-post-author { font-weight: 600; color: var(--accent); }
.forum-split { display: flex; height: 100%; overflow: hidden; }
.forum-split-list { width: 380px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.forum-split-chat { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

