.chatContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: white;
  min-width: 0;
  min-height: 0;
  width: 100%;
  position: relative;
}

.chatContainer .debugHeader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  opacity: 0.75;
  pointer-events: auto;
}

.chatContainer .debugHeader:hover {
  opacity: 0.9;
}

.debugToggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #4a5568;
  transition: all 0.2s;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.debugToggle:hover {
  background-color: #f7fafc;
  border-color: #a0aec0;
  color: #2d3748;
}

.queryHeader {
  flex-shrink: 0;
  padding: 8px 16px;
  background-color: #f7fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #718096;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.querySelection {
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.queryStatus {
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
  margin-left: 8px;
}

.queryStatus.loaded {
  color: #48bb78;
}

.queryStatus.loading {
  color: #f6ad55;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.chatContainer .emptyState {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0aec0;
  font-size: 16px;
  font-style: italic;
}

.messagesContainer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.messagesContainer::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.emptyState {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0aec0;
  font-size: 16px;
  font-style: italic;
}

.jumpToCurrent {
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s;
  z-index: 10;
}

.jumpToCurrent:hover {
  background-color: #3182ce;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .messagesContainer {
    padding: 12px;
    gap: 8px;
  }

  .jumpToCurrent {
    bottom: 12px;
    right: 12px;
    padding: 8px 16px;
    font-size: 12px;
  }

  .queryHeader {
    padding: 6px 12px;
    font-size: 11px;
  }

  .querySelection {
    font-size: 10px;
  }
}

