/* styles.css - Neural Nexus AI Assistant styling */

/* Main container */
.ai-code-assistant {
  display: flex;
  flex-direction: column;
  background-color: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border: 1px solid #333;
  height: 100%;
}

/* Header */
.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #252526;
  border-bottom: 1px solid #333;
}

.assistant-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
}

.assistant-title::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e96e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 0 1 10 10c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2'/%3E%3Cpath d='M12 8v8'/%3E%3Cpath d='m8 12 4 4 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Model selector */
.model-selector {
  position: relative;
}

.model-dropdown {
  background-color: #3c3c3c;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

.model-dropdown:hover {
  background-color: #4c4c4c;
}

.model-dropdown:focus {
  border-color: #007acc;
}

/* Mode tabs */
.mode-tabs {
  display: flex;
  background-color: #2d2d2d;
  border-bottom: 1px solid #333;
}

.mode-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  color: #cccccc;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  background-color: #3e3e3e;
}

.mode-tab.active {
  color: #ffffff;
  border-bottom-color: #007acc;
  background-color: #383838;
}

/* Suggestion content */
.suggestion-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.suggestion-content {
  white-space: pre-wrap;
}

/* Code blocks in suggestions */
.code-block {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 12px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* Syntax highlighting classes */
.code-block .keyword {
  color: #569cd6;
}

.code-block .string {
  color: #ce9178;
}

.code-block .number {
  color: #b5cea8;
}

.code-block .comment {
  color: #6a9955;
}

.code-block .function {
  color: #dcdcaa;
}

/* Loading indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #cccccc;
}

.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 3px solid #007acc;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Action buttons */
.suggestion-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

.apply-button {
  background-color: #0e639c;
  color: white;
  border: none;
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.apply-button:hover {
  background-color: #1177bb;
}

.apply-button:disabled {
  background-color: #3c3c3c;
  color: #888;
  cursor: not-allowed;
}

.token-counter {
  font-size: 12px;
  color: #888;
}

/* Error message */
.error-message {
  color: #f14c4c;
  padding: 12px;
  border: 1px solid #6e2b2b;
  border-radius: 4px;
  background-color: #331c1c;
  margin: 8px 0;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #888;
  text-align: center;
  font-style: italic;
}

/* Light theme overrides */
.light-theme .ai-code-assistant {
  background-color: #f5f5f5;
  color: #333;
  border-color: #ccc;
}

.light-theme .assistant-header {
  background-color: #e5e5e5;
  border-bottom-color: #ccc;
}

.light-theme .model-dropdown {
  background-color: #fff;
  color: #333;
  border-color: #ccc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.light-theme .mode-tabs {
  background-color: #e8e8e8;
  border-bottom-color: #ccc;
}

.light-theme .mode-tab {
  color: #333;
}

.light-theme .mode-tab:hover {
  background-color: #ddd;
}

.light-theme .mode-tab.active {
  color: #000;
  background-color: #d0d0d0;
}

.light-theme .code-block {
  background-color: #f8f8f8;
  border-color: #ddd;
}

.light-theme .error-message {
  color: #d32f2f;
  border-color: #ffcdd2;
  background-color: #ffebee;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .assistant-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .model-selector {
    margin-top: 8px;
    width: 100%;
  }
  
  .model-dropdown {
    width: 100%;
  }
} 