/* The chat surface: a column that fills its host. Hosts own all chrome
   (drawer title, dock header); only the message list and composer live here. */
.root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scroll region plus the floating "Jump to latest" anchor. */
.messagesWrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emptyState {
  flex-shrink: 0;
  padding: 12px 8px;
  color: var(--colorNeutralForeground3);
  font-size: 13px;
  line-height: 1.5;
}

/* Context-switch divider: rule — text — rule. */
.notice {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--colorNeutralForeground3);
  font-size: 11px;
  padding: 2px 0;
}

.noticeRule {
  flex: 1;
  min-width: 8px;
  border-top: 1px solid var(--colorNeutralStroke2, #e8e8e8);
}

/* A notice names whatever the host keyed the conversation by, and one long
   unbreakable token must never widen the dock. */
.noticeText {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bubble {
  flex-shrink: 0;
  max-width: 90%;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--colorNeutralForeground1);
}

.bubbleUser {
  align-self: flex-end;
  background: var(--colorBrandBackground2, #ebf3fc);
}

.bubbleAssistant {
  align-self: flex-start;
  background: var(--colorNeutralBackground3, #f5f5f5);
}

.bubbleError {
  background: var(--colorStatusDangerBackground1, #fdf3f4);
  color: var(--colorStatusDangerForeground1, #b10e1c);
}

.jumpToLatest {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.pending {
  align-self: flex-start;
  padding: 6px 10px;
}

.composer {
  flex-shrink: 0;
  border-top: 1px solid var(--colorNeutralStroke2, #e8e8e8);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--colorNeutralBackground1);
}

.composerActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.composerSecondary {
  display: flex;
  gap: 4px;
}
