/* X-style DM thread header + call controls */
.yal-dm-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.92);
  position: sticky;
  top: 0;
  z-index: 6;
}

.yal-dm-thread-ident {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.yal-dm-thread-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #243447;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.yal-dm-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yal-dm-thread-name {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.yal-dm-thread-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yal-dm-thread-lock {
  font-size: 0.82rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.yal-dm-thread-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.yal-dm-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.yal-dm-icon-btn:hover {
  background: rgba(231, 233, 234, 0.1);
}

.yal-dm-icon-btn svg {
  width: 18px;
  height: 18px;
}

.yal-dm-thread-panel {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.yal-dm-thread-body {
  flex: 1;
  overflow-y: auto;
}

/* Hide legacy floating call bar */
.yal-dm-call-bar {
  display: none !important;
}

.x-dm-grid > .yal-dm-thread-panel {
  border-left: none;
}
