/* Chat bubbles for dialogs/show.html conversation view.
   Carried over from the old web/input.css, colors ported to our own
   tokens (the two DaisyUI var() reads are gone). */

.msg {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0;
  max-width: 75%;
}
.msg-end   { align-self: flex-end;   align-items: flex-end; }
.msg-start { align-self: flex-start; align-items: flex-start; }

.msg-header {
  font-size: 0.75rem;
  line-height: 1rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
  padding: 0 0.25rem;
  white-space: nowrap;
}

.msg-bubble {
  position: relative;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-lg);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.msg-customer .msg-bubble {
  background-color: #111827;
  color: #f9fafb;
  border-bottom-left-radius: 0.125rem;
}
.msg-agent .msg-bubble {
  background-color: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 0.125rem;
}
.msg-internal_note .msg-bubble {
  background-color: var(--warning-bg);
  color: #78350f;
  border: 1px dashed var(--warning);
  font-style: italic;
}
.msg-internal_note .msg-bubble a { color: #92400e; text-decoration: underline; }
.msg-system .msg-bubble {
  background-color: var(--surface-3);
  color: var(--text-dim);
  font-style: italic;
}

.msg-error-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 5;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 9999px;
  background-color: #f59e0b;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  cursor: help;
  white-space: nowrap;
}
.msg-error-badge.is-critical {
  background-color: #dc2626;
  color: #ffffff;
}
