.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--vscode-editor-foreground);
  font-size: 0.875rem;
  height: 100%;
  position: relative;
}

/* Optimize Container */
.optimizeContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem;
  margin: 0 0.5rem;
  background: var(--vscode-editor-background);
}

/* Running State */
.runningState {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
}

.runningInfo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.runningInfo > .codicon {
  font-size: 1.1rem;
  color: var(--vscode-textLink-foreground);
}

.runningDetails {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.runningLabel {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--vscode-descriptionForeground);
}

.runningFunction {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--vscode-foreground);
}

.stopButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--vscode-errorForeground, #f14c4c);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stopButton:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* Warning Banner */
.warningBanner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: color-mix(in srgb, var(--vscode-editorWarning-foreground, #f5c542) 15%, transparent);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--vscode-editorWarning-foreground, #f5c542);
  margin: 0 0.5rem;
}

.warningBanner a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Action Row */
.actionRow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0;
  border-top: 1px solid var(--vscode-widget-border, rgba(128, 128, 128, 0.15));
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  position: relative;
}

.optimizeButton {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--vscode-textLink-foreground);
  border: none;
  border-radius: 8px;
  color: var(--vscode-editor-background);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.optimizeButton:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.optimizeButton:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.optimizeButton .codicon {
  font-size: 1rem;
}

/* Spin animation for loading icon */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 400px) {
  .optimizeContainer {
    padding: 0.5rem;
    margin: 0 0.25rem;
  }

  .optimizeButton {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
