.code-sample {
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px 14px 16px; /* tighten top padding */
    margin-bottom: 24px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    position: relative;
}

.code-sample pre {
    margin-top: 2px;
    white-space: pre;
    overflow-x: scroll;          /* always show scrollbar */
    scrollbar-width: thin;       /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent; /* Firefox */
    min-height: 50px;           /* ensure enough height to show scrollbar */
}

/* Webkit scrollbar styles */
.code-sample pre::-webkit-scrollbar {
    height: 8px;
    background-color: transparent;
}

.code-sample pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.code-sample pre::-webkit-scrollbar-track {
    background-color: transparent;
}

.code-sample pre code {
    white-space: inherit;        /* inherit "pre" from parent */
    display: inline-block;       /* allow measuring intrinsic width */
    min-width: max-content;      /* expand to content width for overflow */
}

/* Provide space so the fixed copy button doesn't overlap the first code line */
.docs-code-panel .code-sample {
    padding-top: 28px; /* overrides Tailwind p-4 top for this panel only */
    position: relative !important; /* ensure absolute children anchor here */
}

/* Keep copy button fixed in top-right of code samples in the right panel */
.docs-code-panel .code-sample .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    float: none;
    margin: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Hide copy buttons in docs-content div */
.docs-content .copy-code-btn,
.docs-content .copy-btn {
    display: none !important;
}

/* New light response tabs embedded in content */
.nerve-response-codes .response-tab.active[data-status="200"] {
    background: #bbf7d0; /* green-200 */
    color: #166534; /* green-800 */
}
.nerve-response-codes .response-tab.active[data-status="400"],
.nerve-response-codes .response-tab.active[data-status="500"] {
    background: #fecaca; /* red-200 */
    color: #991b1b; /* red-800 */
}
.nerve-response-codes pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}