/* User bubble: right-aligned column (bubble + IconActions). Figma
   User_Bubble/message_container 659:38813 — r22 fill, actions gap 6 below. */

.userRow {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.bubble {
  /* 525px cap inside the 736 column; percentage keeps narrow windows sane. */
  max-width: min(525px, 82%);
  background: var(--dsw-specific-bubble);
  border-radius: 22px;
  /* 44px single-line bubble: 24 line + 10 vertical padding each side. */
  padding: 10px 16px;
  font-size: 16px;
  line-height: 24px;
  color: var(--dsw-alias-label-primary);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
}

/* Hover-capable pointers: hide until the row is hovered/focused. Touch /
   hover:none keeps actions visible (opacity:0 still hit-tests). */
@media (hover: hover) {
  .actions {
    opacity: 0;
    transition: opacity var(--ds-transition-duration) var(--ds-ease-in-out);
  }

  .userRow:hover .actions,
  .userRow:focus-within .actions {
    opacity: 1;
  }
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 6px;
  border: none;
  border-radius: 28px;
  background: transparent;
  color: var(--dsw-alias-label-tertiary);
  cursor: pointer;
}

.action:hover {
  background: var(--dsw-alias-interactive-bg-hover);
  color: var(--dsw-alias-label-secondary);
}

.badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--dsw-alias-state-warn-primary);
  color: var(--dsw-alias-label-primary-foreground);
  font-size: 11px;
}

.contextRow {
  padding: 2px 0;
}

/* Reference chip projection inside a user bubble (`<skill>name</skill>` model
   spans render as chips; free geometry — no textarea pairing here). */
.refChip {
  display: inline-block;
  margin: 0 2px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(97, 135, 216, 0.22);
  color: var(--dsw-alias-label-primary);
  font-size: 0.85em;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: baseline;
}
