/* Discord DM pane. Owned by WS-B. Original chrome — no real brand assets. */

.dm-wrap { display: flex; flex: 1; min-height: 0; }

/* ---- server / channel rail (decorative flavor) ---- */
.dm-rail {
  flex: none; width: 48px; display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 10px 0; background: #0e1310; border-right: 1px solid var(--line);
}
.dm-server {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #07130a; background: var(--accent); box-shadow: 0 0 12px #53fc1833;
}
.dm-rail-sep { width: 60%; height: 2px; border-radius: 2px; background: var(--line); }
.dm-rail-ch {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--muted); font-size: 15px; cursor: default;
  transition: border-radius .12s ease, background .12s ease;
}
.dm-rail-ch:hover { background: var(--accent-dim); color: #d6f5c4; border-radius: 36%; }
.dm-rail-ch.on { background: var(--accent-dim); color: #d6f5c4; border-radius: 36%; }

/* ---- thread list ---- */
.dm-threads { flex: none; width: 170px; border-right: 1px solid var(--line); overflow-y: auto; }
.dm-thread-item {
  display: flex; gap: 8px; padding: 8px 9px; cursor: pointer; border-bottom: 1px solid var(--line);
  font-size: 12px; align-items: center;
}
.dm-thread-item:hover { background: var(--panel-2); }
.dm-thread-item.active { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.dm-thread-item.unread .dm-thread-name b { color: var(--text); }
.dm-thread-meta { min-width: 0; flex: 1; }
.dm-thread-name { display: flex; align-items: center; gap: 4px; }
.dm-thread-preview {
  color: var(--muted); font-size: 11px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* avatars */
.dm-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 55%, transparent);
}
.dm-avatar.sm { width: 28px; height: 28px; font-size: 12px; }

/* unread badge / typing dots */
.dm-typing { display: inline-flex; gap: 2px; margin-left: auto; align-items: center; }
.dm-typing i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
  animation: dm-bounce 1.1s infinite ease-in-out;
}
.dm-typing i:nth-child(2) { animation-delay: .16s; }
.dm-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes dm-bounce {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-2px); }
}

/* unread total in the pane header */
.dm-unread-total {
  display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; vertical-align: middle;
}
.dm-unread-total[data-unread="0"] { display: none; }

/* ---- conversation view ---- */
.dm-view { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-view-head {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.dm-view-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-view-name b { font-size: 13px; }

/* relationship standing chip in the thread header */
.dm-standing {
  flex: none; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  background: var(--panel-solid); white-space: nowrap;
}
.dm-standing.ally { color: var(--good); border-color: #2f8f14; background: #53fc1814; }
.dm-standing.hostile { color: var(--bad); border-color: #7a2323; background: #ff4d4d14; }
.dm-standing.cool { color: var(--muted); }

.dm-messages {
  flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px;
  scroll-behavior: smooth;
}
.dm-msg { max-width: 85%; padding: 6px 10px; border-radius: 12px; font-size: 12px; line-height: 1.35; word-wrap: break-word; }
.dm-msg.them { background: var(--panel-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.dm-msg.me { background: var(--accent-dim); color: #eafff0; align-self: flex-end; border-bottom-right-radius: 4px; }
.dm-msg.system { align-self: center; color: var(--muted); font-style: italic; background: none; }

.dm-choices {
  border-top: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 6px;
  background: var(--panel-solid);
}
.dm-choice { text-align: left; }
.dm-choice:hover { border-color: var(--accent-dim); }

.dm-empty { padding: 18px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.5; }
.dm-muted { color: var(--muted); font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .dm-typing i { animation: none; opacity: .9; }
  .dm-messages { scroll-behavior: auto; }
}
