/* W3F Code Highlighter - Custom Styles */

.w3f-code-block {
    position: relative;
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
    background: #1d1f21;
}

.w3f-code-block pre[class*="language-"] {
    margin: 0;
    border-radius: 0;
    padding: 20px 20px;
    font-size: 13.5px;
    line-height: 1.6;
    background: #1d1f21;
    max-height: 600px;
    overflow: auto;
}

.w3f-code-block code[class*="language-"] {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Consolas', monospace;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Title bar */
.w3f-code-title {
    background: #111;
    color: #ccc;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Language badge - top right */
.w3f-code-lang-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(0, 255, 234, 0.15);
    color: #00ffea;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    z-index: 5;
    pointer-events: none;
}

.w3f-code-title + .w3f-code-lang-badge {
    top: 44px;
}

/* Toolbar / Copy button - to the left of the language badge */
.w3f-code-block div.code-toolbar > .toolbar {
    top: 6px;
    right: 80px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.w3f-code-block:hover div.code-toolbar > .toolbar {
    opacity: 1;
}

.w3f-code-block div.code-toolbar > .toolbar > .toolbar-item > button,
.w3f-code-block div.code-toolbar > .toolbar > .toolbar-item > span {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    box-shadow: none;
}

.w3f-code-block div.code-toolbar > .toolbar > .toolbar-item > button:hover {
    background: rgba(0, 255, 234, 0.2);
    color: #00ffea;
    border-color: #00ffea;
}

/* Line numbers styling */
.w3f-code-block pre.line-numbers {
    padding-left: 3.8em;
}

.w3f-code-block .line-numbers-rows {
    border-right: 1px solid #333;
}

.w3f-code-block .line-numbers-rows > span:before {
    color: #555;
}

/* Scrollbar */
.w3f-code-block pre::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.w3f-code-block pre::-webkit-scrollbar-track {
    background: #111;
}
.w3f-code-block pre::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .w3f-code-block pre[class*="language-"] {
        font-size: 12px;
        padding: 15px 12px;
    }
    .w3f-code-block code[class*="language-"] {
        font-size: 12px;
    }
}
