// API Code Samples // Styles for inline curl examples and Ask AI links within API operations .api-code-sample { margin: $api-spacing-lg 0; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: $api-border-radius; overflow: hidden; .dark-theme & { border-color: rgba(255, 255, 255, 0.1); } } .api-code-sample-header { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: $api-spacing-sm $api-spacing-md; background: rgba(0, 0, 0, 0.03); border-bottom: 1px solid rgba(0, 0, 0, 0.1); .dark-theme & { background: rgba(255, 255, 255, 0.03); border-bottom-color: rgba(255, 255, 255, 0.1); } .api-code-sample-title { font-size: 0.85rem; font-weight: 600; } } pre.api-code-block { margin: 0; padding: $api-spacing-md; overflow-x: auto; background: $article-code-bg; color: $article-code; font-size: 0.8rem; line-height: 1.5; border-radius: 0; code { background: none; padding: 0; color: inherit; font-size: inherit; line-height: inherit; white-space: pre; } } .api-code-ask-ai { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.2em 0.6em; font-size: 0.75rem; font-weight: 500; text-decoration: none; white-space: nowrap; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); color: $article-bold; background: rgba(0, 0, 0, 0.04); transition: background 0.15s, border-color 0.15s; .dark-theme & { border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); } &:hover { background: rgba(0, 0, 0, 0.08); border-color: rgba(0, 0, 0, 0.25); .dark-theme & { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); } } }