src/core/styles.css
.chat-widget {
  position: fixed;
  z-index: 9999;
  font-family: var(
    --font-family,
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif
  );
  --text-color: #333;
  color: var(--text-color);
}

.chat-widget-generating {
  .chat-widget-send {
    display: none !important;
  }

  .chat-widget-abort {
    display: flex !important;
  }
}

.chat-widget-bottom-right {
  right: 20px;
  bottom: 20px;
}

.chat-widget-bottom-left {
  left: 20px;
  bottom: 20px;
}

.chat-widget-top-right {
  right: 20px;
  top: 20px;
}

.chat-widget-top-left {
  left: 20px;
  top: 20px;
}

.chat-widget-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.chat-widget-container {
  position: absolute;
  bottom: -20px;
  width: calc(100vw - var(--scrollbar-width));
  height: 100vh;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 5px 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

@media only screen and (min-width: 768px) {
  .chat-widget-container {
    bottom: 70px;
    width: 480px;
    height: 670px;
  }
  .chat-widget-container-toggle-button {
    bottom: -5px;
  }
}

.chat-widget-container-full-screen {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
}

/* Add these rules for different positions */
.chat-widget-bottom-right .chat-widget-container {
  right: -20px;
}

@media only screen and (min-width: 768px) {
  .chat-widget-bottom-right .chat-widget-container {
    right: 0;
  }
}

.chat-widget-bottom-left .chat-widget-container {
  left: -20px;
}

@media only screen and (min-width: 768px) {
  .chat-widget-bottom-left .chat-widget-container {
    left: 0;
  }
}

.chat-widget-top-right .chat-widget-container {
  right: -20px;
  bottom: auto;
  top: -20px;
}

@media only screen and (min-width: 768px) {
  .chat-widget-top-right .chat-widget-container {
    right: 0;
    top: 70px;
  }
}

.chat-widget-top-left .chat-widget-container {
  left: -20px;
  bottom: auto;
  top: -20px;
}

@media only screen and (min-width: 768px) {
  .chat-widget-top-left .chat-widget-container {
    left: 0;
    top: 70px;
  }
}

.chat-widget-header {
  padding: 16px 20px;
  background-color: white;
  color: var(--text-color);
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.chat-widget-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-widget-container-full-screen .chat-widget-header h3 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.chat-widget-header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.chat-widget-new-chat {
  background: none;
  border: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-right: 16px;
  padding: 8px 12px;
}

.chat-widget-new-chat:hover {
  background-color: #f0f0f0;
  border-radius: 4px;
}

.chat-widget-new-chat svg {
  margin-right: 6px;
}

.chat-widget-new-chat:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #999;
}

.chat-widget-new-chat:disabled:hover {
  background-color: transparent;
}

.chat-widget-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
}

.chat-widget-full-screen {
  background: none;
  border: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  /* hide on mobile */
  display: none;
}

@media only screen and (min-width: 768px) {
  .chat-widget-full-screen {
    display: block;
  }
}

.chat-widget-content {
  flex: 1;
  min-height: 0;
}

.chat-widget-welcome-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  text-align: center;
  color: var(--text-color);
}

.chat-widget-welcome-subtitle {
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
  text-align: center;
  color: var(--text-color);
}

