/* =============================================================
   Code Snippet Component
   ============================================================= */

.code-snippet {
  position: relative;
  background: var(--color-surface, #1e1e1e);
  border: 1px solid var(--color-border, #3a3a3a);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
}

.code-snippet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  background: rgba(0 0 0 / 0.2);
  border-bottom: 1px solid var(--color-border, #3a3a3a);
}

.code-snippet__label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-snippet__copy {
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-primary, #2E9B5F);
  background: transparent;
  border: 1px solid var(--color-primary, #2E9B5F);
  border-radius: var(--radius-sm, 0.375rem);
  padding: 0.25em 0.75em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.code-snippet__copy:hover {
  background: var(--color-primary, #2E9B5F);
  color: #fff;
}

.code-snippet pre {
  margin: 0;
  padding: var(--space-5, 1.25rem) var(--space-6, 1.5rem);
  overflow-x: auto;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
}

.code-snippet code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  color: var(--color-text, #e5e7eb);
  background: transparent;
}

/* Syntax highlight tokens (optional, progressive enhancement) */
.code-snippet .token-keyword { color: #c792ea; }
.code-snippet .token-string  { color: #c3e88d; }
.code-snippet .token-comment { color: #546e7a; font-style: italic; }
.code-snippet .token-method  { color: #82aaff; }
