.sage-ai-codebase-manager {
  padding: 16px;
  flex-shrink: 0; /* Prevent shrinking within settings container */
}

.sage-ai-section-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.sage-ai-section-description {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--jp-ui-font-color2);
}

.sage-ai-add-repo-form {
  background-color: var(--jp-layout-color1);
  border: 1px solid var(--jp-border-color1);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
}

.sage-ai-form-group {
  margin-bottom: 12px;
}

.sage-ai-form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.sage-ai-settings-title {
  margin-left: 16px;
}

.sage-ai-input, .sage-ai-textarea {
  width: 98%;
  padding: 8px;
  border: 1px solid var(--jp-border-color1);
  border-radius: 4px;
  background-color: var(--jp-layout-color0);
  color: var(--jp-ui-font-color0);
}

.sage-ai-button {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  border: none;
}

.sage-ai-primary-button {
  background-color: var(--jp-brand-color1);
  color: white;
}

.sage-ai-primary-button:hover {
  background-color: var(--jp-brand-color0);
}

.sage-ai-codebase-list {
  margin-top: 20px;
  max-height: 400px; /* Set maximum height */
  overflow-y: auto; /* Enable vertical scrolling */
  scroll-behavior: smooth; /* Add smooth scrolling */
  padding-right: 4px; /* Add some padding for the scrollbar */
}

/* Styling for webkit-based browsers' scrollbars */
.sage-ai-codebase-list::-webkit-scrollbar {
  width: 8px;
}

.sage-ai-codebase-list::-webkit-scrollbar-track {
  background: var(--jp-layout-color0);
  border-radius: 4px;
}

.sage-ai-codebase-list::-webkit-scrollbar-thumb {
  background: var(--jp-border-color2);
  border-radius: 4px;
}

.sage-ai-codebase-list::-webkit-scrollbar-thumb:hover {
  background: var(--jp-border-color1);
}

.sage-ai-empty-state {
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--jp-border-color1);
  color: var(--jp-ui-font-color2);
  border-radius: 4px;
}

.sage-ai-codebase-item {
  border: 1px solid var(--jp-border-color1);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 12px;
  background-color: var(--jp-layout-color1);
}

.sage-ai-codebase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.sage-ai-codebase-title {
  font-weight: bold;
  margin: 0;
}

.sage-ai-codebase-path {
  margin: 4px 0;
  color: var(--jp-ui-font-color2);
  word-break: break-all;
}

.sage-ai-codebase-instructions {
  margin: 8px 0;
  padding: 8px;
  background-color: var(--jp-layout-color0);
  border-left: 3px solid var(--jp-brand-color1);
  border-radius: 2px;
}

.sage-ai-codebase-actions {
  display: flex;
  gap: 8px;
}

.sage-ai-action-button {
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--jp-border-color1);
  background-color: var(--jp-layout-color2);
  color: var(--jp-ui-font-color0);
  font-size: 0.9em;
}

.sage-ai-action-button:hover {
  background-color: var(--jp-layout-color3);
}

.sage-ai-danger-button {
  color: var(--jp-error-color1);
  border-color: var(--jp-error-color1);
}

.sage-ai-danger-button:hover {
  background-color: rgba(var(--jp-error-color-rgb), 0.1);
}

.sage-ai-index-status {
  font-size: 0.9em;
  margin: 8px 0;
  padding: 4px 8px;
  background-color: var(--jp-layout-color2);
  border-radius: 4px;
  display: inline-block;
}
