/* ================================================================== */
/* Chat panel                                                         */
/* ================================================================== */
.chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--s2-bg-base);
  position: relative;
}
.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* UXC: center chat content at 800px max-width */
.chat__messages-inner {
  width: 100%;
  max-width: var(--uxc-content-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Jump pill — shown when auto-scroll is detached */
.chat__jump-pill {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--s2-bg-layer-2);
  color: var(--s2-content-default);
  border: 1px solid var(--s2-border-subtle);
  border-radius: var(--s2-radius-l);
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.chat__jump-pill--visible {
  opacity: 1;
  pointer-events: auto;
}
.chat__jump-pill:hover {
  background: var(--s2-bg-elevated);
}

/* S2 Message bubbles — user right-aligned, assistant left-aligned */
.msg {
  padding: 0;
  max-width: 100%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--s2-content-default);
}
.msg--user {
  align-self: flex-end;
  background: #7155fa;
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  min-width: 80px;
  max-width: 560px;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
}
.msg--user .msg__content a,
.msg--user .msg__content a:visited {
  color: #c8bbff !important;
  text-decoration: underline !important;
}
.msg--user .msg__content a:hover {
  color: #fff !important;
}
.msg--user :not(pre) > code {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}
.msg--user pre {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.msg--user pre code {
  color: #e8e0ff !important;
}
.msg--user .msg__attachments {
  margin-bottom: 8px;
}
.msg-group--continuation .msg--user {
  padding-left: 0;
}
.msg--assistant {
  background: transparent;
  align-self: stretch;
}
.msg--assistant .msg__content {
  white-space: normal;
  color: var(--s2-content-default);
  font-size: 14px;
  line-height: 1.5;
}
.msg--assistant .msg__error {
  margin: var(--s2-spacing-75) 0;
}
.msg--assistant .msg__error-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--s2-negative);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--s2-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.msg--assistant .msg__error-label::before {
  content: '!';
  width: 16px;
  height: 16px;
  border-radius: var(--s2-radius-s);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--s2-negative) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--s2-negative) 45%, var(--s2-border-subtle));
}
.msg--assistant .msg__error-body {
  margin-top: 2px;
  padding: var(--s2-spacing-75);
  border-left: 2px solid color-mix(in srgb, var(--s2-negative) 60%, var(--s2-border-subtle));
  background: color-mix(in srgb, var(--s2-negative) 8%, var(--s2-bg-sunken));
  border-radius: var(--s2-radius-s);
  color: var(--s2-content-secondary);
  font-family: var(--s2-font-mono);
  font-size: var(--s2-font-size-50);
  white-space: pre-wrap;
  overflow-x: auto;
}
.msg--assistant .msg__error-body code {
  font-size: inherit;
}

/* Dip container — shtml code blocks and image references hydrated into iframes */
.msg__dip {
  margin: 0.6em 0;
  border-radius: var(--s2-radius-default);
  overflow: hidden;
  min-height: 32px;
}
.msg__dip iframe {
  display: block;
  width: 100%;
  border: none;
  overflow: hidden;
  background: transparent;
}

/* Streaming-segment containers built by `renderStreamingSegmented`. The
   shtml variant holds a non-interactive draft iframe while the agent is
   still writing markup into the block. The `cursor: progress` hint and
   slight opacity dimming tell users this is a preview that isn't ready
   to interact with yet — the iframe itself has `pointer-events: none`,
   so clicks/hovers can't reach partial UI. Replaced on stream end by
   the fully-interactive `.msg__dip` from `hydrateDips()`. */
.msg__seg--shtml {
  margin: 0.6em 0;
  cursor: progress;
  opacity: 0.92;
}

/* Streaming placeholder — replaces a fenced ```shtml block while the
   assistant is still emitting it, so users see a loading affordance
   instead of raw markup typing out. Replaced by the real dip iframe
   once streaming ends. Visually matches `.tool-call` rows: label on
   the left, pulsing orange status circle pinned to the right. */
.msg__dip-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0.6em 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--s2-bg-layer-1);
  color: var(--s2-content-secondary);
  font-size: var(--s2-font-size-75);
  line-height: 1.4;
}
.msg__dip-pending-label {
  font-family: var(--s2-font-family);
  font-weight: 500;
  color: var(--s2-content-secondary);
}
.msg__dip-pending-status {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e6a23c;
  flex-shrink: 0;
  animation: tool-status-pulse 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .msg__dip-pending-status {
    animation: none;
  }
}

/* Continuation messages (same sender, no label) */
.msg-group--continuation .msg {
  padding-left: 0;
}

/* Role labels — hidden per UXC Figma (no user/sliccy badges in chat) */
.msg__role {
  display: none;
}
.msg__icon {
  display: none;
}

