dialog.hv-assistant-modal[data-ca-layer][open] {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: safe center;
  justify-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vw, 36px);
  border: 0;
  color: inherit;
  background: transparent;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.hv-assistant-modal:not([open]) { display: none; }
dialog.hv-assistant-modal::backdrop { background: rgb(5 8 20 / 68%); }
dialog.hv-assistant-modal .ca-dialog { max-height: none; max-width: min(100%, 620px); margin: 0; }
dialog.hv-assistant-modal[open] .ca-dialog { animation: hv-assistant-in 280ms cubic-bezier(.2,.7,.24,1) both; }
.ca-dialog-message:empty { display: none; }
.ca-dialog-message { margin: 1rem 0 0; }
.ca-dialog-message.is-error { color: #ee7e8d; }

.chat-msg-body .hv-chat-activity-icon {
  display: inline-grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  flex: 0 0 auto;
  vertical-align: middle;
  color: var(--chat-muted, currentColor);
}
.chat-msg-body .hv-chat-activity-icon svg {
  display: block;
  width: 1em;
  height: 1em;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: none;
}
.chat-msg-body .chat-generation-status {
  min-height: 36px;
  max-width: 100%;
  align-items: center;
  column-gap: .55rem;
  color: #b7c3ec;
}
.chat-msg-body .chat-generation-status .hv-chat-activity-icon {
  animation: hv-activity-breathe 1.65s ease-in-out infinite;
}
.chat-msg-body .chat-generation-status [data-generation-status] { display: inline-block; }
html[data-theme="light"] .chat-msg-body .chat-generation-status { color: #444e74; }
.chat-msg-body .hv-chat-duration { display: flex; align-items: center; gap: .38rem; }
.chat-msg-body .chat-response-process > summary { width: fit-content; }
.chat-msg-body .chat-response-process > ol {
  margin-left: .61rem;
  padding-inline-start: .9rem;
  border-inline-start: 1px solid currentColor;
}
.chat-msg-body .chat-response-process[open] > ol,
.chat-msg-body .chat-generation-details:not([hidden]) > ol {
  animation: hv-assistant-in 220ms ease-out both;
}
@keyframes hv-assistant-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hv-activity-breathe {
  0%, 100% { opacity: .6; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  dialog.hv-assistant-modal[open] .ca-dialog,
  .chat-msg-body .chat-generation-status .hv-chat-activity-icon,
  .chat-msg-body .chat-response-process[open] > ol,
  .chat-msg-body .chat-generation-details:not([hidden]) > ol { animation: none; }
}

.chat-msg--ai .chat-msg-body.hv-answer {
  padding: 12px clamp(4px,1vw,12px) 16px; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; min-width: 0;
}
.hv-answer .chat-msg-meta { display:flex; gap:12px; align-items:center; margin:0 0 11px; }
.hv-answer .chat-msg-meta .chat-msg-model-badge {
  display:inline-flex; align-items:center; gap:8px; background:transparent; color:var(--ink);
  padding:0; border:0; font-size:12px; font-weight:600; min-width:0; overflow-wrap:anywhere;
}
.hv-answer .chat-msg-model-badge svg { width:16px; height:16px; flex:none; }
.hv-answer .hv-answer-timing { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.hv-answer-timing b { font-weight:400; }
.hv-answer .chat-msg-text { line-height:1.6; }
.hv-answer .chat-msg-text > :first-child { margin-block-start:0; }
.hv-answer .chat-msg-actions { margin-top:12px; }
.hv-answer-status { display:flex; align-items:center; gap:10px; min-height:24px; color:var(--muted); font-size:13px; }
.hv-answer-wave { display:inline-flex; gap:2px; align-items:center; height:16px; }
.hv-answer-wave i { display:block; width:2px; height:10px; border-radius:2px; background:currentColor; animation:hv-signal 1.35s ease-in-out infinite both; }
.hv-answer-wave i:nth-child(2) { animation-delay:-.95s; }
.hv-answer-wave i:nth-child(3) { animation-delay:-.77s; }
@keyframes hv-signal { 0%,100% { transform:scaleY(.35); opacity:.52; } 45% { transform:scaleY(1); opacity:1; } }
@media(prefers-reduced-motion:reduce) { .hv-answer-wave i { animation:none; } .hv-answer-wave i:nth-child(2) { height:15px; } }
