/**
 * Syntax Highlighting CSS
 * 
 * This file contains styles for code syntax highlighting with theme support.
 */

/* Base code snippet styling */
.code-snippet {
    background: var(--code-bg);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.8rem;
    border-left: 4px solid var(--accent-primary);
    color: var(--code-text);
    font-family: 'Courier New', monospace;
    position: relative;
    overflow-x: auto;
    transition: all 0.3s ease;
}

.code-snippet pre {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    margin: 0;
}

/* Syntax highlighting elements */
.code-snippet .keyword {
    color: var(--code-keyword);
    font-weight: bold;
}

.code-snippet .function {
    color: var(--code-function);
}

.code-snippet .string {
    color: var(--code-string);
}

.code-snippet .number {
    color: var(--code-number);
}

.code-snippet .comment {
    color: var(--code-comment);
    font-style: italic;
}

.code-snippet .variable {
    color: var(--code-variable);
}

.code-snippet .operator {
    color: var(--code-operator);
}

.code-snippet .class {
    color: var(--code-class);
    font-weight: bold;
}

/* Additional syntax elements */
.code-snippet .property {
    color: var(--code-variable);
}

.code-snippet .punctuation {
    color: var(--code-text);
}

.code-snippet .tag {
    color: var(--code-keyword);
}

.code-snippet .attribute {
    color: var(--code-function);
}

/* Code snippet enhancements */
.code-snippet .line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 1.2rem 0.5rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    border-right: 1px solid var(--border-color);
    text-align: right;
    user-select: none;
}

/* Animation for code execution highlighting */
@keyframes highlight-line {
    0% { background-color: transparent; }
    30% { background-color: var(--event-thread1-bg); }
    70% { background-color: var(--event-thread1-bg); }
    100% { background-color: transparent; }
}

.code-snippet .highlight-line {
    background-color: transparent;
    display: block;
    animation: highlight-line 2s ease;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .code-snippet {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .code-snippet .line-numbers {
        padding: 1rem 0.3rem;
        font-size: 0.8rem;
    }
}