.chat-widget-prompts {
  margin-top: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.chat-widget-container-full-screen .chat-widget-prompts {
  flex-direction: row;
  justify-content: center;
}

.chat-widget-welcome-icon {
  margin-bottom: 10px;
}

.chat-widget-welcome-icon svg path {
  fill: var(--primary-color);
}

.chat-widget-prompt {
  text-align: left;
  border-width: 0;
  background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
  border-radius: 4px;
  height: 56px;
  padding: 4px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-widget-container-full-screen .chat-widget-prompt {
  height: 104px;
  flex-direction: column;
  align-items: flex-start;
}

.chat-widget-messages,
.chat-widget-welcome-screen {
  height: 100%;
  padding: 16px;
  overflow-y: auto;
  background-color: #fff;
  box-sizing: border-box;
}

.chat-widget-welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* TODO: handle case with scrollbar */
  justify-content: center;
}

.chat-message {
  margin-bottom: 16px;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
}

.chat-message-user {
  margin-left: auto;
  justify-content: flex-end;
}

.chat-message-bot {
  margin-right: auto;
  justify-content: flex-start;
  flex-direction: column;
}

.chat-message-content-wrapper-main {
  display: flex;
  flex-direction: row;
  max-width: 100%;
  overflow: hidden;
}

.chat-message-content-main {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.chat-message-bot .chat-message-content-wrapper-main {
  background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
  color: var(--text-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 12px 16px;
  border-radius: 4px;
}

.chat-message-bot .chat-message-content {
  width: 100%;
}

.chat-message-bot .chat-message-text {
  padding: 0;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-message-avatar svg path {
  fill: var(--primary-color);
}

.chat-message-user .chat-message-avatar {
  background-color: var(--primary-color);
  color: white;
  margin-left: 8px;
  margin-right: 0;
}

.chat-message-bot .chat-message-avatar {
  margin-left: 0;
}

.chat-message-content {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow: hidden;
}

.chat-message-text {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow: hidden;
}

.chat-message-user .chat-message-text {
  background-color: #f4f5f7;
  color: var(--text-color);
}

.chat-message-timestamp {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.chat-message-user .chat-message-timestamp {
  text-align: right;
  margin-right: 4px;
  margin-left: 0;
}

.chat-message-bot .chat-message-timestamp {
  text-align: left;
  margin-left: 4px;
  margin-right: 0;
}

.chat-message-feedback {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  margin-left: 4px;
}

.chat-message-feedback-button {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s ease;
  opacity: 0.6;

  svg {
    pointer-events: none;
  }
}

.chat-message-feedback-button:hover {
  opacity: 1;
  color: var(--primary-color);
  background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.chat-message-feedback-button.feedback-selected {
  opacity: 1;
  color: var(--primary-color);
  background-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.chat-widget-input {
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid #f0f0f0;
  background-color: white;
  position: relative;
}

.chat-widget-input textarea {
  box-sizing: content-box;
  font-family: var(--font-family);
  flex: 1;
  padding: 18px 52px;
  padding-left: 12px;
  border: 1px solid #424652;
  color: var(--text-color);
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  resize: none;
}

.chat-widget-input textarea:focus {
  border-color: var(--primary-color);
}

.chat-widget-input:has(.chat-widget-file-input-container) textarea {
  padding-left: 52px;
}

.chat-widget-file-input-container {
  position: absolute;
  left: 24px;
  bottom: 24px;
}

.chat-widget-file-input {
  display: none;
}

.chat-widget-file-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: #666;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-widget-file-button:hover {
  background-color: #e0e0e0;
}

.chat-widget-file-preview {
  width: 100%;
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-widget-file-item {
  display: flex;
  align-items: center;
  background-color: #f0f0f0;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.chat-widget-file-item span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-widget-file-item button {
  background: none;
  border: none;
  color: #888;
  margin-left: 5px;
  cursor: pointer;
  font-size: 14px;
}

.chat-message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.chat-message-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100px;
}

.chat-message-file-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.chat-message-file-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.chat-message-file-name {
  font-size: 10px;
  margin-top: 4px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Make sure file attachments in user messages are also aligned properly */
.chat-message-user .chat-message-files {
  align-self: flex-end;
  justify-content: flex-end;
}

.chat-message-bot .chat-message-files {
  align-self: flex-start;
  justify-content: flex-start;
}

/* Add hover effect for file previews */
.chat-message-file-preview:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Add styles for file download button */
.chat-message-file-download {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  cursor: pointer;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
}

.chat-message-file-download:hover {
  background-color: rgba(108, 92, 231, 0.1);
}

.chat-loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
  margin-left: 40px;
}

.chat-loading-spinner-dot {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background-color: var(--primary-color);
  animation: bounce 1.4s infinite ease-in-out both;
}

.chat-loading-spinner-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.chat-loading-spinner-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.chat-widget-send {
  width: 40px;
  height: 40px;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 24px;
  bottom: 24px;
  background-color: transparent;
}

.chat-widget-send svg path {
  fill: var(--primary-color);
}

.chat-widget-abort {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  border: none;
  position: absolute;
  right: 30px;
  bottom: 29px;
}

.chat-widget-footer,
.chat-widget-powered-by {
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #999;
  border-top: 1px solid #f0f0f0;
}

.chat-widget-container-full-screen .chat-widget-footer,
.chat-widget-container-full-screen .chat-widget-powered-by {
  border-top: none;
  background-color: white;
}

.chat-widget-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Add these styles for the bouncing dots */

.chat-message-loading {
  min-width: 50px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 6px;

  & ~ .chat-message-feedback {
    display: none;
  }
}

.chat-message-dots {
  display: flex;
  align-items: center;
}

.chat-message-dot {
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
  animation: bounce 1.4s infinite ease-in-out both;
}

.chat-message-progress {
  font-size: 12px;
  color: color-mix(in srgb, var(--text-color) 60%, transparent);
  font-style: italic;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  min-height: 16px;
  width: 100%;
  order: 2;
  margin-left: 8px;
  white-space: nowrap;
}

.chat-message-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.chat-message-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
  }
  40% {
    transform: scale(1);
  }
}

/* Add these styles for the human support link */

.chat-widget-human-support {
  padding: 8px 16px 16px;
  text-align: center;
}

.chat-widget-human-support a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.chat-widget-human-link:hover {
  color: color-mix(in srgb, var(--primary-color) 80%, transparent);
  text-decoration: underline;
}

.chat-widget-human-link svg {
  margin-left: 6px;
  width: 14px;
  height: 14px;
}

/* Add these styles for markdown formatting */

.chat-message-markdown {
  overflow: hidden;
}

.chat-message-markdown h1,
.chat-message-markdown h2,
.chat-message-markdown h3,
.chat-message-markdown h4,
.chat-message-markdown h5,
.chat-message-markdown h6 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
}

.chat-message-markdown h1 {
  font-size: 1.5em;
}

.chat-message-markdown h2 {
  font-size: 1.25em;
}

.chat-message-markdown h3 {
  font-size: 1.125em;
}

.chat-message-markdown p {
  margin-top: 0;
  margin-bottom: 0.75em;
}

.chat-message-markdown p:last-child {
  margin-bottom: 0;
}

.chat-message-markdown ul,
.chat-message-markdown ol {
  margin-top: 0;
  margin-bottom: 0.75em;
  padding-left: 1.5em;
}

.chat-message-markdown ul {
  list-style-type: '- ';
}

.chat-message-markdown li {
  margin-bottom: 0.25em;
  display: list-item;
}

.chat-message-markdown code {
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  word-break: break-all;
  max-width: 100%;
}

.chat-message-markdown pre {
  margin-top: 0;
  margin-bottom: 0.75em;
  padding: 0.75em;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.45;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  max-width: 100%;
  white-space: pre;
}

.chat-message-markdown pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  display: block;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
  max-width: 100%;
}

.chat-message-markdown a {
  color: var(--primary-color);
  text-decoration: none;
}

.chat-message-markdown a:hover {
  text-decoration: underline;
}

.chat-message-markdown blockquote {
  margin: 0 0 0.75em;
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
}

.chat-message-markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: inline-block;
}

.chat-message-markdown table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 0.75em;
  word-break: normal;
  border-radius: 4px;
}

