.trg-chat-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .16s ease, transform .18s ease;
}

.trg-chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .trg-chat-panel { transition: none; }
}

.trg-chat-main {
  display: flex;
  flex-direction: column;
}

.trg-chat-pin { flex: 0 0 auto; }

.trg-chat-messages {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.trg-chat-reply {
  position: static;
  flex: 0 0 28px;
}

.trg-chat-form {
  position: relative;
  flex: 0 0 auto;
  height: auto;
  min-height: 78px;
}

.trg-chat-form textarea {
  display: block;
  height: 38px;
  max-height: 132px;
  overflow-y: hidden;
}

.trg-chat-form.has-error small { color: #ff7fae; }

.trg-chat-layout,
.trg-chat-main,
.trg-chat-channels,
.trg-chat-members { min-height: 0; }

.trg-chat-channels,
.trg-chat-members { overflow-y: auto; }
