/**
 * Code Highlight Styles
 * Dracula-inspired dark theme for code blocks
 *
 * @package GameHost_KB
 */

/* Syntax highlighting token colors */
.entry-content pre,
.entry-content .code-block {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Keywords (if, else, return, function, const, let, var…) */
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-tag {
    color: #ff79c6;
}

/* Strings */
.hljs-string,
.hljs-title.hljs-function_,
.hljs-attr {
    color: #f1fa8c;
}

/* Comments */
.hljs-comment,
.hljs-quote {
    color: #6272a4;
    font-style: italic;
}

/* Numbers */
.hljs-number,
.hljs-literal {
    color: #bd93f9;
}

/* Functions / methods */
.hljs-title,
.hljs-section,
.hljs-function {
    color: #50fa7b;
}

/* Variables / params */
.hljs-variable,
.hljs-params {
    color: #ffb86c;
}

/* Types / classes */
.hljs-type,
.hljs-class .hljs-title {
    color: #8be9fd;
}

/* Operators & punctuation */
.hljs-operator,
.hljs-punctuation {
    color: #ff79c6;
}

/* Bash specific */
.hljs-meta {
    color: #6272a4;
}

.hljs-meta .hljs-string {
    color: #f1fa8c;
}

/* ─── Code block line numbers ───────────────────────────────────────── */
.code-block-wrapper {
    position: relative;
}

/* Optional filename badge */
.code-filename {
    display: inline-block;
    background: #1e2230;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    margin-bottom: -1px;
}

/* Bash prompt $ styling */
.bash-prompt {
    color: #50fa7b;
    user-select: none;
}

/* Inline diff support */
.diff-add {
    background: rgba(57, 211, 83, 0.12);
    color: #39d353;
}

.diff-del {
    background: rgba(245, 88, 88, 0.12);
    color: #f55858;
    text-decoration: line-through;
}

/* ─── Table styling inside articles ─────────────────────────────────── */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    overflow-x: auto;
    display: block;
}

.entry-content th,
.entry-content td {
    text-align: left;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.entry-content th {
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.entry-content tr:hover td {
    background: var(--bg-hover);
}

/* ─── Scroll progress bar ────────────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--accent);
}