/* AI Inline Hint — ghost text styling */

.python-ai-inline-hint {
  color: #9ca3af;
  opacity: 0.7;
  font-style: italic;
  pointer-events: none;
  user-select: none;
  white-space: pre;
}

/* Dark theme (darcula) */
.cm-s-darcula .python-ai-inline-hint {
  color: #6b7280;
  opacity: 0.65;
}

/* Light theme (eclipse) */
.cm-s-eclipse .python-ai-inline-hint {
  color: #9ca3af;
  opacity: 0.75;
}

/* --- Toggle button --- */

.python-ai-hint-toggle {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  user-select: none;
}

.python-ai-hint-toggle:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.4);
}

.python-ai-hint-toggle[aria-pressed="true"] {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.python-ai-hint-toggle--off {
  background: rgba(107, 114, 128, 0.08);
  border-color: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.python-ai-hint-toggle--off:hover {
  background: rgba(107, 114, 128, 0.14);
  border-color: rgba(107, 114, 128, 0.35);
  color: #6b7280;
}

.python-ai-hint-toggle__icon {
  font-size: 12px;
}

.python-ai-hint-toggle__label {
  font-family: inherit;
}

/* Dark theme toggle */
.cm-s-darcula ~ .python-ai-hint-toggle,
body[data-neuroege-theme="dark"] .python-ai-hint-toggle {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.08);
  color: #93c5fd;
}

body[data-neuroege-theme="dark"] .python-ai-hint-toggle:hover {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-neuroege-theme="dark"] .python-ai-hint-toggle--off {
  background: rgba(107, 114, 128, 0.1);
  border-color: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

/* Indicator badge while loading */
.python-ai-hint-loading {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.08);
  color: #6b7280;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.python-ai-hint-loading--active {
  opacity: 1;
}

.python-ai-hint-loading__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  animation: python-ai-hint-pulse 1s ease-in-out infinite;
}

@keyframes python-ai-hint-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