/* Collapsible messages */
.msg__collapsible {
  cursor: pointer;
}
.msg__collapsible summary {
  list-style: none;
  cursor: pointer;
  color: var(--s2-content-tertiary);
  font-size: var(--s2-font-size-75);
  padding: var(--s2-spacing-50) 0;
}
.msg__collapsible summary::-webkit-details-marker {
  display: none;
}
.msg__collapsible summary::before {
  content: '\25B8';
  font-size: 10px;
  color: var(--s2-content-tertiary);
  transition: transform var(--s2-transition-default);
  display: inline-block;
  margin-right: var(--s2-spacing-50);
}
.msg__collapsible[open] summary::before {
  transform: rotate(90deg);
}
.msg__collapsible[open] .msg__content {
  margin-top: var(--s2-spacing-100);
}

/* Message group */
.msg-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Empty groups left behind after tool-call clustering must not contribute
   to the parent container's gap: 16px. */
.msg-group:empty {
  display: none;
}

/* Ghost bubble shown while compaction is in flight. Not a persisted
   ChatMessage — appended directly to .chat__messages-inner by
   ChatPanel.setCompactionState and removed on `'idle'`. Pulses to
   signal that the agent is busy, not stuck. */
.msg-group--compaction {
  align-self: flex-start;
  max-width: 70%;
}
.msg-group--compaction__bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--s2-radius-l, 14px);
  background: var(--s2-bg-elevated, rgba(0, 0, 0, 0.04));
  color: var(--s2-content-secondary);
  font-size: 13px;
  font-style: italic;
  border: 1px dashed var(--s2-border-subtle, rgba(0, 0, 0, 0.12));
  animation: msg-compaction-pulse 2s ease-in-out infinite;
}
.msg-group--compaction__icon {
  flex-shrink: 0;
  opacity: 0.8;
}
.msg-group--compaction__label {
  white-space: pre-wrap;
}
.msg-group--compaction__dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 2px;
}
.msg-group--compaction__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: msg-compaction-dot 1.2s ease-in-out infinite;
}
.msg-group--compaction__dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.msg-group--compaction__dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes msg-compaction-pulse {
  0%,
  100% {
    background: var(--s2-bg-elevated, rgba(0, 0, 0, 0.04));
  }
  50% {
    background: rgba(0, 0, 0, 0.07);
  }
}
@keyframes msg-compaction-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Queued messages — dimmed to distinguish from sent messages */
.msg--queued {
  opacity: 0.55;
}
.msg__queued-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--s2-bg-elevated);
  color: var(--s2-content-disabled);
  border-radius: var(--s2-radius-s);
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.msg__queued-delete {
  margin-left: 6px;
  background: none;
  border: none;
  color: var(--s2-content-disabled);
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  vertical-align: middle;
}
.msg__queued-delete:hover {
  color: var(--s2-negative);
}

