/* Clean Agent Styles */

/* Real-time notification animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.research-agent-container {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
}

.research-agent-left-sidebar {
  width: 64px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  overflow: hidden;
  transition: width 0.3s ease;
  position: relative;
}

.research-agent-left-sidebar.expanded {
  width: 300px;
}

.research-agent-right-sidebar {
  width: 64px;
  flex-shrink: 0;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  overflow: hidden;
  transition: width 0.3s ease;
  position: relative;
}

.research-agent-right-sidebar.expanded {
  width: 300px;
}

.research-agent-center-panel {
  flex: 1;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Ultra subtle scrollbar for messages */
#research-agent-messages::-webkit-scrollbar {
  width: 6px;
}

#research-agent-messages::-webkit-scrollbar-track {
  background: transparent;
}

#research-agent-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

#research-agent-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Dark mode scrollbar */
[data-theme="dark"] #research-agent-messages::-webkit-scrollbar-thumb,
.dark #research-agent-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #research-agent-messages::-webkit-scrollbar-thumb:hover,
.dark #research-agent-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Extremely subtle scrollbar for left panel */
.research-agent-sidebar-content::-webkit-scrollbar,
.research-agent-sidebar-sections::-webkit-scrollbar,
#research-agent-left-status::-webkit-scrollbar,
#research-agent-left-project::-webkit-scrollbar,
#research-agent-left-collaboration::-webkit-scrollbar {
  width: 4px;
}

.research-agent-sidebar-content::-webkit-scrollbar-track,
.research-agent-sidebar-sections::-webkit-scrollbar-track,
#research-agent-left-status::-webkit-scrollbar-track,
#research-agent-left-project::-webkit-scrollbar-track,
#research-agent-left-collaboration::-webkit-scrollbar-track {
  background: transparent;
}

.research-agent-sidebar-content::-webkit-scrollbar-thumb,
.research-agent-sidebar-sections::-webkit-scrollbar-thumb,
#research-agent-left-status::-webkit-scrollbar-thumb,
#research-agent-left-project::-webkit-scrollbar-thumb,
#research-agent-left-collaboration::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.research-agent-sidebar-content:hover::-webkit-scrollbar-thumb,
.research-agent-sidebar-sections:hover::-webkit-scrollbar-thumb,
#research-agent-left-status:hover::-webkit-scrollbar-thumb,
#research-agent-left-project:hover::-webkit-scrollbar-thumb,
#research-agent-left-collaboration:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.06);
}

.research-agent-sidebar-content::-webkit-scrollbar-thumb:active,
.research-agent-sidebar-sections::-webkit-scrollbar-thumb:active,
#research-agent-left-status::-webkit-scrollbar-thumb:active,
#research-agent-left-project::-webkit-scrollbar-thumb:active,
#research-agent-left-collaboration::-webkit-scrollbar-thumb:active {
  background: rgba(0, 0, 0, 0.1);
}

/* Firefox scrollbar for left panel */
.research-agent-sidebar-content,
.research-agent-sidebar-sections,
#research-agent-left-status,
#research-agent-left-project,
#research-agent-left-collaboration {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.02) transparent;
}

.research-agent-sidebar-content:hover,
.research-agent-sidebar-sections:hover,
#research-agent-left-status:hover,
#research-agent-left-project:hover,
#research-agent-left-collaboration:hover {
  scrollbar-color: rgba(0, 0, 0, 0.06) transparent;
}

/* Dark mode scrollbar for left panel */
[data-theme="dark"] .research-agent-sidebar-content::-webkit-scrollbar-thumb,
[data-theme="dark"] .research-agent-sidebar-sections::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-status::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-project::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-collaboration::-webkit-scrollbar-thumb,
.dark .research-agent-sidebar-content::-webkit-scrollbar-thumb,
.dark .research-agent-sidebar-sections::-webkit-scrollbar-thumb,
.dark #research-agent-left-status::-webkit-scrollbar-thumb,
.dark #research-agent-left-project::-webkit-scrollbar-thumb,
.dark #research-agent-left-collaboration::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .research-agent-sidebar-content:hover::-webkit-scrollbar-thumb,
[data-theme="dark"] .research-agent-sidebar-sections:hover::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-status:hover::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-project:hover::-webkit-scrollbar-thumb,
[data-theme="dark"] #research-agent-left-collaboration:hover::-webkit-scrollbar-thumb,
.dark .research-agent-sidebar-content:hover::-webkit-scrollbar-thumb,
.dark .research-agent-sidebar-sections:hover::-webkit-scrollbar-thumb,
.dark #research-agent-left-status:hover::-webkit-scrollbar-thumb,
.dark #research-agent-left-project:hover::-webkit-scrollbar-thumb,
.dark #research-agent-left-collaboration:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

