.scva-chat-container {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.scva-chat-header {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: #111827;
}

.scva-chat-messages {
  height: 460px;
  overflow: auto;
  padding: 12px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #eee;
}
.scva-link-with-thumbnail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scva-link-with-thumbnail img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  object-position: left;
  height: auto;
  margin-bottom: 8px;
  display: block;
}

.scva-chat-input-area {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.scva-input {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.scva-send-btn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 0;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.scva-send-btn:hover {
  background: #1f2937;
}

.scva-msg-row {
  margin: 10px 0;
  display: flex;
}

.scva-msg-user {
  justify-content: flex-end;
}

.scva-msg-assistant {
  justify-content: flex-start;
}

.scva-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: normal;
  line-height: 1.4;
  border: 1px solid #e5e7eb;
}

.scva-bubble-user {
  background: #111827;
  color: #fff;
}

.scva-bubble-assistant {
  background: #fff;
  color: #111827;
}

.scva-bubble-assistant p {
  margin: 0 0 8px 0;
}

.scva-bubble-assistant p:last-child {
  margin-bottom: 0;
}

.scva-bubble-assistant ul {
  margin: 8px 0;
  padding-left: 20px;
}

.scva-bubble-assistant li {
  margin: 4px 0;
}

.scva-bubble-assistant a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.scva-bubble-assistant a:hover {
  text-decoration: underline;
}

.scva-bubble-assistant hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

/* Source citation boxes */
.scva-bubble-assistant div[style*="border-left"] {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.scva-bubble-assistant div[style*="border-left"]:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Collapsible sources */
.scva-sources-wrapper {
  margin-top: 16px;
}

.scva-sources-toggle {
  width: 100%;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scva-sources-toggle:hover {
  background: #f3f4f6;
}

.scva-toggle-icon {
  font-size: 12px;
  transition: transform 0.3s;
  display: inline-block;
}

.scva-toggle-icon.open {
  transform: rotate(-180deg);
}

.scva-sources-content {
  margin-top: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Ensure sources are hidden by default */
.scva-sources-content[style*="display:none"],
.scva-sources-content[style*="display: none"] {
  display: none !important;
}
