@import url('https://cdn.jsdelivr.net/npm/altair-static@latest/build/dist/styles.css');

.ai-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  align-items: center;
}
.ai-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  max-width: 800px;
  width: 100%;
  color: var(--theme-font-color);
}
.ai-chat__messages {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}
.ai-chat__input-actions {
  display: flex;
  gap: 10px;
}
.ai-chat__message {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.ai-chat__message--user {
  justify-content: flex-end;
}
.ai-chat__message--assistant {
  justify-content: flex-start;
}
.ai-chat__message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--theme-off-bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
}
.ai-chat__message-content {
  padding: 10px;
  border-radius: 10px;
  max-width: 70%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  background: rgba(var(--rgb-theme-font), 0.1);
}
.ai-chat__message-content pre {
  white-space: pre-wrap;
  font-family: inherit;
}
.ai-chat__message-content p:last-child {
  margin: 0;
}
.ai-chat__message--user .ai-chat__message-content {
  background: rgba(var(--rgb-primary), 0.1);
}
.ai-chat__message-actions {
  position: absolute;
  bottom: 0;
  margin-bottom: -10px;
  display: flex;
  gap: 5px;
  background-color: var(--theme-off-bg-color);
  opacity: 0;
}
.ai-chat__message:hover .ai-chat__message-actions {
  opacity: 1;
}
button.ai-chat__message-action {
  height: fit-content;
  padding: 5px;
}
.ai-chat__disclaimer {
  margin-top: 10px;
  font-size: 0.8em;
  color: var(--theme-font-color);
  opacity: 0.5;
  text-align: center;
}
.ai-chat__loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: rgba(var(--rgb-theme-off-bg), 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}
.ai-chat__loader__spinner {
  width: 32px;
  height: 32px;
  animation: ai-chat-spin 1s linear infinite;
}
.spinner {
  animation: ai-chat-spin 1s linear infinite;
}
@keyframes ai-chat-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ai-chat__notice {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ai-chat__notice-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(var(--rgb-theme-font), 0.03);
}
.ai-chat__notice-icon {
  display: flex;
  gap: 4px;
  opacity: 0.9;
}
.ai-chat__notice-text {
  color: var(--theme-font-color);
  opacity: 0.8;
}

.ai-chat__empty-session {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ai-chat__empty-session-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ai-chat__empty-session-icon {
  display: flex;
  gap: 4px;
  opacity: 0.9;
  padding: 16px;
}
.ai-chat__empty-session-text {
  color: var(--theme-font-color);
  opacity: 0.8;
}
.ai-chat__empty-session-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-chat__empty-session-prompt {
  color: var(--theme-font-color);
  opacity: 0.8;
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  background: rgba(var(--rgb-theme-font), 0.03);
  max-width: 300px;
}
/* 
<div className="ai-chat__top-bar">
  <div className="ai-chat__top-bar-inner">
    <div className="ai-chat__top-bar-title">
      {activeSession ? 'Active session' : 'No active session'}
    </div>
    <div className="ai-chat__top-bar-actions">
      <button
        className="btn btn--primary btn--light"
        onClick={() => onStartNewSession()}
      >
        <Plus size={16} />
        Start new session
      </button>
    </div>
  </div>
</div> */
.ai-chat__top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(var(--rgb-theme-font), 0.03);
  margin-bottom: 10px;
  border-radius: 10px;
}
.ai-chat__credits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ai-chat__tag {
  padding: 5px;
  border-radius: 5px;
  background: rgba(var(--rgb-theme-font), 0.1);
  color: var(--theme-font-color);
  text-transform: uppercase;
  font-size: 0.8em;
}