/* Streaming cursor — uses accent color */
.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--s2-accent);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  border-radius: 1px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ================================================================== */
/* Chat input — flat field with inline actions                         */
/* ================================================================== */
.chat__input-area {
  padding: var(--s2-spacing-300);
  background: var(--s2-bg-base);
  border-top: none;
}
.chat__input-area-inner {
  max-width: var(--uxc-content-max-width);
  margin: 0 auto;
  width: 100%;
}
/* UXC: Suggested action buttons above prompt */
.chat__suggested-actions {
  display: flex;
  gap: var(--s2-spacing-100);
  justify-content: center;
  margin-bottom: var(--s2-spacing-200);
  flex-wrap: wrap;
}
.chat__suggested-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2-spacing-75);
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--s2-gray-200);
  border-radius: var(--s2-radius-pill);
  background: var(--s2-bg-base);
  color: var(--s2-content-default);
  font-size: var(--s2-font-size-75);
  font-weight: 600;
  font-family: var(--s2-font-family);
  cursor: pointer;
  transition:
    background var(--s2-transition-default),
    border-color var(--s2-transition-default);
}
.chat__suggested-btn:hover {
  background: var(--s2-gray-75);
  border-color: var(--s2-gray-300);
}
.chat__suggested-btn--accent {
  background: var(--s2-accent);
  color: #fff;
  border-color: transparent;
}
.chat__suggested-btn--accent:hover {
  background: var(--s2-accent-hover);
}
.chat__input-wrapper {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--s2-border-subtle);
  background: var(--s2-gray-25);
  box-shadow:
    0 0 1px 0 rgba(0, 0, 0, 0.08),
    0 1px 4px 0 rgba(0, 0, 0, 0.04),
    0 2px 8px 0 rgba(0, 0, 0, 0.08);
  transition:
    border-color var(--s2-transition-default),
    box-shadow var(--s2-transition-default);
  padding: 16px;
  min-height: 112px;
}
.chat__input-wrapper:focus-within {
  border-color: var(--s2-accent);
  box-shadow:
    0 0 1px 0 rgba(0, 0, 0, 0.08),
    0 1px 4px 0 rgba(0, 0, 0, 0.04),
    0 4px 16px 0 rgba(0, 0, 0, 0.12);
}
.chat__attachments,
.msg__attachments {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}
.chat__attachments--visible,
.msg__attachments {
  display: flex;
}
.chat__attachments {
  margin-bottom: 10px;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(260px, 100%);
  min-height: 36px;
  padding: 5px 8px 5px 6px;
  border-radius: var(--s2-radius-default);
  border: 1px solid var(--s2-border-subtle);
  background: var(--s2-bg-base);
  color: var(--s2-content-default);
  font-size: 12px;
  line-height: 1.2;
}
.msg--user .attachment-chip {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.attachment-chip__visual {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--s2-bg-elevated) 80%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.msg--user .attachment-chip__visual {
  background: rgba(255, 255, 255, 0.16);
}
.attachment-chip__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachment-chip__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.attachment-chip__name,
.attachment-chip__meta,
.attachment-chip__path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip__name {
  font-weight: 600;
}
.attachment-chip__meta {
  color: var(--s2-content-tertiary);
  font-size: 11px;
}
.attachment-chip__path {
  color: var(--s2-content-tertiary);
  font-size: 11px;
  font-family: var(--s2-font-mono, ui-monospace, monospace);
}
.msg--user .attachment-chip__meta,
.msg--user .attachment-chip__path {
  color: rgba(255, 255, 255, 0.7);
}
.attachment-chip__remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--s2-radius-s);
  background: transparent;
  color: var(--s2-content-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.attachment-chip__remove:hover {
  background: var(--s2-bg-elevated);
  color: var(--s2-content-default);
}
.chat__textarea {
  /* Let the inline height set by JS control the textarea's size.
     Using flex:1 here would make the flex distribution override our
     inline height and pin the textarea to the wrapper's min-height. */
  flex: 0 0 auto;
  resize: none;
  min-height: 18px;
  /* JS sets height dynamically up to 30% of the chat panel height;
     this max-height is a fallback cap when JS has not yet run. */
  max-height: 30vh;
  overflow-y: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--s2-content-default);
  font-family: var(--s2-font-family);
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0;
  font-weight: 400;
  outline: none;
}
.chat__textarea::placeholder {
  color: var(--s2-content-tertiary);
}

/* Action bar — bottom row of prompt bar.
   margin-top: auto pins this to the bottom of the flex column so the
   wrapper's min-height still shows an empty-state gap above the bar. */
.chat__action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  flex-shrink: 0;
}
.chat__action-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat__action-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

/* Model selector in prompt bar */
.chat__model-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  position: relative;
}

/* Brain icon — thinking-level cycle. Lives left of the model pill inside
   the .chat__model-selector flex row; click cycles through
   off → low → high → xhigh → off (xhigh skipped on unsupported models). */
.chat__thinking-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--s2-radius-default);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--s2-content-default);
  transition:
    opacity 130ms ease,
    transform 130ms ease,
    background 130ms ease,
    color 130ms ease;
}
.chat__thinking-btn svg {
  width: 18px;
  height: 18px;
}
.chat__thinking-btn:hover {
  background: var(--s2-bg-elevated);
}
.chat__thinking-btn:active {
  transform: scale(0.92);
}
.chat__thinking-btn[hidden] {
  display: none;
}

