/**
 * AI-Jup extension styles
 */

/* Prompt cell styling */
.ai-jup-prompt-cell {
  border-left: 4px solid var(--jp-brand-color1, #1976d2);
  background-color: var(--jp-layout-color1, #ffffff);
  margin: 8px 0;
}

.ai-jup-prompt-cell .jp-Cell-inputWrapper {
  background-color: rgba(25, 118, 210, 0.05);
}

.ai-jup-prompt-cell::before {
  content: '🤖 AI Prompt';
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--jp-brand-color1, #1976d2);
  padding: 4px 12px;
  background-color: rgba(25, 118, 210, 0.1);
  border-bottom: 1px solid rgba(25, 118, 210, 0.2);
}

/* Prompt output cell styling */
.ai-jup-prompt-output {
  border-left: 4px solid var(--jp-success-color1, #4caf50);
  background-color: var(--jp-layout-color1, #ffffff);
  margin: 0 0 8px 0;
}

.ai-jup-prompt-output .jp-Cell-inputWrapper {
  background-color: rgba(76, 175, 80, 0.05);
}

.ai-jup-prompt-output::before {
  content: '💬 AI Response';
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--jp-success-color1, #4caf50);
  padding: 4px 12px;
  background-color: rgba(76, 175, 80, 0.1);
  border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

/* Variable reference highlighting */
.ai-jup-variable-ref {
  color: var(--jp-warn-color1, #ff9800);
  font-weight: 600;
  background-color: rgba(255, 152, 0, 0.1);
  padding: 0 4px;
  border-radius: 3px;
}

/* Function reference highlighting */
.ai-jup-function-ref {
  color: var(--jp-info-color1, #00bcd4);
  font-weight: 600;
  background-color: rgba(0, 188, 212, 0.1);
  padding: 0 4px;
  border-radius: 3px;
}

/* Loading indicator */
.ai-jup-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--jp-ui-font-color2, #616161);
  font-size: 13px;
  padding: 8px 0;
}

.ai-jup-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--jp-border-color2, #e0e0e0);
  border-top-color: var(--jp-brand-color1, #1976d2);
  border-radius: 50%;
  animation: ai-jup-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes ai-jup-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Convert to Cells button container */
.ai-jup-convert-button-container {
  display: flex;
  justify-content: flex-end;
  padding: 6px 12px;
  background: var(--jp-layout-color2, #f5f5f5);
  border-top: 1px solid var(--jp-border-color2, #e0e0e0);
}

.ai-jup-convert-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--jp-ui-font-color1, #333);
  background: var(--jp-layout-color1, #fff);
  border: 1px solid var(--jp-border-color1, #ccc);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.ai-jup-convert-button:hover {
  background: var(--jp-layout-color3, #eee);
  border-color: var(--jp-brand-color1, #1976d2);
}

.ai-jup-convert-button:active {
  background: var(--jp-brand-color3, #bbdefb);
}

/* Dark theme adjustments */
[data-jp-theme-light='false'] .ai-jup-prompt-cell {
  background-color: var(--jp-layout-color1, #1e1e1e);
}

[data-jp-theme-light='false'] .ai-jup-prompt-cell .jp-Cell-inputWrapper {
  background-color: rgba(25, 118, 210, 0.1);
}

[data-jp-theme-light='false'] .ai-jup-prompt-output {
  background-color: var(--jp-layout-color1, #1e1e1e);
}

[data-jp-theme-light='false'] .ai-jup-prompt-output .jp-Cell-inputWrapper {
  background-color: rgba(76, 175, 80, 0.1);
}

[data-jp-theme-light='false'] .ai-jup-convert-button-container {
  background: var(--jp-layout-color2, #2d2d2d);
}

[data-jp-theme-light='false'] .ai-jup-convert-button {
  color: var(--jp-ui-font-color1, #e0e0e0);
  background: var(--jp-layout-color1, #1e1e1e);
  border-color: var(--jp-border-color1, #555);
}

[data-jp-theme-light='false'] .ai-jup-convert-button:hover {
  background: var(--jp-layout-color3, #3d3d3d);
}
