/* API Logo gradient (OpenRouter specific) */
.api-logo.openrouter {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: white;
}


.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.api-status.connected .api-status-dot {
  background: var(--status-success);
  animation: pulse 2s infinite;
}

.api-status.disconnected .api-status-dot {
  background: var(--status-error);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* API Key input container - position relative needed for toggle button */
.api-key-input-container {
  position: relative;
}

/* API Key input placeholder font override */
.api-key-input::placeholder {
  font-family: 'Space Grotesk', sans-serif;
}

.api-btn-test.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--status-success);
  color: var(--status-success);
}

.api-btn-test.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--status-error);
  color: var(--status-error);
}

.api-btn-test:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Save button fixed */
.save-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  background: var(--admin-surface);
  border-top: 1px solid var(--admin-border);
  z-index: 50;
}

.save-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--victor-gold), var(--victor-gold-dark));
  border: none;
  border-radius: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn:active {
  transform: scale(0.98);
}

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

/* History dot error state */
.history-dot-error {
  background: var(--status-error);
}

/* Test result toast */
.test-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 20px;
  background: var(--admin-text);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.test-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.test-toast.success {
  background: var(--status-success);
}

.test-toast.error {
  background: var(--status-error);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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