.chat__thinking-btn[data-level='off'] {
  opacity: 0.5;
}
.chat__thinking-btn[data-level='minimal'],
.chat__thinking-btn[data-level='low'] {
  opacity: 0.75;
}
.chat__thinking-btn[data-level='medium'],
.chat__thinking-btn[data-level='high'] {
  opacity: 1;
  color: var(--s2-accent, var(--slicc-cone, #6b8afd));
}

/* xhigh: ice-cream gradient with subtle shimmer.
   Falls back to flat brand pastels via CSS variables; design tokens can
   override via --slicc-cone-* without touching this rule. */
.chat__thinking-btn[data-level='xhigh'] {
  opacity: 1;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--slicc-cone-mint, #b8e6c9),
    var(--slicc-cone-strawberry, #ffb3c1),
    var(--slicc-cone-vanilla, #fff4c2),
    var(--slicc-cone-blueberry, #b8c9ff)
  );
  background-size: 300% 300%;
  animation: chat-thinking-shimmer 6s ease-in-out infinite;
}

@keyframes chat-thinking-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat__thinking-btn[data-level='xhigh'] {
    animation: none;
  }
}

/* Pill buttons — shown when chat is empty */
.chat__model-pill {
  border: 1px solid var(--s2-border-subtle);
  background: transparent;
  color: var(--s2-content-secondary);
  border-radius: var(--s2-radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--s2-font-family);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 130ms ease,
    color 130ms ease,
    border-color 130ms ease;
}
.chat__model-pill:hover {
  background: var(--s2-bg-elevated);
  color: var(--s2-content-default);
}
.chat__model-pill--active {
  background: var(--s2-accent);
  color: #fff;
  border-color: var(--s2-accent);
}
.chat__model-pill--active:hover {
  background: var(--s2-accent-hover);
  border-color: var(--s2-accent-hover);
}

/* Compact dropdown button — shown when chat has messages */
.chat__model-btn--compact {
  border: 1px solid var(--s2-border-subtle);
  background: transparent;
  color: var(--s2-content-secondary);
  border-radius: var(--s2-radius-pill);
  padding: 4px 8px 4px 12px;
  font-size: 12px;
  font-family: var(--s2-font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition:
    background 130ms ease,
    color 130ms ease;
}
.chat__model-btn--compact:hover {
  background: var(--s2-bg-elevated);
  color: var(--s2-content-default);
}
.chat__model-chevron {
  display: flex;
  align-items: center;
  opacity: 0.6;
}
.chat__model-btn-provider {
  color: var(--s2-content-secondary);
  font-weight: 400;
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--s2-border-subtle);
}
.chat__model-btn--disabled {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

/* Dropdown menu */
.chat__model-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--s2-bg-base);
  border: 1px solid var(--s2-border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow-y: auto;
  min-width: 200px;
  padding: 6px;
  z-index: 100;
}
.chat__model-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--s2-font-family);
  color: var(--s2-content-default);
  transition: background 100ms ease;
}
.chat__model-menu-item:hover {
  background: var(--s2-bg-elevated);
}
.chat__model-menu-item--active {
  font-weight: 600;
}
.chat__model-menu-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.chat__model-menu-provider {
  color: var(--s2-content-secondary);
  font-weight: 400;
  font-size: 11px;
}
.chat__model-check {
  color: var(--s2-accent);
  display: flex;
  align-items: center;
}

/* S2 Send button (accent, rounded) */
.chat__send-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--s2-gray-100);
  color: var(--s2-gray-400);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background var(--s2-transition-default),
    color var(--s2-transition-default),
    transform var(--s2-transition-default);
}
.chat__send-btn:not(:disabled) {
  background: #7155fa;
  color: #fff;
}
.chat__send-btn:not(:disabled):hover {
  background: #6248e0;
}
.chat__send-btn:active {
  transform: scale(0.92);
}
.chat__send-btn:disabled {
  cursor: not-allowed;
}

/* S2 Stop button (inside input) */
.chat__stop-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--s2-gray-800);
  color: var(--s2-gray-25);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background var(--s2-transition-default),
    transform var(--s2-transition-default);
}
.chat__stop-btn:hover {
  background: var(--s2-gray-900);
}
.chat__stop-btn:active {
  transform: scale(0.92);
}

/* Composer icon buttons — quiet action button style */
.chat__attach-btn,
.chat__mic-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--s2-radius-default);
  background: transparent;
  color: var(--s2-content-default);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background var(--s2-transition-default),
    color var(--s2-transition-default),
    transform var(--s2-transition-default);
}
.chat__attach-btn svg,
.chat__mic-btn svg {
  width: 20px;
  height: 20px;
}
.chat__attach-btn:hover,
.chat__mic-btn:hover {
  background: var(--s2-bg-elevated);
  color: var(--s2-content-default);
}
.chat__attach-btn:disabled,
.chat__mic-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.chat__attach-btn--busy {
  color: var(--s2-accent);
}
.chat__file-input {
  display: none;
}
.chat__mic-btn--active {
  color: var(--slicc-cone);
}
.chat__mic-btn--active.chat__mic-btn--listening,
.chat__mic-btn--listening {
  background: var(--slicc-cone);
  color: #fff;
  animation: mic-pulse 1.5s ease-in-out infinite;
}
.chat__mic-btn--listening:hover {
  background: #d96600;
}
@keyframes mic-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

/* ================================================================== */
/* UXC Feedback Row — icon buttons below assistant messages            */
/* ================================================================== */
.msg__feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}
.msg__feedback-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--s2-content-secondary);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition:
    color var(--s2-transition-default),
    background var(--s2-transition-default);
  flex-shrink: 0;
}
.msg__feedback-btn:hover {
  color: var(--s2-content-default);
  background: var(--s2-bg-elevated);
}
.msg__feedback-btn svg {
  width: 16px;
  height: 16px;
}

/* UXC: Message link styles for light mode */
.theme-light .msg__content a {
  color: #1e66f5;
}
.theme-light .msg__content a:hover {
  color: #1444b0;
}
.theme-light .msg__content a:visited {
  color: #1e66f5;
}
