/* Enhanced code block styling with copy button and folding */
.copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7; }
.copy-code-button:hover {
  background-color: #4b5563;
  border-color: #6b7280;
  opacity: 1;
  transform: translateY(-1px); }
.copy-code-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px; }
.copy-code-button:active {
  background-color: #1f2937;
  transform: translateY(0); }
.copy-code-button.copied {
  background-color: #10b981;
  border-color: #059669; }
.copy-code-button.copied:hover {
  background-color: #059669; }
/* Code block container */
pre {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border); }
pre code {
  display: block;
  padding: 1rem;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-code);
  background-color: var(--bg-code); }
/* Line numbers for code blocks */
.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid var(--border);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none; }
.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber; }
.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: var(--text-secondary);
  display: block;
  padding-right: 0.8em;
  text-align: right; }
/* Code folding functionality */
.code-collapse-button {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #3b82f6;
  background-color: transparent;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease; }
.code-collapse-button:hover {
  background-color: #3b82f6;
  color: white; }
.code-hidden {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease; }
.code-visible {
  max-height: 500px;
  overflow-y: auto;
  transition: max-height 0.3s ease; }
/* Dark mode adjustments */
[data-theme="dark"] .copy-code-button {
  background-color: #4b5563;
  border-color: #6b7280; }
[data-theme="dark"] .copy-code-button:hover {
  background-color: #6b7280;
  border-color: #9ca3af; }
/* Responsive adjustments */
@media (max-width: 768px) {
  .copy-code-button {
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    font-size: 0.7rem; }
  pre code {
    padding: 0.75rem;
    font-size: 0.8rem; } }
/* Playground button enhancement */
.playground-button {
  position: absolute;
  top: 8px;
  right: 120px;
  z-index: 10;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #8b5cf6;
  border: 1px solid #7c3aed;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px; }
.playground-button:hover {
  background-color: #7c3aed;
  border-color: #6d28d9;
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: none;
  color: white; }
/* Language indicator */
.code-language {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px; }