/* Sidebar icons - vertical (collapsed) */
.research-agent-sidebar-icons-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  width: 64px;
  height: 100%;
  position: absolute;
  top: 48px; /* Below logo/profile - moved up more */
  left: 0;
  z-index: 10;
}

.research-agent-sidebar-header-collapsed {
  position: absolute;
  top: 12px;
  left: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 64px;
  height: 40px;
  z-index: 20;
  background: transparent;
  transition: none; /* No transition - stay fixed */
}

/* Logo stays in same position - always visible, never moves */
.research-agent-left-sidebar .research-agent-sidebar-header-collapsed {
  justify-content: center;
}

.research-agent-left-sidebar.expanded .research-agent-sidebar-header-collapsed {
  width: 64px; /* Keep same width - don't expand */
  justify-content: center; /* Stay centered */
  left: 0; /* Stay at left edge */
}

/* Profile icon stays in same position - always visible, never moves */
.research-agent-right-sidebar .research-agent-sidebar-header-collapsed {
  justify-content: center;
}

.research-agent-right-sidebar.expanded .research-agent-sidebar-header-collapsed {
  width: 64px; /* Keep same width - don't expand */
  justify-content: center; /* Stay centered */
  right: 0; /* Stay at right edge */
  left: auto;
}

.research-agent-left-sidebar.expanded .research-agent-sidebar-icons-vertical,
.research-agent-right-sidebar.expanded .research-agent-sidebar-icons-vertical {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Sidebar header expanded - close button */
.research-agent-sidebar-header-expanded {
  display: none;
  position: absolute;
  top: 0;
  padding: 8px;
  z-index: 30;
  background: transparent;
}

.research-agent-left-sidebar.expanded .research-agent-sidebar-content .research-agent-sidebar-header-expanded {
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.research-agent-right-sidebar.expanded .research-agent-sidebar-content .research-agent-sidebar-header-expanded {
  left: 0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.research-agent-close-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
  padding: 0;
}

.research-agent-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.research-agent-close-btn i {
  width: 16px;
  height: 16px;
}

.research-agent-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.research-agent-profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.research-agent-profile-icon:hover {
  background: #d1d5db;
}

.research-agent-profile-icon i {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

/* Sidebar icons - horizontal (expanded) */
.research-agent-sidebar-icons-horizontal {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 12px;
  padding-top: 56px; /* Space below logo (logo is at top: 12px, height: 40px, so start tabs at 56px) */
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.research-agent-left-sidebar.expanded .research-agent-sidebar-icons-horizontal,
.research-agent-right-sidebar.expanded .research-agent-sidebar-icons-horizontal {
  display: flex;
}

/* Sidebar content wrapper */
.research-agent-sidebar-content {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  position: relative;
}

.research-agent-left-sidebar.expanded .research-agent-sidebar-content,
.research-agent-right-sidebar.expanded .research-agent-sidebar-content {
  display: flex;
}

.research-agent-sidebar-sections {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Icon buttons */
.research-agent-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
  padding: 0;
}

.research-agent-icon-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.research-agent-icon-btn.active {
  background: rgba(229, 231, 235, 0.25);
  color: #2563eb;
}

.research-agent-icon-btn i {
  width: 20px;
  height: 20px;
}

/* Sidebar sections */
.research-agent-sidebar-sections {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.research-agent-section {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.research-agent-section.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.research-agent-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.research-agent-subtitle {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: #6b7280;
}

.research-agent-main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.research-agent-card {
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
}

.research-agent-card-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.research-agent-status {
  font-size: 13px;
  color: #6b7280;
}

.research-agent-status.connected {
  color: #10b981;
}

.research-agent-status.warning {
  color: #f59e0b;
}

.research-agent-status.error {
  color: #ef4444;
}

.research-agent-project-info {
  font-size: 13px;
  color: #6b7280;
}

.research-agent-project-info.has-project {
  color: #10b981;
}

.research-agent-project-info.no-project {
  color: #ef4444;
}

.research-agent-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-agent-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.research-agent-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.research-agent-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.research-agent-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.research-agent-btn-success {
  background: #10b981;
  color: #ffffff;
}

.research-agent-btn-success:hover:not(:disabled) {
  background: #059669;
}

.research-agent-results {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 100px;
  display: none;
}

.research-agent-results.visible {
  display: block;
}

.research-agent-results-content {
  margin: 0;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  color: #111827;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

