/*
 * D11.13F-3B_PERSISTENT_CONVERSATION_FRONTEND_V1
 */

.scb-conversation-toolbar {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
  width: 100%;
}

.scb-conversation-state {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  font-size: 11px;
  gap: 6px;
  min-height: 26px;
}

.scb-conversation-state::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 6px;
  opacity: 0.75;
  width: 6px;
}

.scb-conversation-state.is-loading {
  color: #ffd27a;
}

.scb-conversation-state.is-ready {
  color: #8ee3b5;
}

.scb-conversation-state.is-empty {
  color: rgba(255, 255, 255, 0.68);
}

.scb-conversation-state.is-error {
  color: #ff9e96;
}

.scb-new-conversation {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
}

.scb-new-conversation:hover {
  background: rgba(255, 255, 255, 0.14);
}

.scb-new-conversation:focus-visible {
  outline: 3px solid rgba(106, 164, 255, 0.35);
  outline-offset: 2px;
}

.scb-history-notice {
  align-items: center;
  background: rgba(20, 87, 217, 0.08);
  border: 1px solid rgba(20, 87, 217, 0.16);
  border-radius: 10px;
  color: #33517f;
  display: flex;
  font-size: 11px;
  gap: 8px;
  line-height: 1.5;
  margin: 4px auto 12px;
  max-width: 88%;
  padding: 8px 10px;
}

.scb-history-notice strong {
  color: #1457d9;
}

.scb-restored-message {
  opacity: 0;
  transform: translateY(5px);
  animation:
    scb-restored-message-in
    180ms ease forwards;
}

@keyframes scb-restored-message-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scb-fallback-message {
  display: flex;
  margin: 8px 0;
  width: 100%;
}

.scb-fallback-message.is-user {
  justify-content: flex-end;
}

.scb-fallback-message.is-assistant {
  justify-content: flex-start;
}

.scb-fallback-message-bubble {
  background: #f1f5f9;
  border-radius: 14px;
  color: #172033;
  line-height: 1.55;
  max-width: 82%;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.scb-fallback-message.is-user
.scb-fallback-message-bubble {
  background: #1457d9;
  color: #fff;
}

@media (max-width: 600px) {
  .scb-conversation-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .scb-new-conversation {
    justify-content: center;
    width: 100%;
  }
}
