/* Interactive Block Styles */
.interactive-block {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.interactive-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.interactive-block-title {
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

.interactive-controls {
  display: flex;
  gap: 0.5rem;
}

.interactive-controls button {
  padding: 0.25rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.interactive-controls button:hover {
  background: #f0f0f0;
  border-color: #999;
}

.interactive-controls button:active {
  transform: translateY(1px);
}

.code-editor {
  margin-bottom: 1rem;
}

.code-editor pre {
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.code-output {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  background: #fff;
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.code-output.error {
  border-color: #ff6b6b;
  background-color: #fff5f5;
  color: #c92a2a;
}

.code-output.success {
  border-color: #51cf66;
  background-color: #f3f9f4;
}

.code-output:empty::before {
  content: "Output will appear here...";
  color: #999;
  font-style: italic;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .interactive-block {
    border-color: #444;
    background-color: #1a1a1a;
  }
  
  .interactive-block-header {
    border-bottom-color: #444;
  }
  
  .interactive-block-title {
    color: #e0e0e0;
  }
  
  .interactive-controls button {
    background: #2a2a2a;
    border-color: #555;
    color: #e0e0e0;
  }
  
  .interactive-controls button:hover {
    background: #333;
    border-color: #777;
  }
  
  .code-editor pre {
    border-color: #444;
    background: #0a0a0a;
  }
  
  .code-output {
    border-color: #444;
    background: #0a0a0a;
    color: #e0e0e0;
  }
  
  .code-output.error {
    border-color: #c92a2a;
    background-color: #1a0a0a;
  }
  
  .code-output.success {
    border-color: #2f9e44;
    background-color: #0a1a0a;
  }
}