.chat-message-markdown table th {
  text-align: left;
  color: rgba(126, 126, 126, 0.6);
  font-weight: 400;
  padding: 13px;
}

.chat-message-markdown table td {
  font-weight: 500;
  padding: 17px 13px;
}

.chat-message-markdown table tr {
  background-color: #fff;
  border-top: 1px solid #eeeff1;
  position: relative;
}

.chat-widget-panel {
  display: flex;
  flex: 1;
  min-height: 0;
}

.chat-widget-container-full-screen .chat-widget-panel {
  gap: 16px;
  padding: 40px;
  background-color: #f0f0f0;
}

.chat-widget-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.chat-widget-history {
  display: none;
  background-color: #fff;
  min-width: 250px;
  width: 25%;
  max-width: 320px;
  border-radius: 4px;
}

.chat-widget-container-full-screen .chat-widget-history {
  display: flex;
  flex-direction: column;
}

.chat-widget-history-title {
  padding: 32px 16px;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.chat-widget-history-chats-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
}

.chat-widget-history-empty {
  padding: 16px;
  text-align: center;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.chat-widget-history-empty h4 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
}

.chat-widget-history-empty span {
  font-size: 14px;
  line-height: 22px;
  color: #7e7e7e;
}

.chat-widget-history-chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 6px;
  background: #fcfcfd;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-family);
  box-shadow: none;
  color: var(--text-color);
}

.chat-widget-history-chat:hover,
.chat-widget-history-chat.active {
  background: color-mix(in srgb, var(--primary-color) 5%, transparent);
  color: var(--primary-color);
}

