/* =============================================
 * Coded By - DARK LMNx9 (Limon Hossain)
 * GitHub - https://github.com/LMNx9-JOHNY
 * TG Group - https://t.me/+6hZVa9jGrIY4ZDRl
 * WhatsApp - https://wa.me/19707808868
 * Telegram - https://t.me/x_LMNx9
 * Website - https://lmnx9.shop
============================================= */

.code-block,
.code-panel,
.response-box {
    background: #0d1117;
    border: 1px solid rgba(61, 255, 138, 0.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 18px 40px rgba(0,0,0,0.38);
    position: relative;
}

.code-block::before,
.code-panel.active::before,
.response-box::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61,255,138,0.55), rgba(76,201,255,0.45), transparent);
    pointer-events: none;
    z-index: 2;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-header::before {
    content: '';
    width: 42px;
    height: 10px;
    flex-shrink: 0;
    background:
        radial-gradient(circle at 5px 5px, #ff5f57 4px, transparent 5px),
        radial-gradient(circle at 21px 5px, #febc2e 4px, transparent 5px),
        radial-gradient(circle at 37px 5px, #28c840 4px, transparent 5px);
}

.code-lang {
    color: #7ee0a3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-right: auto;
}

.copy-code-btn {
    background: rgba(61,255,138,0.08);
    border: 1px solid rgba(61,255,138,0.18);
    color: #9aa6b8;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.copy-code-btn:hover {
    color: #0b0e14;
    background: var(--cp-green);
    border-color: var(--cp-green);
}

.code-block pre,
.code-panel pre,
.example-response pre,
.response-box pre,
.res-body {
    margin: 0;
    padding: 0;
    background: transparent;
    overflow: auto;
    max-height: 440px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.code-block pre code,
.code-panel pre code,
.example-response pre code,
.response-box pre code,
code.hljs {
    display: block;
    padding: 16px !important;
    background: #0d1117 !important;
    font-family: 'JetBrains Mono', 'Source Code Pro', Consolas, monospace;
    font-size: 13px;
    line-height: 1.75;
    white-space: pre;
    width: max-content;
    min-width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.example-response {
    background: #0d1117;
    border: 1px solid rgba(61, 255, 138, 0.14);
    border-radius: 16px;
    overflow: hidden;
    max-width: 100%;
}

.response-box .res-header {
    margin: 0;
    gap: 10px;
}

.code-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
    padding: 4px;
}

.code-tab {
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px 10px 0 0;
    color: #6d788a;
    cursor: pointer;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.code-tab.active {
    background: #0d1117;
    color: var(--cp-green);
    border-color: rgba(61,255,138,0.22);
    border-bottom-color: #0d1117;
}

.code-panel {
    display: none;
    border-radius: 0 16px 16px 16px;
}

.code-panel.active {
    display: block;
}

.res-placeholder,
.res-loading {
    color: var(--text-muted);
    white-space: normal;
    padding: 16px;
    display: block;
}

.res-loading { color: var(--cp-blue); }
.res-error { color: var(--cp-pink); white-space: normal; padding: 16px; display: block; }
