/* ============================================
   DS | CODE BLOCKS — Prism + copy button
   ============================================ */

/* Override flex layout for single pre/code structure */
.ds-component-demo__code {
    position: relative;
    display:  block;
}

.ds-component-demo__code pre {
    margin:     0;
    padding:    0;
    overflow:   visible;
    background: transparent !important;
}

.ds-component-demo__code pre code {
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    white-space: pre;
    background:  transparent !important;
}

/* Copy button — lives on the dark code background */
.ds-code__copy-btn {
    position:    absolute;
    top:         8px;
    right:       8px;
    display:     flex;
    align-items: center;
    gap:         6px;
    padding:     4px 8px;
    border-radius: 6px;
    font-size:   var(--ds-font-size-small);
    font-family: var(--ds-font-family);
    color:       #888;
    background:  transparent;
    border:      none;
    cursor:      pointer;
    transition:  color 0.15s, background 0.15s;
    z-index:     10;
}
.ds-code__copy-btn:hover {
    color:       #fff;
    background:  rgba(255, 255, 255, 0.12);
}
.ds-code--copied .ds-code__copy-btn {
    color: var(--ds-color-feedback-success);
}
