/* Research-specific styles */

.version-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.version-label {
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.version-prompt {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  font-style: italic;
}

.research-output {
  padding: 1rem;
  background: white;
  border-radius: 0.375rem;
}

/* Section Category Styles - for "My Research" and "Shared With Me" headers */
.section-category {
  padding: 1rem 1rem 0.5rem;
}

.section-category-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

/* Shared research item specific styles */
.shared-item .section-item-icon {
  background: #fee2e2; /* Light red background for shared icon */
  color: #ef4444; /* Red icon color */
}

.shared-by-info {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.125rem;
  flex-grow: 1;
}

.shared-section-list {
  margin-bottom: 1rem;
}

/* Adjust layout for shared items to accommodate the "shared by" line */
.shared-item .section-item-title {
  flex-direction: column;
  align-items: flex-start;
}

.shared-item .toggle-icon {
  position: absolute;
  right: 1rem;
}

/* Make sure the toggle icon stays aligned right in shared items */
.shared-item .section-header {
  position: relative;
}

/* Research-specific sidebar overrides */
/* These styles only modify research-specific aspects without changing layout/padding */
.shared-item .section-item-icon {
  background: #fee2e2; /* Light red background for shared icon */
  color: #ef4444; /* Red icon color */
}

.shared-by-info {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.125rem;
  flex-grow: 1;
}

.shared-section-list {
  margin-bottom: 1rem;
}

/* Adjust layout for shared items to accommodate the "shared by" line */
.shared-item .section-item-title {
  flex-direction: column;
  align-items: flex-start;
}

.shared-item .toggle-icon {
  position: absolute;
  right: 1rem;
}

/* Override active state styling for section header */
.section-item.active .section-header {
  background: none !important;
  border-left: none !important;
}

/* === Icons/Titles === */
.section-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #e0f2fe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.project-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle-icon {
  color: var(--gray);
  font-size: 0.75rem;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

/* === Sub-list (versions) === */
.sub-list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: transparent;
}

.sub-list.collapsed {
  display: none;
}

/* Each version item has a simple horizontal rule */
.sub-list-item {
  /* Add a bottom border for each version.
     Alternatively, do border-top if you prefer. */
  border-bottom: 1px solid #e2e8f0;
}

.sub-list-item:last-child {
  /* Remove the border from the last item if desired */
  border-bottom: none;
}

.sub-list-item a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--dark);
  font-size: 0.8rem;  /* Make version links text smaller */
  /* No hover transitions or color changes */
}

/* Remove any hover or active background colors */
.sub-list-item a:hover,
.sub-list-item.active a {
  background: none !important;
  color: var(--dark) !important;
  font-weight: normal !important;
}

/* Empty state for no projects */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--gray);
}

/* Additional Content Styling */
.content-subtitle {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.content-actions {
  display: flex;
  gap: 1rem;
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.text-gray {
  color: var(--gray);
  font-size: 0.875rem;
  display: block;
  margin-top: 0.25rem;
}

/* Prompt Templates Section Styles (unchanged) */
.prompts-section {
  margin-top: 2rem;
}

.prompts-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.prompt-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.prompt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.prompt-text {
  color: var(--dark);
  line-height: 1.5;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .prompts-grid {
    grid-template-columns: 1fr;
  }
}