.notebook-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 100%;
  background-color: transparent;
  border: none;
}

.notebook-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 8px 0 16px 0;
  border-bottom: 1px solid var(--vscode-editorWidget-border);
  margin: 0 8px;
}

.notebook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  align-items: center;
}

.run-progress {
  padding-right: 8px;
  font-size: 12px;
  color: var(--vscode-foreground);
  display: flex;
  align-items: center;
  gap: 10px;
}

.notebook-controls .action-button {
  min-width: auto;
  padding: 6px 12px;
  margin: 0;
  flex: none;
}

.clear-all {
  border: 1px solid var(--vscode-button-border);
  background-color: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
}

.clear-all:hover {
  background-color: var(--vscode-button-hoverBackground);
  border-color: var(--vscode-button-border);
  color: var(--vscode-button-foreground);
}

.notebook-container {
  flex: 1;
  overflow-y: auto;
  padding: 22px 16px 22px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.notebook-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: none;
}

/* Cell Styles */
.notebook-cell {
  display: flex;
  border-radius: 4px;
  overflow: visible;
  background-color: var(--vscode-editor-background);
  width: 100%;
  box-sizing: border-box;
}

.cell-sidebar {
  width: 50px;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-left: 3px solid transparent;
  gap: 4px;
}

.cell-number {
  font-family: monospace;
  color: var(--vscode-sideBar-foreground);
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.cell-status {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 2px;
  padding-left: 2px;
}

.loading::after {
  color: var(--vscode-button-foreground);
}

.cell-main {
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

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

  100% {
    transform: rotate(360deg);
  }
}

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

  50% {
    opacity: 0.8;
  }
}

.cell-focus-highlight .cell-main {
  animation: focusHighlight 1s ease-out;
}

@keyframes focusHighlight {
  0% {
    background-color: rgba(0, 122, 204, 0.2);
    box-shadow: 0 0 0 1px #666666;
  }

  100% {
    background-color: rgba(0, 122, 204, 0.05);
    box-shadow: 0 0 0 1px #666666;
  }
}

.cell-running .cell-sidebar {
  border-left: 3px solid #4caf50;
  background-color: rgba(76, 175, 80, 0.1);
}

.cell-running .cell-main {
  background-color: rgba(76, 175, 80, 0.05);
}

.cell-status-indicator {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.cell-status-success {
  background-color: var(--vscode-testing-iconPassed);
  color: var(--vscode-button-foreground);
}

.cell-status-error {
  background-color: var(--vscode-testing-iconFailed);
  color: var(--vscode-button-foreground);
}

.cell-controls {
  display: flex;
  gap: 4px;
}

.notebook-cell-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.notebook-cell-controls-divider {
  background-color: var(--vscode-editorWidget-border);
  width: 5px;
  height: 12px;
}

.inline-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.cell-output-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 8px;
}

.view-output {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 2px;
  cursor: pointer;
  background-color: transparent;
  color: var(--vscode-foreground);
  font-size: 12px;
  transition: all 0.2s ease;
}

.view-output:hover {
  color: var(--vscode-button-foreground);
}
