/* ═══════════════════════════════════════════════════════════
   187 DARK KNIGHTS — SIGNALS (toasts) + THE DOCK BAR

   TWO THINGS, ONE FILE — they share the bottom of the screen.

   1. TOASTS — slide in top-right when something happens. Cheap,
      and the single strongest signal that a place is alive: the
      site reacting to events beats any amount of styling.

   2. THE DOCK BAR — Morticia lives here already. Open chats sit
      beside her. One bar, not competing widgets.

   ⚠️ THE CHAT DOCK ONLY RENDERS IF THERE ARE THREADS.
   With one member, a chat bar with nobody in it is worse than no
   chat bar — it is a permanent reminder the room is empty. It
   appears when there is someone to talk to and not before.
   ═══════════════════════════════════════════════════════════ */

/* ═══ TOASTS ═══ */
.toasts{
  position:fixed;top:74px;right:20px;z-index:500;
  display:flex;flex-direction:column;gap:9px;
  pointer-events:none;
  /* A fixed width, not max-width. As a column flex container its
     children shrink to their own content — a short message rendered
     as a 109px sliver instead of a card. Toasts must be a consistent
     size or they read as broken. */
  width:340px}

.toast{
  position:relative;isolation:isolate;overflow:hidden;
  width:100%;box-sizing:border-box;
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 16px;border-radius:3px;
  pointer-events:auto;cursor:pointer;
  background:
    radial-gradient(ellipse 70% 90% at 6% 130%,rgba(224,32,32,.24),transparent 70%),
    linear-gradient(172deg,#1c1f24 0%,#131518 60%,#0b0c0f 100%);
  border:1px solid rgba(154,154,159,.14);
  border-left:3px solid var(--fx-glow);
  /* Hard shadow so it reads as floating ABOVE the right rail rather
     than sitting inside it. */
  box-shadow:0 14px 40px rgba(0,0,0,.85),
             0 0 26px rgba(224,32,32,.18);
  transform:translateX(120%);opacity:0;
  animation:toastIn .34s cubic-bezier(.22,1,.36,1) forwards;
}
.toast::before{
  content:'';position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:var(--tex-url);background-size:280px;
  opacity:.28;filter:invert(1) grayscale(1) contrast(1.9) brightness(.28);
  mix-blend-mode:overlay}
.toast > *{position:relative;z-index:1}

@keyframes toastIn{to{transform:translateX(0);opacity:1}}
.toast.out{animation:toastOut .26s ease forwards}
@keyframes toastOut{to{transform:translateX(120%);opacity:0;
  margin-bottom:-56px}}
@media (prefers-reduced-motion:reduce){
  .toast{animation:none;transform:none;opacity:1}
  .toast.out{animation:none;display:none}
}

.toast-ico{
  flex-shrink:0;width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;color:var(--fx-hot);
  background:rgba(139,26,26,.2);border:1px solid rgba(178,34,34,.4)}
.toast-av{
  flex-shrink:0;width:30px;height:30px;border-radius:50%;
  background-size:cover;background-position:center;background-color:#141619;
  border:1px solid rgba(178,34,34,.4);
  display:flex;align-items:center;justify-content:center;
  font-family:'Oswald',sans-serif;font-size:11px;color:var(--fx-blood)}

.toast-body{flex:1;min-width:0}
.toast-title{
  font-family:'Oswald',sans-serif;font-weight:600;font-size:13px;
  color:#e2e8f0;line-height:1.3}
.toast-text{
  font-family:'Rajdhani',sans-serif;font-size:13px;color:#8e96a1;
  line-height:1.45;margin-top:2px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden}
.toast-x{
  flex-shrink:0;background:none;border:none;color:#3a3f47;cursor:pointer;
  font-size:11px;padding:2px 4px;transition:color .15s;line-height:1}
.toast-x:hover{color:#e2e8f0}

@media(max-width:620px){
  .toasts{left:14px;right:14px;max-width:none;top:auto;bottom:86px}
  .toast{transform:translateY(120%)}
  @keyframes toastIn{to{transform:translateY(0);opacity:1}}
}

/* ═══════════════════════════════════════════════════════════
   THE DOCK BAR — Morticia + open chats, one strip
   Rather than a separate chat widget fighting her for the corner,
   both live in one bar. She sits left; chats stack to her right.
   ═══════════════════════════════════════════════════════════ */
.dock-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:400;
  display:flex;align-items:flex-end;justify-content:center;gap:10px;
  padding:0 18px 18px;pointer-events:none}
.dock-bar > *{pointer-events:auto}

/* A collapsed chat — a tab that pops up into a panel */
.chat-tab{
  display:flex;align-items:center;gap:10px;cursor:pointer;
  padding:9px 15px 9px 10px;border-radius:12px 12px 0 0;
  background:linear-gradient(180deg,#1b1d21 0%,#111316 60%,#0a0b0d 100%);
  border:1px solid rgba(170,180,195,.18);border-bottom:none;
  box-shadow:0 -6px 24px rgba(0,0,0,.6);
  transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s}
.chat-tab:hover{transform:translateY(-3px);border-color:rgba(255,91,74,.4)}

.chat-tab-av{
  position:relative;width:30px;height:30px;border-radius:50%;flex-shrink:0;
  background-size:cover;background-position:center;background-color:#141619;
  border:1px solid rgba(178,34,34,.4);
  display:flex;align-items:center;justify-content:center;
  font-family:'Oswald',sans-serif;font-size:11px;color:var(--fx-blood)}
.chat-tab-name{
  font-family:'Oswald',sans-serif;font-weight:600;font-size:13px;
  color:#c8cdd4;white-space:nowrap;max-width:120px;
  overflow:hidden;text-overflow:ellipsis}

/* Unread — the only thing on the bar allowed to shout */
.chat-unread{
  min-width:17px;height:17px;padding:0 5px;border-radius:9px;
  display:flex;align-items:center;justify-content:center;
  font-family:'Share Tech Mono',monospace;font-size:9px;color:#fff2f0;
  background:linear-gradient(180deg,#c92b2b,#7f1616);
  border:1px solid rgba(255,120,100,.5);
  box-shadow:0 0 10px rgba(224,32,32,.6)}

/* ═══ NEW-DROPS PILL ═══
   Appears at the top of the flow when drops arrive while you are
   reading. Never re-orders the page under someone mid-sentence —
   it offers, they choose. */
.new-drops{
  position:sticky;top:74px;z-index:60;
  display:none;margin:0 auto 16px;width:fit-content;
  padding:8px 18px;border-radius:20px;cursor:pointer;
  background:linear-gradient(180deg,#a02323,#6e1414);
  border:1px solid rgba(255,120,100,.45);
  font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:12px;
  letter-spacing:1.6px;text-transform:uppercase;color:#fff2f0;
  box-shadow:0 4px 18px rgba(0,0,0,.6),0 0 20px rgba(224,32,32,.4);
  animation:dropIn .3s cubic-bezier(.22,1,.36,1)}
.new-drops.show{display:block}
@keyframes dropIn{from{transform:translateY(-12px);opacity:0}
                  to{transform:translateY(0);opacity:1}}

@media(max-width:620px){
  .chat-tab-name{display:none}
  .chat-tab{padding:9px;border-radius:50%}
}