.chat-widget-history-chat-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-widget-history-chat-delete {
  appearance: none;
  background: transparent;
  border: none;
  color: #9aa0a6;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
}

.chat-widget-history-chat:hover .chat-widget-history-chat-delete,
.chat-widget-history-chat.active .chat-widget-history-chat-delete {
  color: var(--primary-color);
}

.chat-widget-history-chat-delete:hover {
  background: rgba(0, 0, 0, 0.04);
}

.chat-widget-history-chat-timestamp {
  font-size: 13px;
  color: #b2aecd;
  font-weight: 400;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-widget-history-date-header {
  font-size: 14px;
  font-weight: 500;
  color: #7e7e7e;
  margin: 16px 0 8px 0;
  padding: 0 4px;
}

.chat-widget-history-date-header:first-child {
  margin-top: 0;
}

.chat-message-chart {
  width: 100%;
  height: 100%;
}

.chat-message-chart-container {
  min-height: 300px;
  width: 100%;
  min-width: 250px;
}

#vg-tooltip-element {
  z-index: 99999;
}

.chat-message--full-width > .chat-message-content {
  width: 100%;
}

.chat-message-intermediate-steps {
  margin-bottom: 12px;
  border-radius: 4px;
  background-color: color-mix(in srgb, var(--primary-color) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
  overflow: hidden;
}

.chat-message-intermediate-steps > summary {
  padding: 5px 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
  user-select: none;
}

.chat-message-intermediate-steps[open] > summary {
  color: var(--primary-color);
}

.chat-message-intermediate-steps > summary:hover {
  background-color: color-mix(in srgb, var(--primary-color) 5%, transparent);
  color: var(--primary-color);
}

.chat-message-intermediate-steps > summary::marker {
  content: '';
}

.chat-message-intermediate-steps > summary::before {
  content: '🤔 Show thinking';
  font-weight: 500;
  font-size: 14px;
}

.chat-message-intermediate-steps[open] > summary::before {
  content: '💡 Hide thinking';
}

.chat-message-intermediate-step {
  position: relative;
  margin: 0;
  padding: 12px 16px 12px 40px;
  font-size: 13px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text-color) 60%, transparent);
  border-top: 1px solid
    color-mix(in srgb, var(--primary-color) 10%, transparent);
  transition: background-color 0.2s ease;
}

.chat-message-intermediate-step:last-child {
  border-bottom: none;
}

.chat-message-intermediate-step::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  opacity: 0.5;
}

.chat-message-intermediate-step::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  width: 2px;
  height: 100%;
  background-color: var(--primary-color);
  opacity: 0.2;
}

.chat-message-intermediate-step:first-of-type:last-of-type::after {
  display: none;
}

.chat-message-intermediate-step:first-of-type::after {
  height: 50%;
  top: 50%;
}

.chat-message-intermediate-step:last-child::after {
  height: 50%;
}

.chat-message-intermediate-step:hover {
  background-color: color-mix(in srgb, var(--primary-color) 5%, transparent);
}

.chat-message-intermediate-steps::details-content {
  transition: height 0.5s ease, content-visibility 0.5s ease allow-discrete;
  height: 0;
  overflow: clip;
}

.chat-message-image-link-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.chat-message-image-link-container a {
  line-height: 0;
}

.chat-contract-image {
  width: 32px !important;
  height: 32px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  position: absolute;
  left: 10px;
}

.chat-message-markdown
  table
  tr:has(.chat-contract-image-loaded)
  td:first-child {
  padding-left: 50px;
}

.chat-message-flag-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-message-flag-container img {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 50%;
}

/* Report block */
.chat-message-report-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
  overflow: hidden;
  margin-bottom: 16px;
}

.chat-message-report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #eeeff1;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  height: 56px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.chat-message-report-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-message-report-card:has(.chat-contract-image-loaded)
  .chat-message-report-text {
  padding-left: 40px;
}

.chat-message-report-name {
  font-size: 14;
  line-height: 22px;
  font-weight: 500;
  color: #000;
}

.chat-message-report-role {
  font-size: 12px;
  line-height: 20px;
  color: #545454;
}

.chat-message-report-children {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding-left: 50px;
  z-index: 1;
}

.chat-message-children-report-arrow {
  position: absolute;
  left: -28px;
  bottom: 22px;
  z-index: 1;
}

/* Browser supports interpolate-size */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }

  .chat-message-intermediate-steps[open]::details-content {
    height: auto;
  }
}
